]> git.saurik.com Git - wxWidgets.git/blob - include/wx/univ/radiobut.h
Added MSWPositionForWxMenu() method which is used to translate wxWindows
[wxWidgets.git] / include / wx / univ / radiobut.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/radiobut.h
3 // Purpose: wxRadioButton declaration
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 10.09.00
7 // RCS-ID: $Id$
8 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_UNIV_RADIOBUT_H_
13 #define _WX_UNIV_RADIOBUT_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "univradiobut.h"
17 #endif
18
19 #include "wx/checkbox.h"
20
21 // ----------------------------------------------------------------------------
22 // wxRadioButton
23 // ----------------------------------------------------------------------------
24
25 class WXDLLEXPORT wxRadioButton : public wxCheckBox
26 {
27 public:
28 // constructors
29 wxRadioButton();
30
31 wxRadioButton(wxWindow *parent,
32 wxWindowID id,
33 const wxString& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxRadioButtonNameStr);
39
40 bool Create(wxWindow *parent,
41 wxWindowID id,
42 const wxString& label,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = 0,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxRadioButtonNameStr);
48
49 // override some base class methods
50 virtual void ChangeValue(bool value);
51
52 protected:
53 // implement our own drawing
54 virtual void DoDraw(wxControlRenderer *renderer);
55
56 // we use the radio button bitmaps for size calculation
57 virtual wxSize GetBitmapSize() const;
58
59 // the radio button can only be cleared using this method, not
60 // ChangeValue() above - and it is protected as it can only be called by
61 // another radiobutton
62 void ClearValue();
63
64 // called when the radio button becomes checked: we clear all the buttons
65 // in the same group with us here
66 virtual void OnCheck();
67
68 // send event about radio button selection
69 virtual void SendEvent();
70
71 private:
72 DECLARE_DYNAMIC_CLASS(wxRadioButton)
73 };
74
75 #endif // _WX_UNIV_RADIOBUT_H_