X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab7ce33c563651f790f99d64ee56727706047ae3..eaca2a2cfcdd82a877c966b4f702a5a460c8c4c4:/include/wx/gtk1/radiobox.h diff --git a/include/wx/gtk1/radiobox.h b/include/wx/gtk1/radiobox.h index 97a318bdcd..e426de643f 100644 --- a/include/wx/gtk1/radiobox.h +++ b/include/wx/gtk1/radiobox.h @@ -11,7 +11,7 @@ #ifndef __GTKRADIOBOXH__ #define __GTKRADIOBOXH__ -#if defined(__GNUG__) && !defined(__APPLE__) +#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 + // reutrn the total size needed to accomodate 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();