1. added SetSelection() to wxItemContainer and removed its declarations

from derived classes
2. made wxItemContainer::Select() non virtual: it simply calls SetSelection()
3. renamed wxListBox::SetSelection(n, select) to DoSetSelection() for all
   ports and defined non virtual SetSelection() overloads in the base class
   to avoid virtual functions hiding


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-02-13 17:08:27 +00:00
parent 1aa3e471fe
commit c6179a847d
32 changed files with 132 additions and 119 deletions

View File

@@ -76,7 +76,7 @@ public:
// selection
// ---------
virtual void Select(int n) = 0;
virtual void SetSelection(int n) = 0;
virtual int GetSelection() const = 0;
// set selection to the specified string, return false if not found
@@ -85,6 +85,10 @@ public:
// return the selected string or empty string if none
wxString GetStringSelection() const;
// this is the same as SetSelection( for single-selection controls but
// reads better for multi-selection ones
void Select(int n) { SetSelection(n); }
// misc
// ----
@@ -172,6 +176,20 @@ private:
DECLARE_NO_COPY_CLASS(wxControlWithItems)
};
// ----------------------------------------------------------------------------
// inline functions
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_2
inline int wxItemContainer::Number() const
{
return GetCount();
}
#endif // WXWIN_COMPATIBILITY_2_2
#endif // wxUSE_CONTROLS
#endif // _WX_CTRLSUB_H_BASE_