X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f6f938f3ae351311188f4d95124d51bf44e0f75..31ad423e4fb556ec225a63b161154d3bf3445c1b:/include/wx/gtk1/combobox.h diff --git a/include/wx/gtk1/combobox.h b/include/wx/gtk1/combobox.h index 54f5d30cf7..c4c7bf3d89 100644 --- a/include/wx/gtk1/combobox.h +++ b/include/wx/gtk1/combobox.h @@ -54,6 +54,17 @@ public: { Create(parent, id, value, pos, size, n, choices, style, validator, name); } + inline wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Create(parent, id, value, pos, size, choices, style, validator, name); + } ~wxComboBox(); @@ -65,6 +76,14 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); void Clear(); void Delete( int n ); @@ -77,7 +96,7 @@ public: int Number() const { return GetCount(); } void SetSelection( int n ); void Select( int n ) { return SetSelection( n ); } - void SetStringSelection( const wxString &string ); + bool SetStringSelection( const wxString &string ); void SetString(int n, const wxString &text); wxString GetValue() const; @@ -111,10 +130,13 @@ public: void EnableEvents(); GtkWidget* GetConnectWidget(); bool IsOwnGtkWindow( GdkWindow *window ); - void ApplyWidgetStyle(); + void DoApplyWidgetStyle(GtkRcStyle *style); wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + protected: virtual int DoAppend(const wxString& item); virtual int DoInsert(const wxString& item, int pos); @@ -126,6 +148,10 @@ protected: virtual wxSize DoGetBestSize() const; + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return true; } + private: DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox) DECLARE_EVENT_TABLE()