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_
15 #if defined(__GNUG__) && !defined(__APPLE__)
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 virtual void SetSelection(int item
);
47 virtual int GetSelection() const;
49 inline virtual int GetCount() const { return m_noItems
; } ;
51 virtual wxString
GetString(int item
) const;
52 virtual void SetString(int item
, const wxString
& label
) ;
54 virtual void Enable(int item
, bool enable
);
55 virtual void Show(int item
, bool show
) ;
57 virtual int GetColumnCount() const ;
58 virtual int GetRowCount() const ;
61 virtual bool Enable(bool enable
= TRUE
);
62 virtual wxString
GetLabel() const;
63 virtual void SetLabel(const wxString
& label
) ;
64 virtual bool Show(bool show
= TRUE
);
66 // Other external functions
67 void Command(wxCommandEvent
& event
);
70 // Other variable access functions
71 inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols
; }
72 inline void SetNumberOfRowsOrCols(int n
) { m_noRowsOrCols
= n
; }
74 void OnRadioButton( wxCommandEvent
& event
) ;
76 wxRadioButton
*m_radioButtonCycle
;
83 virtual wxSize
DoGetBestSize() const ;
84 virtual void DoSetSize(int x
, int y
,
85 int width
, int height
,
86 int sizeFlags
= wxSIZE_AUTO
);