X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cc4bfafe5a31cb96f35b3ec9b19fa2b0b3a4eef..5d2d8f6ae38287516603c6e2e5ea81c7fee5efd6:/interface/vlbox.h diff --git a/interface/vlbox.h b/interface/vlbox.h index 67e2e4fa71..6b06db28f1 100644 --- a/interface/vlbox.h +++ b/interface/vlbox.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: vlbox.h -// Purpose: documentation for wxVListBox class +// Purpose: interface of wxVListBox // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -34,8 +34,7 @@ @category{ctrl} @appearance{vlistbox.png} - @seealso - wxSimpleHtmlListBox, wxHtmlListBox + @see wxSimpleHtmlListBox, wxHtmlListBox */ class wxVListBox : public wxVScrolledWindow { @@ -76,7 +75,7 @@ public: Returns @true if any items were changed, i.e. if there had been any selected items before, or @false if all the items were already deselected. This method is only valid for multi selection listboxes. - + @see SelectAll(), Select() */ bool DeselectAll(); @@ -88,64 +87,64 @@ public: calls to GetNextSelected(). It is needed in order to allow parallel iterations over the selected items. Here is a typical example of using these functions: - + This method is only valid for multi selection listboxes. */ - int GetFirstSelected(unsigned long& cookie); + int GetFirstSelected(unsigned long& cookie) const; /** Get the number of items in the control. - + @see SetItemCount() */ - size_t GetItemCount(); + size_t GetItemCount() const; /** Returns the margins used by the control. The @c x field of the returned point is the horizontal margin and the @c y field is the vertical one. - + @see SetMargins() */ - wxPoint GetMargins(); + wxPoint GetMargins() const; /** Returns the index of the next selected item or @c wxNOT_FOUND if there are no more. This method is only valid for multi selection listboxes. - + @see GetFirstSelected() */ - int GetNextSelected(unsigned long& cookie); + int GetNextSelected(unsigned long& cookie) const; /** Returns the number of the items currently selected. It is valid for both single and multi selection controls. In the former case it may only return 0 or 1 however. - + @see IsSelected(), GetFirstSelected(), GetNextSelected() */ - size_t GetSelectedCount(); + size_t GetSelectedCount() const; /** Get the currently selected item or @c wxNOT_FOUND if there is no selection. */ - int GetSelection(); + int GetSelection() const; /** Returns the background colour used for the selected cells. By default the standard system colour is used. - + @see wxSystemSettings::GetColour, SetSelectionBackground() */ - const wxColour GetSelectionBackground(); + const wxColour GetSelectionBackground() const; /** Returns @true if the listbox was created with @c wxLB_MULTIPLE style and so supports multiple selection or @false if it is a single selection listbox. */ - bool HasMultipleSelection(); + bool HasMultipleSelection() const; /** Returns @true if this item is the current one, @false otherwise. @@ -155,12 +154,12 @@ public: selection listboxes where many items may be selected but only one (at most) is current. */ - bool IsCurrent(size_t item); + bool IsCurrent(size_t item) const; /** Returns @true if this item is selected, @false otherwise. */ - bool IsSelected(size_t item); + bool IsSelected(size_t item) const; /** This method is used to draw the items background and, maybe, a border @@ -170,12 +169,12 @@ public: colour and drawing a border around the item if it is either selected or current. */ - void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n); + 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 @@ -184,14 +183,14 @@ public: @param n The index of the item to be drawn */ - void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n); + 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 @@ -199,13 +198,13 @@ public: @param n The index of the item */ - void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n); + 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). */ - wxCoord OnMeasureItem(size_t n); + wxCoord OnMeasureItem(size_t n) const; /** Selects or deselects the specified item which must be valid (i.e. not @@ -222,7 +221,7 @@ public: Returns @true if any items were changed, i.e. if there had been any unselected items before, or @false if all the items were already selected. This method is only valid for multi selection listboxes. - + @see DeselectAll(), Select() */ bool SelectAll(); @@ -232,7 +231,7 @@ public: Return @true if the items selection status has changed or @false otherwise. This method is only valid for multi selection listboxes. - + @see SelectAll(), Select() */ bool SelectRange(size_t from, size_t to); @@ -270,7 +269,7 @@ public: Notice that using non-default background colour may result in control having appearance different from the similar native controls and so should in general be avoided. - + @see GetSelectionBackground() */ void SetSelectionBackground(const wxColour& col); @@ -282,3 +281,4 @@ public: */ void Toggle(size_t item); }; +