]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/controls.i
Added regex to WXINC line (patch from Markus G)
[wxWidgets.git] / wxPython / src / controls.i
CommitLineData
7bf85405
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: controls.i
3// Purpose: Control (widget) classes for wxPython
4//
5// Author: Robin Dunn
6//
7// Created: 6/10/98
8// RCS-ID: $Id$
9// Copyright: (c) 1998 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
03e9bead 13%module controls
7bf85405 14
03e9bead 15%{
7bf85405
RD
16#include "helpers.h"
17#include <wx/slider.h>
62bd0874 18#include <wx/spinbutt.h>
f6bcfd97 19#include <wx/spinctrl.h>
cf694132 20#include <wx/dynarray.h>
8bf5d46e 21#include <wx/statline.h>
d1679124 22#include <wx/tglbtn.h>
fb5e0af0
RD
23
24#ifdef __WXMSW__
9c039d08
RD
25#if wxUSE_OWNER_DRAWN
26#include <wx/checklst.h>
27#endif
fb5e0af0 28#endif
c95e68d8
RD
29
30#ifdef __WXGTK__
31#include <wx/checklst.h>
32#endif
bb0054cd 33
7bf85405
RD
34%}
35
36//----------------------------------------------------------------------
37
38%include typemaps.i
39%include my_typemaps.i
40
41// Import some definitions of other classes, etc.
42%import _defs.i
43%import misc.i
44%import windows.i
45%import gdi.i
46%import events.i
47
b8b8dda7 48%pragma(python) code = "import wx"
9c039d08 49
7bf85405
RD
50//----------------------------------------------------------------------
51
2f90df85
RD
52%readonly
53wxValidator wxDefaultValidator;
54%readwrite
55
7bf85405
RD
56//----------------------------------------------------------------------
57
58class wxControl : public wxWindow {
59public:
9b3d3bc4
RD
60 wxControl(wxWindow *parent,
61 wxWindowID id,
b68dc582
RD
62 const wxPoint& pos=wxDefaultPosition,
63 const wxSize& size=wxDefaultSize,
9b3d3bc4 64 long style=0,
b68dc582 65 const wxValidator& validator=wxDefaultValidator,
9b3d3bc4
RD
66 const char* name="control");
67
f6bcfd97 68 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
6999b0d8 69
7bf85405 70 void Command(wxCommandEvent& event);
fb5e0af0 71 wxString GetLabel();
7bf85405
RD
72 void SetLabel(const wxString& label);
73};
74
6999b0d8 75
7bf85405
RD
76//----------------------------------------------------------------------
77
78class wxButton : public wxControl {
79public:
80 wxButton(wxWindow* parent, wxWindowID id, const wxString& label,
b68dc582
RD
81 const wxPoint& pos = wxDefaultPosition,
82 const wxSize& size = wxDefaultSize,
7bf85405 83 long style = 0,
b68dc582 84 const wxValidator& validator = wxDefaultValidator,
7bf85405 85 char* name = "button");
9c039d08 86
f6bcfd97 87 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 88
7bf85405 89 void SetDefault();
9b3d3bc4
RD
90 void SetBackgroundColour(const wxColour& colour);
91 void SetForegroundColour(const wxColour& colour);
7bf85405
RD
92};
93
6999b0d8
RD
94
95%inline %{
96 wxSize wxButton_GetDefaultSize() {
97 return wxButton::GetDefaultSize();
98 }
99%}
100
7bf85405
RD
101//----------------------------------------------------------------------
102
103class wxBitmapButton : public wxButton {
104public:
105 wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap,
b68dc582
RD
106 const wxPoint& pos = wxDefaultPosition,
107 const wxSize& size = wxDefaultSize,
7bf85405 108 long style = wxBU_AUTODRAW,
b68dc582 109 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
110 char* name = "button");
111
f6bcfd97 112 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 113
fb5e0af0 114 wxBitmap& GetBitmapLabel();
7bf85405
RD
115 wxBitmap& GetBitmapDisabled();
116 wxBitmap& GetBitmapFocus();
7bf85405
RD
117 wxBitmap& GetBitmapSelected();
118 void SetBitmapDisabled(const wxBitmap& bitmap);
119 void SetBitmapFocus(const wxBitmap& bitmap);
7bf85405 120 void SetBitmapSelected(const wxBitmap& bitmap);
fb5e0af0 121 void SetBitmapLabel(const wxBitmap& bitmap);
7bf85405 122
f6bcfd97
BP
123 void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
124 int GetMarginX() const { return m_marginX; }
125 int GetMarginY() const { return m_marginY; }
7bf85405
RD
126};
127
128//----------------------------------------------------------------------
129
130class wxCheckBox : public wxControl {
131public:
132 wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label,
b68dc582
RD
133 const wxPoint& pos = wxDefaultPosition,
134 const wxSize& size = wxDefaultSize,
7bf85405 135 long style = 0,
b68dc582 136 const wxValidator& val = wxDefaultValidator,
7bf85405
RD
137 char* name = "checkBox");
138
f6bcfd97 139 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 140
7bf85405
RD
141 bool GetValue();
142 void SetValue(const bool state);
143};
144
145//----------------------------------------------------------------------
146
147class wxChoice : public wxControl {
148public:
149 wxChoice(wxWindow *parent, wxWindowID id,
b68dc582
RD
150 const wxPoint& pos = wxDefaultPosition,
151 const wxSize& size = wxDefaultSize,
eec92d76 152 int LCOUNT=0, wxString* choices=NULL,
7bf85405 153 long style = 0,
b68dc582 154 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
155 char* name = "choice");
156
f6bcfd97 157 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 158
7bf85405
RD
159 void Append(const wxString& item);
160 void Clear();
0adbc166 161 void Delete(int n);
7bf85405
RD
162 int FindString(const wxString& string);
163 int GetColumns();
164 int GetSelection();
165 wxString GetString(const int n);
166 wxString GetStringSelection();
0adbc166 167 int GetCount();
7bf85405
RD
168 void SetColumns(const int n = 1);
169 void SetSelection(const int n);
170 void SetStringSelection(const wxString& string);
0adbc166
RD
171 void SetString(int n, const wxString& s);
172
173 %pragma(python) addtoclass = "
174 Number = GetCount
175 Select = SetSelection
176 "
177
7bf85405
RD
178};
179
180//----------------------------------------------------------------------
181
bb0054cd 182class wxComboBox : public wxChoice {
7bf85405
RD
183public:
184 wxComboBox(wxWindow* parent, wxWindowID id, char* value = "",
b68dc582
RD
185 const wxPoint& pos = wxDefaultPosition,
186 const wxSize& size = wxDefaultSize,
eec92d76 187 int LCOUNT=0, wxString* choices=NULL,
7bf85405 188 long style = 0,
b68dc582 189 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
190 char* name = "comboBox");
191
f6bcfd97 192 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 193
7bf85405
RD
194 void Append(const wxString& item);
195 // TODO: void Append(const wxString& item, char* clientData);
196 void Clear();
197 void Copy();
198 void Cut();
199 void Delete(int n);
200 // NotMember??: void Deselect(int n);
201 int FindString(const wxString& string);
202 // TODO: char* GetClientData(const int n);
203 long GetInsertionPoint();
204 long GetLastPosition();
205 int GetSelection();
206 wxString GetString(int n);
207 wxString GetStringSelection();
208 wxString GetValue();
7bf85405
RD
209 void Paste();
210 void Replace(long from, long to, const wxString& text);
211 void Remove(long from, long to);
212 // TODO: void SetClientData(const int n, char* data);
213 void SetInsertionPoint(long pos);
214 void SetInsertionPointEnd();
1d99702e 215 void SetSelection(int n);
7bf85405
RD
216 %name(SetMark)void SetSelection(long from, long to);
217 void SetValue(const wxString& text);
0adbc166 218 void SetEditable(bool editable);
7bf85405
RD
219};
220
221//----------------------------------------------------------------------
222
223class wxGauge : public wxControl {
224public:
225 wxGauge(wxWindow* parent, wxWindowID id, int range,
b68dc582
RD
226 const wxPoint& pos = wxDefaultPosition,
227 const wxSize& size = wxDefaultSize,
7bf85405 228 long style = wxGA_HORIZONTAL,
b68dc582 229 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
230 char* name = "gauge");
231
f6bcfd97 232 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 233
7bf85405
RD
234 int GetBezelFace();
235 int GetRange();
236 int GetShadowWidth();
237 int GetValue();
238 void SetBezelFace(int width);
239 void SetRange(int range);
240 void SetShadowWidth(int width);
241 void SetValue(int pos);
242};
243
244//----------------------------------------------------------------------
245
246class wxStaticBox : public wxControl {
247public:
248 wxStaticBox(wxWindow* parent, wxWindowID id, const wxString& label,
b68dc582
RD
249 const wxPoint& pos = wxDefaultPosition,
250 const wxSize& size = wxDefaultSize,
7bf85405
RD
251 long style = 0,
252 char* name = "staticBox");
253};
254
255
bb0054cd
RD
256//----------------------------------------------------------------------
257
8bf5d46e 258
bb0054cd
RD
259class wxStaticLine : public wxControl {
260public:
261 wxStaticLine( wxWindow *parent, wxWindowID id,
b68dc582
RD
262 const wxPoint &pos = wxDefaultPosition,
263 const wxSize &size = wxDefaultSize,
bb0054cd 264 long style = wxLI_HORIZONTAL,
d24a34bb 265 const char* name = "staticLine" );
bb0054cd 266};
8bf5d46e 267
bb0054cd 268
7bf85405
RD
269//----------------------------------------------------------------------
270
271class wxStaticText : public wxControl {
272public:
273 wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label,
b68dc582
RD
274 const wxPoint& pos = wxDefaultPosition,
275 const wxSize& size = wxDefaultSize,
7bf85405
RD
276 long style = 0,
277 char* name = "staticText");
278
f6bcfd97 279 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 280
7bf85405
RD
281 wxString GetLabel();
282 void SetLabel(const wxString& label);
283};
284
285//----------------------------------------------------------------------
286
287class wxListBox : public wxControl {
288public:
289 wxListBox(wxWindow* parent, wxWindowID id,
b68dc582
RD
290 const wxPoint& pos = wxDefaultPosition,
291 const wxSize& size = wxDefaultSize,
eec92d76 292 int LCOUNT, wxString* choices = NULL,
7bf85405 293 long style = 0,
b68dc582 294 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
295 char* name = "listBox");
296
f6bcfd97 297 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 298
7bf85405
RD
299 void Append(const wxString& item);
300 // TODO: void Append(const wxString& item, char* clientData);
301 void Clear();
302 void Delete(int n);
303 void Deselect(int n);
304 int FindString(const wxString& string);
305 // TODO: char* GetClientData(const int n);
306 int GetSelection();
cf694132
RD
307
308 // int GetSelections(int **selections);
309 %addmethods {
310 PyObject* GetSelections() {
311 wxArrayInt lst;
312 self->GetSelections(lst);
313 PyObject *tup = PyTuple_New(lst.GetCount());
f6bcfd97 314 for(size_t i=0; i<lst.GetCount(); i++) {
cf694132
RD
315 PyTuple_SetItem(tup, i, PyInt_FromLong(lst[i]));
316 }
317 return tup;
318 }
319 }
320
eec92d76 321 void InsertItems(int LCOUNT, wxString* choices, int pos);
2f90df85 322
7bf85405
RD
323 wxString GetString(int n);
324 wxString GetStringSelection();
0adbc166
RD
325 int GetCount();
326 %pragma(python) addtoclass = "Number = GetCount"
327 bool IsSelected(const int n);
7bf85405 328 bool Selected(const int n);
eec92d76 329 void Set(int LCOUNT, wxString* choices);
7bf85405
RD
330 // TODO: void SetClientData(const int n, char* data);
331 void SetFirstItem(int n);
332 %name(SetFirstItemStr)void SetFirstItem(const wxString& string);
333 void SetSelection(int n, bool select = TRUE);
334 void SetString(int n, const wxString& string);
335 void SetStringSelection(const wxString& string, bool select = TRUE);
336};
337
338
9c039d08
RD
339//----------------------------------------------------------------------
340
9c039d08
RD
341class wxCheckListBox : public wxListBox {
342public:
343 wxCheckListBox(wxWindow *parent, wxWindowID id,
b68dc582
RD
344 const wxPoint& pos = wxDefaultPosition,
345 const wxSize& size = wxDefaultSize,
9c039d08 346 int LCOUNT = 0,
eec92d76 347 wxString* choices = NULL,
9c039d08 348 long style = 0,
b68dc582 349 const wxValidator& validator = wxDefaultValidator,
9c039d08
RD
350 char* name = "listBox");
351
f6bcfd97 352 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08
RD
353
354 bool IsChecked(int uiIndex);
694759cf 355 void Check(int uiIndex, int bCheck = TRUE);
eec92d76 356 void InsertItems(int LCOUNT, wxString* choices, int pos);
9c039d08
RD
357
358 int GetItemHeight();
359};
9c039d08 360
7bf85405
RD
361//----------------------------------------------------------------------
362
d56cebe7
RD
363
364class wxTextAttr
365{
366public:
367 // ctors
368 wxTextAttr(const wxColour& colText = wxNullColour,
369 const wxColour& colBack = wxNullColour,
370 const wxFont& font = wxNullFont);
371 ~wxTextAttr();
372
373 // setters
374 void SetTextColour(const wxColour& colText);
375 void SetBackgroundColour(const wxColour& colBack);
376 void SetFont(const wxFont& font);
377
378 // accessors
379 bool HasTextColour() const;
380 bool HasBackgroundColour() const;
381 bool HasFont() const;
382
383 const wxColour& GetTextColour() const;
384 const wxColour& GetBackgroundColour() const;
385 const wxFont& GetFont() const;
386};
387
388
389
7bf85405
RD
390class wxTextCtrl : public wxControl {
391public:
392 wxTextCtrl(wxWindow* parent, wxWindowID id, char* value = "",
b68dc582
RD
393 const wxPoint& pos = wxDefaultPosition,
394 const wxSize& size = wxDefaultSize,
7bf85405 395 long style = 0,
b68dc582 396 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
397 char* name = "text");
398
f6bcfd97 399 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 400
7bf85405
RD
401 void Clear();
402 void Copy();
403 void Cut();
404 void DiscardEdits();
405 long GetInsertionPoint();
406 long GetLastPosition();
407 int GetLineLength(long lineNo);
408 wxString GetLineText(long lineNo);
409 int GetNumberOfLines();
410 wxString GetValue();
411 bool IsModified();
412 bool LoadFile(const wxString& filename);
413 void Paste();
414 void PositionToXY(long pos, long *OUTPUT, long *OUTPUT);
415 void Remove(long from, long to);
416 void Replace(long from, long to, const wxString& value);
417 bool SaveFile(const wxString& filename);
418 void SetEditable(bool editable);
419 void SetInsertionPoint(long pos);
420 void SetInsertionPointEnd();
421 void SetSelection(long from, long to);
422 void SetValue(const wxString& value);
423 void ShowPosition(long pos);
424 void WriteText(const wxString& text);
cf694132 425 void AppendText(const wxString& text);
7bf85405 426 long XYToPosition(long x, long y);
d403febc
RD
427
428 bool CanCopy();
429 bool CanCut();
430 bool CanPaste();
431 bool CanRedo();
432 bool CanUndo();
433 void GetSelection(long* OUTPUT, long* OUTPUT);
434 bool IsEditable();
b1462dfa
RD
435 void Undo();
436 void Redo();
437
d56cebe7
RD
438 bool SetStyle(long start, long end, const wxTextAttr& style);
439 bool SetDefaultStyle(const wxTextAttr& style);
440 const wxTextAttr& GetDefaultStyle() const;
441
b1462dfa
RD
442 %addmethods {
443 void write(const wxString& text) {
d56cebe7 444 self->AppendText(text);
b1462dfa
RD
445 }
446 }
7bf85405
RD
447};
448
449//----------------------------------------------------------------------
450
451class wxScrollBar : public wxControl {
452public:
453 wxScrollBar(wxWindow* parent, wxWindowID id = -1,
b68dc582
RD
454 const wxPoint& pos = wxDefaultPosition,
455 const wxSize& size = wxDefaultSize,
7bf85405 456 long style = wxSB_HORIZONTAL,
b68dc582 457 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
458 char* name = "scrollBar");
459
f6bcfd97 460 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 461
7bf85405
RD
462 int GetRange();
463 int GetPageSize();
b8b8dda7 464 int GetThumbPosition();
7bf85405 465 int GetThumbSize();
26b9cf27 466 %name(GetThumbLength) int GetThumbSize(); // to match the docs
b8b8dda7 467 void SetThumbPosition(int viewStart);
7bf85405
RD
468 void SetScrollbar(int position, int thumbSize,
469 int range, int pageSize,
470 bool refresh = TRUE);
471};
472
473//----------------------------------------------------------------------
474
475class wxSpinButton : public wxControl {
476public:
477 wxSpinButton(wxWindow* parent, wxWindowID id = -1,
b68dc582
RD
478 const wxPoint& pos = wxDefaultPosition,
479 const wxSize& size = wxDefaultSize,
7bf85405
RD
480 long style = wxSP_HORIZONTAL,
481 char* name = "spinButton");
482
483 int GetMax();
484 int GetMin();
485 int GetValue();
486 void SetRange(int min, int max);
487 void SetValue(int value);
488};
489
490//----------------------------------------------------------------------
491
492class wxStaticBitmap : public wxControl {
493public:
494 wxStaticBitmap(wxWindow* parent, wxWindowID id,
495 const wxBitmap& bitmap,
b68dc582
RD
496 const wxPoint& pos = wxDefaultPosition,
497 const wxSize& size = wxDefaultSize,
7bf85405
RD
498 long style = 0,
499 char* name = "staticBitmap");
500
f6bcfd97 501 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 502
cf694132 503 const wxBitmap& GetBitmap();
7bf85405 504 void SetBitmap(const wxBitmap& bitmap);
8bf5d46e 505 void SetIcon(const wxIcon& icon);
7bf85405
RD
506};
507
508//----------------------------------------------------------------------
509
510class wxRadioBox : public wxControl {
511public:
512 wxRadioBox(wxWindow* parent, wxWindowID id,
513 const wxString& label,
b68dc582
RD
514 const wxPoint& point = wxDefaultPosition,
515 const wxSize& size = wxDefaultSize,
eec92d76 516 int LCOUNT = 0, wxString* choices = NULL,
7bf85405
RD
517 int majorDimension = 0,
518 long style = wxRA_HORIZONTAL,
b68dc582 519 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
520 char* name = "radioBox");
521
f6bcfd97 522 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 523
0699c864
RD
524 void Enable(bool enable);
525 %name(EnableItem)void Enable(int n, bool enable);
7bf85405 526 int FindString(const wxString& string);
bb0054cd 527
7bf85405 528 wxString GetString(int n);
2c8a649d
RD
529
530#ifdef __WXMSW__
0adbc166
RD
531 void SetString(int n, const wxString& label);
532 %pragma(python) addtoclass = "
533 GetItemLabel = GetString
534 SetItemLabel = SetString
535 "
2c8a649d
RD
536 int GetColumnCount();
537 int GetRowCount();
538#else
539 %name(GetItemLabel)wxString GetLabel( int item );
540 %name(SetItemLabel)void SetLabel( int item, const wxString& label );
541#endif
542
0adbc166 543 int GetSelection();
7bf85405 544 wxString GetStringSelection();
0adbc166
RD
545 int GetCount();
546 %pragma(python) addtoclass = "Number = GetCount"
547
7bf85405
RD
548 void SetSelection(int n);
549 void SetStringSelection(const wxString& string);
550 void Show(bool show);
551 %name(ShowItem)void Show(int item, bool show);
552};
553
554//----------------------------------------------------------------------
555
556class wxRadioButton : public wxControl {
557public:
558 wxRadioButton(wxWindow* parent, wxWindowID id,
559 const wxString& label,
b68dc582
RD
560 const wxPoint& pos = wxDefaultPosition,
561 const wxSize& size = wxDefaultSize,
7bf85405 562 long style = 0,
b68dc582 563 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
564 char* name = "radioButton");
565
f6bcfd97 566 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 567
7bf85405
RD
568 bool GetValue();
569 void SetValue(bool value);
570};
571
572//----------------------------------------------------------------------
573
574class wxSlider : public wxControl {
575public:
576 wxSlider(wxWindow* parent, wxWindowID id,
577 int value, int minValue, int maxValue,
b68dc582
RD
578 const wxPoint& point = wxDefaultPosition,
579 const wxSize& size = wxDefaultSize,
7bf85405 580 long style = wxSL_HORIZONTAL,
b68dc582 581 const wxValidator& validator = wxDefaultValidator,
7bf85405
RD
582 char* name = "slider");
583
f6bcfd97 584 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
9c039d08 585
7bf85405
RD
586 void ClearSel();
587 void ClearTicks();
588 int GetLineSize();
589 int GetMax();
590 int GetMin();
591 int GetPageSize();
592 int GetSelEnd();
593 int GetSelStart();
594 int GetThumbLength();
595 int GetTickFreq();
596 int GetValue();
597 void SetRange(int minValue, int maxValue);
598 void SetTickFreq(int n, int pos);
599 void SetLineSize(int lineSize);
600 void SetPageSize(int pageSize);
601 void SetSelection(int startPos, int endPos);
602 void SetThumbLength(int len);
603 void SetTick(int tickPos);
604 void SetValue(int value);
605};
606
607
608//----------------------------------------------------------------------
609
f6bcfd97
BP
610class wxSpinCtrl : public wxSpinButton {
611public:
612 wxSpinCtrl(wxWindow *parent,
613 wxWindowID id = -1,
614 const char* value = "",
b68dc582
RD
615 const wxPoint& pos = wxDefaultPosition,
616 const wxSize& size = wxDefaultSize,
f6bcfd97
BP
617 long style = wxSP_ARROW_KEYS,
618 int min = 0, int max = 100, int initial = 0,
619 const char* name = "wxSpinCtrl");
620
621
c368d904
RD
622 int GetMax();
623 int GetMin();
624 int GetValue();
625 void SetRange(int min, int max);
626 void SetValue(int value);
627
f6bcfd97
BP
628};
629
630
631//----------------------------------------------------------------------
632
d1679124
RD
633enum { wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, };
634
635class wxToggleButton : public wxControl {
636public:
637 wxToggleButton(wxWindow *parent,
638 wxWindowID id,
639 const wxString& label,
640 const wxPoint& pos = wxDefaultPosition,
641 const wxSize& size = wxDefaultSize,
642 long style = 0,
643 const wxValidator& validator = wxDefaultValidator,
644 const char* name = "toggle");
645
646 void SetValue(bool value);
647 bool GetValue() const ;
648 void SetLabel(const wxString& label);
649
650};
651
652//----------------------------------------------------------------------
653//----------------------------------------------------------------------
654//----------------------------------------------------------------------
655
c368d904
RD
656
657