]>
git.saurik.com Git - wxWidgets.git/blob - interface/tglbtn.h
27e10963e7d65078aa43fc6d03b638f5b494f7c1
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.
109 Toggle button identifier. The value wxID_ANY indicates a default value.
111 Text to be displayed next to the toggle button.
113 Toggle button position. If wxDefaultPosition is specified then a
114 default position is chosen.
116 Toggle button size. If wxDefaultSize is specified then a
117 default size is chosen.
119 Window style. See wxToggleButton.
125 @see Create(), wxValidator
128 wxToggleButton(wxWindow
* parent
, wxWindowID id
,
129 const wxString
& label
,
130 const wxPoint
& pos
= wxDefaultPosition
,
131 const wxSize
& size
= wxDefaultSize
,
133 const wxValidator
& val
,
134 const wxString
& name
= "checkBox");
138 Destructor, destroying the toggle button.
143 Creates the toggle button for two-step construction. See wxToggleButton()
146 bool Create(wxWindow
* parent
, wxWindowID id
,
147 const wxString
& label
,
148 const wxPoint
& pos
= wxDefaultPosition
,
149 const wxSize
& size
= wxDefaultSize
,
151 const wxValidator
& val
,
152 const wxString
& name
= "checkBox");
155 Gets the state of the toggle button.
157 @returns Returns @true if it is pressed, @false otherwise.
162 Sets the toggle button to the given state. This does not cause a
163 @c EVT_TOGGLEBUTTON event to be emitted.
166 If @true, the button is pressed.
168 void SetValue(bool state
);