1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/radiobox.h
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_GTK_RADIOBOX_H_
10 #define _WX_GTK_RADIOBOX_H_
12 #include "wx/bitmap.h"
14 //-----------------------------------------------------------------------------
16 //-----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxRadioBox
: public wxControl
,
23 wxRadioBox() { Init(); }
24 wxRadioBox(wxWindow
*parent
,
26 const wxString
& title
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
30 const wxString choices
[] = (const wxString
*) NULL
,
32 long style
= wxRA_SPECIFY_COLS
,
33 const wxValidator
& val
= wxDefaultValidator
,
34 const wxString
& name
= wxRadioBoxNameStr
)
38 Create( parent
, id
, title
, pos
, size
, n
, choices
, majorDim
, style
, val
, name
);
41 wxRadioBox(wxWindow
*parent
,
43 const wxString
& title
,
46 const wxArrayString
& choices
,
48 long style
= wxRA_SPECIFY_COLS
,
49 const wxValidator
& val
= wxDefaultValidator
,
50 const wxString
& name
= wxRadioBoxNameStr
)
54 Create( parent
, id
, title
, pos
, size
, choices
, majorDim
, style
, val
, name
);
57 bool Create(wxWindow
*parent
,
59 const wxString
& title
,
60 const wxPoint
& pos
= wxDefaultPosition
,
61 const wxSize
& size
= wxDefaultSize
,
63 const wxString choices
[] = (const wxString
*) NULL
,
65 long style
= wxRA_SPECIFY_COLS
,
66 const wxValidator
& val
= wxDefaultValidator
,
67 const wxString
& name
= wxRadioBoxNameStr
);
68 bool Create(wxWindow
*parent
,
70 const wxString
& title
,
73 const wxArrayString
& choices
,
75 long style
= wxRA_SPECIFY_COLS
,
76 const wxValidator
& val
= wxDefaultValidator
,
77 const wxString
& name
= wxRadioBoxNameStr
);
79 virtual ~wxRadioBox();
82 // implement wxItemContainerImmutable methods
83 virtual unsigned int GetCount() const;
85 virtual wxString
GetString(unsigned int n
) const;
86 virtual void SetString(unsigned int n
, const wxString
& s
);
88 virtual void SetSelection(int n
);
89 virtual int GetSelection() const;
92 // implement wxRadioBoxBase methods
93 virtual bool Show(unsigned int n
, bool show
= true);
94 virtual bool Enable(unsigned int n
, bool enable
= true);
96 virtual bool IsItemEnabled(unsigned int n
) const;
97 virtual bool IsItemShown(unsigned int n
) const;
100 // override some base class methods to operate on radiobox itself too
101 virtual bool Show( bool show
= true );
102 virtual bool Enable( bool enable
= true );
104 virtual void SetLabel( const wxString
& label
);
106 static wxVisualAttributes
107 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
113 void GtkDisableEvents();
114 void GtkEnableEvents();
115 bool IsOwnGtkWindow( GdkWindow
*window
);
116 void DoApplyWidgetStyle(GtkRcStyle
*style
);
118 void ApplyToolTip( GtkTooltips
*tips
, const wxChar
*tip
);
119 #endif // wxUSE_TOOLTIPS
121 virtual void OnInternalIdle();
128 // common part of all ctors
132 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
135 #endif // _WX_GTK_RADIOBOX_H_