]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/checkbox.h
wxMSWUniv wxWindowMSW vs. wxWindow fix.
[wxWidgets.git] / include / wx / gtk / checkbox.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/checkbox.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef __GTKCHECKBOXH__
11#define __GTKCHECKBOXH__
12
13#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
14#pragma interface
15#endif
16
17// ----------------------------------------------------------------------------
18// wxCheckBox
19// ----------------------------------------------------------------------------
20
21class wxCheckBox : public wxCheckBoxBase
22{
23public:
24 wxCheckBox();
25 wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize, long style = 0,
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxCheckBoxNameStr)
30 {
31 Create(parent, id, label, pos, size, style, validator, name);
32 }
33 bool Create(wxWindow *parent,
34 wxWindowID id,
35 const wxString& label,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxCheckBoxNameStr );
41
42 void SetValue( bool state );
43 bool GetValue() const;
44
45 virtual void SetLabel( const wxString& label );
46 virtual bool Enable( bool enable = TRUE );
47
48 static wxVisualAttributes
49 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
50
51 // implementation
52 // --------------
53
54 void DoApplyWidgetStyle(GtkRcStyle *style);
55 bool IsOwnGtkWindow( GdkWindow *window );
56 void OnInternalIdle();
57
58 GtkWidget *m_widgetCheckbox;
59 GtkWidget *m_widgetLabel;
60
61 bool m_blockEvent;
62
63protected:
64 virtual wxSize DoGetBestSize() const;
65
66#ifdef __WXGTK20__
67 void DoSet3StateValue(wxCheckBoxState state);
68 wxCheckBoxState DoGet3StateValue() const;
69#endif
70
71private:
72 DECLARE_DYNAMIC_CLASS(wxCheckBox)
73};
74
75#endif // __GTKCHECKBOXH__