]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/tglbtn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/tglbtn.h
3 // Purpose: Declaration of the wxToggleButton class, which implements a
4 // toggle button under wxGTK.
5 // Author: John Norris, minor changes by Axel Schlueter
9 // Copyright: (c) 2000 Johnny C. Norris II
10 // License: Rocketeer license
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_GTK_TOGGLEBUTTON_H_
14 #define _WX_GTK_TOGGLEBUTTON_H_
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
26 extern const char *wxCheckBoxNameStr
;
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 class wxToggleButton
: public wxControl
35 // construction/destruction
37 wxToggleButton(wxWindow
*parent
,
39 const wxString
& label
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxCheckBoxNameStr
)
46 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
50 bool Create(wxWindow
*parent
,
52 const wxString
& label
,
53 const wxPoint
& pos
= wxDefaultPosition
,
54 const wxSize
& size
= wxDefaultSize
, long style
= 0,
55 const wxValidator
& validator
= wxDefaultValidator
,
56 const wxString
& name
= wxCheckBoxNameStr
);
59 void SetValue(bool state
);
60 bool GetValue() const;
63 void SetLabel(const wxString
& label
);
64 bool Enable(bool enable
= TRUE
);
70 void ApplyWidgetStyle();
71 bool IsOwnGtkWindow(GdkWindow
*window
);
73 virtual void OnInternalIdle();
74 virtual wxSize
DoGetBestSize() const;
77 DECLARE_DYNAMIC_CLASS(wxToggleButton
)
80 #endif // _WX_GTK_TOGGLEBUTTON_H_