X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6b0d8a01d184b8d410238677b2cfc0e3059e1268..034e3041693f90324cfa4d282ef44e6063738d83:/include/wx/gtk/radiobox.h diff --git a/include/wx/gtk/radiobox.h b/include/wx/gtk/radiobox.h index dc3792341a..f506a1bbda 100644 --- a/include/wx/gtk/radiobox.h +++ b/include/wx/gtk/radiobox.h @@ -11,7 +11,7 @@ #ifndef __GTKRADIOBOXH__ #define __GTKRADIOBOXH__ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface #endif @@ -41,6 +41,21 @@ public: Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); } + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 1, + long style = wxRA_HORIZONTAL, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Init(); + + Create( parent, id, title, pos, size, choices, majorDim, style, val, name ); + } virtual ~wxRadioBox(); bool Create(wxWindow *parent, @@ -54,6 +69,16 @@ public: long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = wxRA_HORIZONTAL, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); int FindString( const wxString& s) const; void SetSelection( int n ); @@ -86,6 +111,9 @@ public: virtual bool Show( bool show = TRUE ); virtual bool Enable( bool enable = TRUE ); + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + // implementation // -------------- @@ -93,11 +121,14 @@ public: void GtkDisableEvents(); void GtkEnableEvents(); bool IsOwnGtkWindow( GdkWindow *window ); - void ApplyWidgetStyle(); + void DoApplyWidgetStyle(GtkRcStyle *style); #if wxUSE_TOOLTIPS void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); #endif // wxUSE_TOOLTIPS - wxSize LayoutItems(); + + // reposition the radio buttons correctly unless justCalc == true and + // return the total size needed to accommodate them + wxSize LayoutItems(bool justCalc) const; virtual void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); virtual void OnInternalIdle(); @@ -108,6 +139,9 @@ public: wxList m_boxes; protected: + // implement some base class methods + virtual wxSize DoGetBestSize() const; + // common part of all ctors void Init();