1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxRadioBox class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBOX_H_
13 #define _WX_RADIOBOX_H_
16 #pragma interface "radiobox.h"
20 class WXDLLEXPORT wxBitmap
;
22 class WXDLLEXPORT wxRadioButton
;
24 class WXDLLEXPORT wxRadioBox
: public wxControl
, public wxRadioBoxBase
26 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
28 // Constructors & destructor
30 inline wxRadioBox(wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
31 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
32 int n
= 0, const wxString choices
[] = NULL
,
33 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
34 const wxValidator
& val
= wxDefaultValidator
, const wxString
& name
= wxRadioBoxNameStr
)
36 Create(parent
, id
, title
, pos
, size
, n
, choices
, majorDim
, style
, val
, name
);
39 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
40 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
41 int n
= 0, const wxString choices
[] = NULL
,
42 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
43 const wxValidator
& val
= wxDefaultValidator
, const wxString
& name
= wxRadioBoxNameStr
);
45 // Specific functions (in wxWindows2 reference)
46 bool Enable(bool enable
);
47 void Enable(int item
, bool enable
);
48 int FindString(const wxString
& s
) const;
49 wxString
GetLabel() const;
50 wxString
GetLabel(int item
) const;
51 int GetSelection() const;
52 wxString
GetString(int item
) const;
53 virtual wxString
GetStringSelection() const;
54 inline virtual int GetCount() const { return m_noItems
; } ;
55 void SetLabel(const wxString
& label
) ;
56 void SetLabel(int item
, const wxString
& label
) ;
57 void SetSelection(int item
);
58 virtual bool SetStringSelection(const wxString
& s
);
60 void Show(int item
, bool show
) ;
62 // Other external functions
63 void Command(wxCommandEvent
& event
);
66 // Other variable access functions
67 inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols
; }
68 inline void SetNumberOfRowsOrCols(int n
) { m_noRowsOrCols
= n
; }
70 void OnRadioButton( wxCommandEvent
& event
) ;
72 wxRadioButton
*m_radioButtonCycle
;
79 virtual void DoSetSize(int x
, int y
,
80 int width
, int height
,
81 int sizeFlags
= wxSIZE_AUTO
);
82 int GetNumHor() const;
83 int GetNumVer() const;