+ // dtor does some internal cleanup (deletes m_selStore if any)
+ virtual ~wxVListBox();
+
+
+ // accessors
+ // ---------
+
+ // get the number of items in the control
+ size_t GetItemCount() const { return GetRowCount(); }
+
+ // does this control use multiple selection?
+ bool HasMultipleSelection() const { return m_selStore != NULL; }
+
+ // get the currently selected item or wxNOT_FOUND if there is no selection
+ //
+ // this method is only valid for the single selection listboxes
+ int GetSelection() const
+ {
+ wxASSERT_MSG( !HasMultipleSelection(),
+ wxT("GetSelection() can't be used with wxLB_MULTIPLE") );
+
+ return m_current;
+ }
+
+ // is this item the current one?
+ bool IsCurrent(size_t item) const { return item == (size_t)m_current; }
+ #ifdef __WXUNIVERSAL__
+ bool IsCurrent() const { return wxVScrolledWindow::IsCurrent(); }
+ #endif
+
+ // is this item selected?
+ bool IsSelected(size_t item) const;
+
+ // get the number of the selected items (maybe 0)
+ //
+ // this method is valid for both single and multi selection listboxes
+ size_t GetSelectedCount() const;
+
+ // get the first selected item, returns wxNOT_FOUND if none
+ //
+ // cookie is an opaque parameter which should be passed to
+ // GetNextSelected() later
+ //
+ // this method is only valid for the multi selection listboxes
+ int GetFirstSelected(unsigned long& cookie) const;
+
+ // get next selection item, return wxNOT_FOUND if no more
+ //
+ // cookie must be the same parameter that was passed to GetFirstSelected()
+ // before
+ //
+ // this method is only valid for the multi selection listboxes
+ int GetNextSelected(unsigned long& cookie) const;
+
+ // get the margins around each item
+ wxPoint GetMargins() const { return m_ptMargins; }
+
+ // get the background colour of selected cells
+ const wxColour& GetSelectionBackground() const { return m_colBgSel; }
+
+ // get the item rect, returns empty rect if the item is not visible
+ wxRect GetItemRect(size_t n) const;