1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxRadioBox class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBOX_H_
13 #define _WX_RADIOBOX_H_
16 class WXDLLEXPORT wxBitmap
;
18 class WXDLLEXPORT wxRadioButton
;
20 class WXDLLEXPORT wxRadioBox
: public wxControl
, public wxRadioBoxBase
22 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
24 // Constructors & destructor
26 inline wxRadioBox(wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
27 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
28 int n
= 0, const wxString choices
[] = NULL
,
29 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
30 const wxValidator
& val
= wxDefaultValidator
, const wxString
& name
= wxRadioBoxNameStr
)
32 Create(parent
, id
, title
, pos
, size
, n
, choices
, majorDim
, style
, val
, name
);
34 inline wxRadioBox(wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
35 const wxPoint
& pos
, const wxSize
& size
,
36 const wxArrayString
& choices
,
37 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
38 const wxValidator
& val
= wxDefaultValidator
,
39 const wxString
& name
= wxRadioBoxNameStr
)
41 Create(parent
, id
, title
, pos
, size
, choices
,
42 majorDim
, style
, val
, name
);
45 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
46 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
47 int n
= 0, const wxString choices
[] = NULL
,
48 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
49 const wxValidator
& val
= wxDefaultValidator
, const wxString
& name
= wxRadioBoxNameStr
);
50 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
51 const wxPoint
& pos
, const wxSize
& size
,
52 const wxArrayString
& choices
,
53 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
54 const wxValidator
& val
= wxDefaultValidator
,
55 const wxString
& name
= wxRadioBoxNameStr
);
57 // Specific functions (in wxWidgets2 reference)
58 virtual void SetSelection(int item
);
59 virtual int GetSelection() const;
61 inline virtual int GetCount() const { return m_noItems
; } ;
63 virtual wxString
GetString(int item
) const;
64 virtual void SetString(int item
, const wxString
& label
) ;
66 virtual bool Enable(int item
, bool enable
= true);
67 virtual bool Show(int item
, bool show
= true);
69 virtual int GetColumnCount() const ;
70 virtual int GetRowCount() const ;
72 virtual bool Enable(bool enable
= true);
73 virtual wxString
GetLabel() const;
74 virtual void SetLabel(const wxString
& label
) ;
75 virtual bool Show(bool show
= true);
77 // Other external functions
78 void Command(wxCommandEvent
& event
);
81 // Other variable access functions
82 inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols
; }
83 inline void SetNumberOfRowsOrCols(int n
) { m_noRowsOrCols
= n
; }
85 void OnRadioButton( wxCommandEvent
& event
) ;
87 wxRadioButton
*m_radioButtonCycle
;
94 virtual wxSize
DoGetBestSize() const ;
95 virtual void DoSetSize(int x
, int y
,
96 int width
, int height
,
97 int sizeFlags
= wxSIZE_AUTO
);