1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by: Wlodzimierz ABX Skiba - native wxRadioButton implementation
8 // Copyright: (c) William Osborne, Wlodzimierz Skiba
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBUT_H_
13 #define _WX_RADIOBUT_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "radiobut.h"
19 class WXDLLEXPORT wxRadioButton
: public wxControl
22 // ctors and creation functions
23 wxRadioButton() { Init(); }
25 wxRadioButton(wxWindow
*parent
,
27 const wxString
& label
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxRadioButtonNameStr
)
36 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
,
41 const wxString
& label
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
& name
= wxRadioButtonNameStr
);
48 // implement the radio button interface
49 virtual void SetValue(bool value
);
50 virtual bool GetValue() const;
52 // implementation only from now on
53 virtual void Command(wxCommandEvent
& event
);
54 void SetGroup(uint8_t group
);
56 // send a notification event, return true if processed
57 bool SendClickEvent();
59 virtual void ApplyParentThemeBackground(const wxColour
& bg
)
60 { SetBackgroundColour(bg
); }
64 virtual wxSize
DoGetBestSize() const;
67 // common part of all ctors
72 // pushButtonCtl or checkboxCtl
73 ControlStyleType m_radioStyle
;
74 DECLARE_DYNAMIC_CLASS_NO_COPY(wxRadioButton
)