added wxVListBox using wxVScrolledWindow and wxHtmlListBox using it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-06-01 13:35:26 +00:00
parent 6fac75c355
commit e0c6027b5a
10 changed files with 1034 additions and 2 deletions

View File

@@ -90,6 +90,14 @@ public:
virtual bool ScrollLines(int lines);
virtual bool ScrollPages(int pages);
// redraw the specified line
void RefreshLine(size_t line);
// return the item at the specified (in physical coordinates) position or
// wxNOT_FOUND if none, i.e. if it is below the last item
int HitTest(wxCoord x, wxCoord y) const;
int HitTest(const wxPoint& pt) const { return HitTest(pt.x, pt.y); }
// accessors
// ---------
@@ -104,8 +112,12 @@ public:
// get the last currently visible line
size_t GetLastVisibleLine() const { return m_lineFirst + m_nVisible - 1; }
// is this line currently visible?
bool IsVisible(size_t line) const
{ return line >= m_lineFirst && line <= GetLastVisibleLine(); }
//protected:
protected:
// this function must be overridden in the derived class and it should
// return the height of the given line in pixels
virtual wxCoord OnGetLineHeight(size_t n) const = 0;
@@ -125,7 +137,7 @@ public:
// usual
virtual void OnGetLinesHint(size_t lineMin, size_t lineMax) const { }
protected:
// the event handlers
void OnSize(wxSizeEvent& event);
void OnScroll(wxScrollWinEvent& event);