On Mon, Feb 25, 2013 at 1:30 PM, Paul K <paulclin...@yahoo.com> wrote:
> In the best tradition of self-answering, it turned out that
> GetLineVisible doesn't do what I need: it only checks against whether
> the line is hidden because of folding (not if it's outside of the
> visible area, which is what I'm looking for). I don't see any other
> API method that does this, so I calculate it myself using
> GetFirstVisibleLine, LinesOnScreen, and DocLineFromVisible.

Yes. It doesn't have the clearest name. I think you know this, but the
wxStyledTextCtrl function names map pretty closely to Scintilla's
message names.

http://www.scintilla.org/ScintillaDoc.html#SCI_GETLINEVISIBLE


This is how I do it in stedit.cpp in the modules/wxstedit/src dir.

    int first_line    = top_line < 0 ? GetFirstVisibleLine() : top_line;
    int line_count    = GetLineCount();
    int lines_visible = LinesOnScreen();
    int last_line     = bottom_line < 0 ? wxMin(line_count, first_line
+ lines_visible) : bottom_line;


Regards,

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to