GetCurrentSelection() was documented but not present in all ports (just MSW and GTK); moved it to the base classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -191,6 +191,16 @@ Copies the selected text to the clipboard.
|
|||||||
Copies the selected text to the clipboard and removes the selection.
|
Copies the selected text to the clipboard and removes the selection.
|
||||||
|
|
||||||
|
|
||||||
|
\membersection{wxComboBox::GetCurrentSelection}\label{wxcomboboxgetcurrentselection}
|
||||||
|
|
||||||
|
\constfunc{int}{GetCurrentSelection}{\void}
|
||||||
|
|
||||||
|
This function does the same things as
|
||||||
|
\helpref{wxChoice::GetCurrentSelection}{wxchoicegetcurrentselection} and
|
||||||
|
returns the item currently selected in the dropdown list if it's open or the
|
||||||
|
same thing as \helpref{GetSelection}{wxcontrolwithitemsgetselection} otherwise.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxComboBox::GetInsertionPoint}\label{wxcomboboxgetinsertionpoint}
|
\membersection{wxComboBox::GetInsertionPoint}\label{wxcomboboxgetinsertionpoint}
|
||||||
|
|
||||||
\constfunc{long}{GetInsertionPoint}{\void}
|
\constfunc{long}{GetInsertionPoint}{\void}
|
||||||
|
@@ -40,6 +40,13 @@ public:
|
|||||||
|
|
||||||
// all generic methods are in wxControlWithItems
|
// all generic methods are in wxControlWithItems
|
||||||
|
|
||||||
|
// get the current selection: this can only be different from the normal
|
||||||
|
// selection if the popup items list is currently opened and the user
|
||||||
|
// selected some item in it but didn't close the list yet; otherwise (and
|
||||||
|
// currently always on platforms other than MSW) this is the same as
|
||||||
|
// GetSelection()
|
||||||
|
virtual int GetCurrentSelection() const { return GetSelection(); }
|
||||||
|
|
||||||
// set/get the number of columns in the control (as they're not supported on
|
// set/get the number of columns in the control (as they're not supported on
|
||||||
// most platforms, they do nothing by default)
|
// most platforms, they do nothing by default)
|
||||||
virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
|
virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
|
||||||
@@ -78,5 +85,4 @@ private:
|
|||||||
|
|
||||||
#endif // wxUSE_CHOICE
|
#endif // wxUSE_CHOICE
|
||||||
|
|
||||||
#endif
|
#endif // _WX_CHOICE_H_BASE_
|
||||||
// _WX_CHOICE_H_BASE_
|
|
||||||
|
@@ -59,6 +59,10 @@ public:
|
|||||||
virtual bool CanUndo() const = 0;
|
virtual bool CanUndo() const = 0;
|
||||||
virtual bool CanRedo() const = 0;
|
virtual bool CanRedo() const = 0;
|
||||||
|
|
||||||
|
// may return value different from GetSelection() when the combobox
|
||||||
|
// dropdown is shown and the user selected, but not yet accepted, a value
|
||||||
|
// different from the old one in it
|
||||||
|
virtual int GetCurrentSelection() const { return GetSelection(); }
|
||||||
|
|
||||||
// redeclare inherited SetSelection() overload here as well to avoid
|
// redeclare inherited SetSelection() overload here as well to avoid
|
||||||
// virtual function hiding
|
// virtual function hiding
|
||||||
|
@@ -66,7 +66,6 @@ public:
|
|||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
int GetSelection() const;
|
int GetSelection() const;
|
||||||
int GetCurrentSelection() const { return GetSelection(); }
|
|
||||||
void SetSelection(int n);
|
void SetSelection(int n);
|
||||||
|
|
||||||
virtual unsigned int GetCount() const;
|
virtual unsigned int GetCount() const;
|
||||||
|
@@ -66,7 +66,6 @@ public:
|
|||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
int GetSelection() const;
|
int GetSelection() const;
|
||||||
int GetCurrentSelection() const { return GetSelection(); }
|
|
||||||
virtual void SetSelection(int n);
|
virtual void SetSelection(int n);
|
||||||
|
|
||||||
virtual unsigned int GetCount() const;
|
virtual unsigned int GetCount() const;
|
||||||
|
@@ -75,7 +75,6 @@ public:
|
|||||||
virtual unsigned int GetCount() const ;
|
virtual unsigned int GetCount() const ;
|
||||||
virtual int GetSelection() const ;
|
virtual int GetSelection() const ;
|
||||||
virtual void SetSelection(int n);
|
virtual void SetSelection(int n);
|
||||||
int GetCurrentSelection() const { return GetSelection(); }
|
|
||||||
|
|
||||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||||
virtual wxString GetString(unsigned int n) const ;
|
virtual wxString GetString(unsigned int n) const ;
|
||||||
|
@@ -89,7 +89,6 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
|
|||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
virtual int GetSelection() const;
|
virtual int GetSelection() const;
|
||||||
int GetCurrentSelection() const { return GetSelection(); }
|
|
||||||
virtual void SetSelection(int n);
|
virtual void SetSelection(int n);
|
||||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||||
virtual wxString GetString(unsigned int n) const;
|
virtual wxString GetString(unsigned int n) const;
|
||||||
|
@@ -98,7 +98,6 @@ public:
|
|||||||
|
|
||||||
virtual unsigned int GetCount() const;
|
virtual unsigned int GetCount() const;
|
||||||
virtual int GetSelection(void) const;
|
virtual int GetSelection(void) const;
|
||||||
virtual int GetCurrentSelection(void) const { return GetSelection(); }
|
|
||||||
virtual void SetSelection(int n);
|
virtual void SetSelection(int n);
|
||||||
|
|
||||||
virtual wxString GetString(unsigned int n) const;
|
virtual wxString GetString(unsigned int n) const;
|
||||||
|
Reference in New Issue
Block a user