]> git.saurik.com Git - wxWidgets.git/blame - interface/tglbtn.h
latex include not properly working for links and titlepage
[wxWidgets.git] / interface / tglbtn.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: tglbtn.h
3// Purpose: documentation for wxBitmapToggleButton class
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxBitmapToggleButton
11 @wxheader{tglbtn.h}
7c913512 12
23324ae1
FM
13 wxBitmapToggleButton is a wxToggleButton
14 that contains a bitmap instead of text.
7c913512 15
23324ae1 16 This control emits an update UI event.
7c913512 17
23324ae1
FM
18 @beginEventTable
19 @event{EVT_TOGGLEBUTTON(id\, func)}:
20 Handles a toggle button click event.
21 @endEventTable
7c913512 22
23324ae1
FM
23 @library{wxcore}
24 @category{ctrl}
25 @appearance{bitmaptogglebutton.png}
26*/
27class wxBitmapToggleButton : public wxControl
28{
29public:
30 //@{
31 /**
32 Constructor, creating and showing a toggle button with the bitmap @e label.
33 Internally calls Create().
34 */
35 wxBitmapToggleButton();
7c913512
FM
36 wxBitmapToggleButton(wxWindow* parent, wxWindowID id,
37 const wxBitmap& label,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = 0,
41 const wxValidator& val,
42 const wxString& name = "checkBox");
23324ae1
FM
43 //@}
44
45 /**
46 Create method for two-step construction.
47 */
48 bool Create(wxWindow* parent, wxWindowID id,
49 const wxBitmap& label,
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& size = wxDefaultSize,
52 long style = 0,
53 const wxValidator& val,
54 const wxString& name = "checkBox");
55
56 /**
57 Gets the state of the toggle button.
58
59 @returns Returns @true if it is pressed, @false otherwise.
60 */
61 bool GetValue();
62
63 /**
64 Sets the toggle button to the given state. This does not cause a
65 @c EVT_TOGGLEBUTTON event to be emitted.
66
7c913512 67 @param state
23324ae1
FM
68 If @true, the button is pressed.
69 */
70 void SetValue(bool state);
71};
72
73
74/**
75 @class wxToggleButton
76 @wxheader{tglbtn.h}
7c913512 77
23324ae1
FM
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.
7c913512 81
23324ae1 82 Since wxWidgets version 2.9.0 this control emits an update UI event.
7c913512 83
23324ae1
FM
84 You can see wxToggleButton in action in the sixth page of the
85 controls sample.
7c913512 86
23324ae1
FM
87 @beginEventTable
88 @event{EVT_TOGGLEBUTTON(id\, func)}:
89 Handles a toggle button click event.
90 @endEventTable
7c913512 91
23324ae1
FM
92 @library{wxcore}
93 @category{ctrl}
94 @appearance{togglebutton.png}
7c913512 95
23324ae1
FM
96 @seealso
97 wxCheckBox, wxButton, wxBitmapToggleButton
98*/
99class wxToggleButton : public wxControl
100{
101public:
102 //@{
103 /**
104 Constructor, creating and showing a toggle button.
105
7c913512 106 @param parent
23324ae1
FM
107 Parent window. Must not be @NULL.
108
7c913512 109 @param id
23324ae1
FM
110 Toggle button identifier. The value wxID_ANY indicates a default value.
111
7c913512 112 @param label
23324ae1
FM
113 Text to be displayed next to the toggle button.
114
7c913512 115 @param pos
23324ae1
FM
116 Toggle button position. If wxDefaultPosition is specified then a default
117 position is chosen.
118
7c913512 119 @param size
23324ae1
FM
120 Toggle button size. If wxDefaultSize is specified then a default
121 size is chosen.
122
7c913512 123 @param style
23324ae1
FM
124 Window style. See wxToggleButton.
125
7c913512 126 @param validator
23324ae1
FM
127 Window validator.
128
7c913512 129 @param name
23324ae1
FM
130 Window name.
131
132 @sa Create(), wxValidator
133 */
134 wxToggleButton();
7c913512
FM
135 wxToggleButton(wxWindow* parent, wxWindowID id,
136 const wxString& label,
137 const wxPoint& pos = wxDefaultPosition,
138 const wxSize& size = wxDefaultSize,
139 long style = 0,
140 const wxValidator& val,
141 const wxString& name = "checkBox");
23324ae1
FM
142 //@}
143
144 /**
145 Destructor, destroying the toggle button.
146 */
147 ~wxToggleButton();
148
149 /**
150 Creates the toggle button for two-step construction. See wxToggleButton()
151 for details.
152 */
153 bool Create(wxWindow* parent, wxWindowID id,
154 const wxString& label,
155 const wxPoint& pos = wxDefaultPosition,
156 const wxSize& size = wxDefaultSize,
157 long style = 0,
158 const wxValidator& val,
159 const wxString& name = "checkBox");
160
161 /**
162 Gets the state of the toggle button.
163
164 @returns Returns @true if it is pressed, @false otherwise.
165 */
166 bool GetValue();
167
168 /**
169 Sets the toggle button to the given state. This does not cause a
170 @c EVT_TOGGLEBUTTON event to be emitted.
171
7c913512 172 @param state
23324ae1
FM
173 If @true, the button is pressed.
174 */
175 void SetValue(bool state);
176};