X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/293b15f78d8873a65837c3d165dd739ec23dad8c..47d281e6b784b5d510ba8a48eb447704560ee9ef:/interface/wx/vlbox.h?ds=sidebyside diff --git a/interface/wx/vlbox.h b/interface/wx/vlbox.h index ee09a476df..8569dac0fe 100644 --- a/interface/wx/vlbox.h +++ b/interface/wx/vlbox.h @@ -30,7 +30,6 @@ @library{wxcore} @category{ctrl} - @see wxSimpleHtmlListBox, wxHtmlListBox */ @@ -129,6 +128,8 @@ public: Returns the rectangle occupied by this item in physical coordinates. If the item is not currently visible, returns an empty rectangle. + + @since 2.9.0 */ wxRect GetItemRect(size_t item) const; @@ -188,59 +189,6 @@ public: */ bool IsSelected(size_t item) const; - /** - This method is used to draw the items background and, maybe, a border - around it. - - The base class version implements a reasonable default behaviour which - consists in drawing the selected item with the standard background - colour and drawing a border around the item if it is either selected or - current. - - @todo Change this function signature to non-const. - */ - void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; - - /** - The derived class must implement this function to actually draw the - item with the given index on the provided DC. - - @param dc - The device context to use for drawing. - @param rect - The bounding rectangle for the item being drawn (DC clipping - region is set to this rectangle before calling this function). - @param n - The index of the item to be drawn. - - @todo Change this function signature to non-const. - */ - virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; - - /** - This method may be used to draw separators between the lines. The - rectangle passed to it may be modified, typically to deflate it a bit - before passing to OnDrawItem(). - - The base class version of this method doesn't do anything. - - @param dc - The device context to use for drawing. - @param rect - The bounding rectangle for the item. - @param n - The index of the item. - - @todo Change this function signature to non-const. - */ - virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; - - /** - The derived class must implement this method to return the height of - the specified item (in pixels). - */ - virtual wxCoord OnMeasureItem(size_t n) const; - /** Selects or deselects the specified item which must be valid (i.e. not equal to @c wxNOT_FOUND). @@ -284,7 +232,7 @@ public: This is just a synonym for wxVScrolledWindow::SetRowCount(). */ - void SetItemCount(size_t count); + virtual void SetItemCount(size_t count); //@{ /** @@ -330,5 +278,60 @@ public: @see Select() */ void Toggle(size_t item); + +protected: + + /** + The derived class must implement this function to actually draw the + item with the given index on the provided DC. + + @param dc + The device context to use for drawing. + @param rect + The bounding rectangle for the item being drawn (DC clipping + region is set to this rectangle before calling this function). + @param n + The index of the item to be drawn. + + @todo Change this function signature to non-const. + */ + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const = 0; + + /** + This method is used to draw the items background and, maybe, a border + around it. + + The base class version implements a reasonable default behaviour which + consists in drawing the selected item with the standard background + colour and drawing a border around the item if it is either selected or + current. + + @todo Change this function signature to non-const. + */ + virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; + + /** + This method may be used to draw separators between the lines. The + rectangle passed to it may be modified, typically to deflate it a bit + before passing to OnDrawItem(). + + The base class version of this method doesn't do anything. + + @param dc + The device context to use for drawing. + @param rect + The bounding rectangle for the item. + @param n + The index of the item. + + @todo Change this function signature to non-const. + */ + virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; + + /** + The derived class must implement this method to return the height of + the specified item (in pixels). + */ + virtual wxCoord OnMeasureItem(size_t n) const = 0; };