X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d522606d0a1dfd22bcdc1a386b3dca01fa985e3..ad0ac642d5764497804bee2caad4fc1f20fc6cea:/include/wx/gtk/choice.h?ds=sidebyside diff --git a/include/wx/gtk/choice.h b/include/wx/gtk/choice.h index 17ae9edeb2..f3c28565c9 100644 --- a/include/wx/gtk/choice.h +++ b/include/wx/gtk/choice.h @@ -21,7 +21,7 @@ class WXDLLIMPEXP_BASE wxArrayString; // wxChoice //----------------------------------------------------------------------------- -class wxChoice : public wxChoiceBase +class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase { public: wxChoice(); @@ -70,6 +70,9 @@ public: void Clear(); int GetSelection() const; +#if wxABI_VERSION >= 20602 + int GetCurrentSelection() const { return GetSelection(); } +#endif void SetSelection( int n ); virtual int GetCount() const; @@ -83,7 +86,7 @@ public: protected: wxList m_clientList; // contains the client data for the items - void ApplyWidgetStyle(); + void DoApplyWidgetStyle(GtkRcStyle *style); virtual int DoAppend(const wxString& item); virtual int DoInsert(const wxString& item, int pos); @@ -104,6 +107,12 @@ private: // allocate it if it's needed (hence using pointer) wxSortedArrayString *m_strings; +public: + // this circumvents a GTK+ 2.0 bug so that the selection is + // invalidated properly + int m_selection_hack; + +private: DECLARE_DYNAMIC_CLASS(wxChoice) };