]>
git.saurik.com Git - wxWidgets.git/blob - interface/tglbtn.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxBitmapToggleButton class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxBitmapToggleButton
13 wxBitmapToggleButton is a wxToggleButton
14 that contains a bitmap instead of text.
16 This control emits an update UI event.
19 @event{EVT_TOGGLEBUTTON(id\, func)}:
20 Handles a toggle button click event.
25 @appearance{bitmaptogglebutton.png}
27 class wxBitmapToggleButton
: public wxControl
32 Constructor, creating and showing a toggle button with the bitmap @e label.
33 Internally calls Create().
35 wxBitmapToggleButton();
36 wxBitmapToggleButton(wxWindow
* parent
, wxWindowID id
,
37 const wxBitmap
& label
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
41 const wxValidator
& val
,
42 const wxString
& name
= "checkBox");
46 Create method for two-step construction.
48 bool Create(wxWindow
* parent
, wxWindowID id
,
49 const wxBitmap
& label
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
,
53 const wxValidator
& val
,
54 const wxString
& name
= "checkBox");
57 Gets the state of the toggle button.
59 @returns Returns @true if it is pressed, @false otherwise.
64 Sets the toggle button to the given state. This does not cause a
65 @c EVT_TOGGLEBUTTON event to be emitted.
68 If @true, the button is pressed.
70 void SetValue(bool state
);
78 wxToggleButton is a button that stays pressed when clicked by the user. In
79 other words, it is similar to wxCheckBox in
80 functionality but looks like a wxButton.
82 Since wxWidgets version 2.9.0 this control emits an update UI event.
84 You can see wxToggleButton in action in the sixth page of the
88 @event{EVT_TOGGLEBUTTON(id\, func)}:
89 Handles a toggle button click event.
94 @appearance{togglebutton.png}
97 wxCheckBox, wxButton, wxBitmapToggleButton
99 class wxToggleButton
: public wxControl
104 Constructor, creating and showing a toggle button.
107 Parent window. Must not be @NULL.
110 Toggle button identifier. The value wxID_ANY indicates a default value.
113 Text to be displayed next to the toggle button.
116 Toggle button position. If wxDefaultPosition is specified then a default
120 Toggle button size. If wxDefaultSize is specified then a default
124 Window style. See wxToggleButton.
132 @sa Create(), wxValidator
135 wxToggleButton(wxWindow
* parent
, wxWindowID id
,
136 const wxString
& label
,
137 const wxPoint
& pos
= wxDefaultPosition
,
138 const wxSize
& size
= wxDefaultSize
,
140 const wxValidator
& val
,
141 const wxString
& name
= "checkBox");
145 Destructor, destroying the toggle button.
150 Creates the toggle button for two-step construction. See wxToggleButton()
153 bool Create(wxWindow
* parent
, wxWindowID id
,
154 const wxString
& label
,
155 const wxPoint
& pos
= wxDefaultPosition
,
156 const wxSize
& size
= wxDefaultSize
,
158 const wxValidator
& val
,
159 const wxString
& name
= "checkBox");
162 Gets the state of the toggle button.
164 @returns Returns @true if it is pressed, @false otherwise.
169 Sets the toggle button to the given state. This does not cause a
170 @c EVT_TOGGLEBUTTON event to be emitted.
173 If @true, the button is pressed.
175 void SetValue(bool state
);