X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..7b4fde8255e2c5495b5c7c2b3234d19ac8c1e7cf:/include/wx/gtk1/choice.h diff --git a/include/wx/gtk1/choice.h b/include/wx/gtk1/choice.h index 17ae9edeb2..e8fc3a7f16 100644 --- a/include/wx/gtk1/choice.h +++ b/include/wx/gtk1/choice.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: choice.h +// Name: wx/gtk1/choice.h // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -10,10 +10,6 @@ #ifndef __GTKCHOICEH__ #define __GTKCHOICEH__ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "choice.h" -#endif - class WXDLLIMPEXP_BASE wxSortedArrayString; class WXDLLIMPEXP_BASE wxArrayString; @@ -21,7 +17,7 @@ class WXDLLIMPEXP_BASE wxArrayString; // wxChoice //----------------------------------------------------------------------------- -class wxChoice : public wxChoiceBase +class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase { public: wxChoice(); @@ -70,10 +66,11 @@ public: void Clear(); int GetSelection() const; + int GetCurrentSelection() const { return GetSelection(); } void SetSelection( int n ); virtual int GetCount() const; - int FindString( const wxString& string ) const; + virtual int FindString(const wxString& s, bool bCase = false) const; wxString GetString( int n ) const; void SetString( int n, const wxString& string ); @@ -83,7 +80,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 +101,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) };