1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/radiobox.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_RADIOBOX_H_
11 #define _WX_GTK_RADIOBOX_H_
13 #include "wx/bitmap.h"
15 //-----------------------------------------------------------------------------
17 //-----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxRadioBox
: public wxControl
,
24 wxRadioBox() { Init(); }
25 wxRadioBox(wxWindow
*parent
,
27 const wxString
& title
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
31 const wxString choices
[] = (const wxString
*) NULL
,
33 long style
= wxRA_HORIZONTAL
,
34 const wxValidator
& val
= wxDefaultValidator
,
35 const wxString
& name
= wxRadioBoxNameStr
)
39 Create( parent
, id
, title
, pos
, size
, n
, choices
, majorDim
, style
, val
, name
);
42 wxRadioBox(wxWindow
*parent
,
44 const wxString
& title
,
47 const wxArrayString
& choices
,
49 long style
= wxRA_HORIZONTAL
,
50 const wxValidator
& val
= wxDefaultValidator
,
51 const wxString
& name
= wxRadioBoxNameStr
)
55 Create( parent
, id
, title
, pos
, size
, choices
, majorDim
, style
, val
, name
);
58 bool Create(wxWindow
*parent
,
60 const wxString
& title
,
61 const wxPoint
& pos
= wxDefaultPosition
,
62 const wxSize
& size
= wxDefaultSize
,
64 const wxString choices
[] = (const wxString
*) NULL
,
66 long style
= wxRA_HORIZONTAL
,
67 const wxValidator
& val
= wxDefaultValidator
,
68 const wxString
& name
= wxRadioBoxNameStr
);
69 bool Create(wxWindow
*parent
,
71 const wxString
& title
,
74 const wxArrayString
& choices
,
76 long style
= wxRA_HORIZONTAL
,
77 const wxValidator
& val
= wxDefaultValidator
,
78 const wxString
& name
= wxRadioBoxNameStr
);
80 virtual ~wxRadioBox();
83 // implement wxItemContainerImmutable methods
84 virtual unsigned int GetCount() const;
86 virtual wxString
GetString(unsigned int n
) const;
87 virtual void SetString(unsigned int n
, const wxString
& s
);
89 virtual void SetSelection(int n
);
90 virtual int GetSelection() const;
93 // implement wxRadioBoxBase methods
94 virtual bool Show(unsigned int n
, bool show
= true);
95 virtual bool Enable(unsigned int n
, bool enable
= true);
97 virtual bool IsItemEnabled(unsigned int n
) const;
98 virtual bool IsItemShown(unsigned int n
) const;
101 // override some base class methods to operate on radiobox itself too
102 virtual bool Show( bool show
= true );
103 virtual bool Enable( bool enable
= true );
105 virtual void SetLabel( const wxString
& label
);
107 static wxVisualAttributes
108 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
114 void GtkDisableEvents();
115 void GtkEnableEvents();
116 bool IsOwnGtkWindow( GdkWindow
*window
);
117 void DoApplyWidgetStyle(GtkRcStyle
*style
);
119 void ApplyToolTip( GtkTooltips
*tips
, const wxChar
*tip
);
120 #endif // wxUSE_TOOLTIPS
122 virtual void OnInternalIdle();
129 // common part of all ctors
133 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
136 #endif // _WX_GTK_RADIOBOX_H_