]> git.saurik.com Git - wxWidgets.git/commitdiff
GetCurrentSelection() was documented but not present in all ports (just MSW and GTK...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 30 Oct 2006 16:04:27 +0000 (16:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 30 Oct 2006 16:04:27 +0000 (16:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/combobox.tex
include/wx/choice.h
include/wx/combobox.h
include/wx/gtk/choice.h
include/wx/gtk1/choice.h
include/wx/mac/carbon/choice.h
include/wx/mac/carbon/combobox.h
include/wx/os2/choice.h

index 76f9c1532419fc1221067eb35539962eb02ac7fc..2ffe9b44275c286dd1fe1675640d4168567e9655 100644 (file)
@@ -191,6 +191,16 @@ Copies the selected text to the clipboard.
 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}
 
 \constfunc{long}{GetInsertionPoint}{\void}
index 63f3267936f9e4457b97f472635b1efdd5559cff..16017f87ec36cc993b2e54820f1c35d6e6d32c69 100644 (file)
@@ -40,6 +40,13 @@ public:
 
     // 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
     // most platforms, they do nothing by default)
     virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
@@ -78,5 +85,4 @@ private:
 
 #endif // wxUSE_CHOICE
 
-#endif
-    // _WX_CHOICE_H_BASE_
+#endif // _WX_CHOICE_H_BASE_
index 6b361163eac045a7ab14128417025fa123781a78..cd19a9a5035a8edf4ce9333c5958983c024c0379 100644 (file)
@@ -59,6 +59,10 @@ public:
     virtual bool CanUndo() 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
     // virtual function hiding
index 172fb049d8abcbb2bffae6299fb84a54bd0d6561..a61d876403685fdfb648bfff71f912178eaacd6d 100644 (file)
@@ -66,7 +66,6 @@ public:
     void Clear();
 
     int GetSelection() const;
-    int GetCurrentSelection() const { return GetSelection(); }
     void SetSelection(int n);
 
     virtual unsigned int GetCount() const;
index 01539cbf1007e4ee62c78326c37c66a6718bae4d..9d80932e74a6b241ce5db4cbeffbdfb35336864c 100644 (file)
@@ -66,7 +66,6 @@ public:
     void Clear();
 
     int GetSelection() const;
-    int GetCurrentSelection() const { return GetSelection(); }
     virtual void SetSelection(int n);
 
     virtual unsigned int GetCount() const;
index aa7fd46ac3b1320863fd63137c56899b31c0158d..57f765da1bd968729fcc7f7ce349e97607332866 100644 (file)
@@ -75,7 +75,6 @@ public:
     virtual unsigned int GetCount() const ;
     virtual int GetSelection() const ;
     virtual void SetSelection(int n);
-    int GetCurrentSelection() const { return GetSelection(); }
 
     virtual int FindString(const wxString& s, bool bCase = false) const;
     virtual wxString GetString(unsigned int n) const ;
index 1622c07a18fccf4809eeab1b75bf092c4011d212..446b4b14a5e73cbe4f6e920fd7cad05a8967e084 100644 (file)
@@ -89,7 +89,6 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
     virtual void Clear();
 
     virtual int GetSelection() const;
-    int GetCurrentSelection() const { return GetSelection(); }
     virtual void SetSelection(int n);
     virtual int FindString(const wxString& s, bool bCase = false) const;
     virtual wxString GetString(unsigned int n) const;
index 1dbff3e6a6dca3c2e27dab35bde5b921edab55af..8054f2234422fe39a64df49439cd20cbfec36452 100644 (file)
@@ -98,7 +98,6 @@ public:
 
     virtual unsigned int GetCount() const;
     virtual int      GetSelection(void) const;
-    virtual int      GetCurrentSelection(void) const { return GetSelection(); }
     virtual void     SetSelection(int n);
 
     virtual wxString GetString(unsigned int n) const;