]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/checkbox.h
implemented text styles for GTK+
[wxWidgets.git] / include / wx / gtk1 / checkbox.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: checkbox.h
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
ff8bfdbb 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKCHECKBOXH__
11#define __GTKCHECKBOXH__
12
13#ifdef __GNUG__
14#pragma interface
15#endif
16
17#include "wx/defs.h"
dcf924a3
RR
18
19#if wxUSE_CHECKBOX
20
c801d85f
KB
21#include "wx/object.h"
22#include "wx/list.h"
23#include "wx/control.h"
24
25//-----------------------------------------------------------------------------
26// classes
27//-----------------------------------------------------------------------------
28
29class wxCheckBox;
30
31//-----------------------------------------------------------------------------
32// global data
33//-----------------------------------------------------------------------------
34
35extern const char *wxCheckBoxNameStr;
36
37//-----------------------------------------------------------------------------
38// wxCheckBox
39//-----------------------------------------------------------------------------
40
41class wxCheckBox: public wxControl
42{
ff8bfdbb 43public:
2cc0e28f 44 wxCheckBox();
ff8bfdbb
VZ
45 wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize, long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxCheckBoxNameStr)
6de97a3b 50 {
ff8bfdbb 51 Create(parent, id, label, pos, size, style, validator, name);
6de97a3b 52 }
2cc0e28f
VZ
53 bool Create(wxWindow *parent,
54 wxWindowID id,
55 const wxString& label,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
58 long style = 0,
59 const wxValidator& validator = wxDefaultValidator,
60 const wxString& name = wxCheckBoxNameStr );
61
debe6624 62 void SetValue( bool state );
83058c58 63 bool GetValue() const;
ff8bfdbb 64
83058c58 65 void SetLabel( const wxString& label );
f03fc89f 66 bool Enable( bool enable );
ff8bfdbb
VZ
67
68 // implementation
20e05ffb
RR
69 // --------------
70
ff8bfdbb 71 void ApplyWidgetStyle();
2f073eb2
RR
72 bool IsOwnGtkWindow( GdkWindow *window );
73 void OnInternalIdle();
58614078 74
2cc0e28f
VZ
75 GtkWidget *m_widgetCheckbox;
76 GtkWidget *m_widgetLabel;
738f9e5a 77
f68586e5
VZ
78protected:
79 virtual wxSize DoGetBestSize() const;
80
738f9e5a
RR
81private:
82 DECLARE_DYNAMIC_CLASS(wxCheckBox)
c801d85f
KB
83};
84
dcf924a3
RR
85#endif
86
c801d85f 87#endif // __GTKCHECKBOXH__