]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/tglbtn.h
wxDialogBase only has one ctor, so just do initialization in ctor instead of Init()
[wxWidgets.git] / include / wx / osx / tglbtn.h
CommitLineData
6762286d 1/////////////////////////////////////////////////////////////////////////////
526954c5 2// Name: wx/osx/tglbtn.h
6762286d
SC
3// Purpose: Declaration of the wxToggleButton class, which implements a
4// toggle button under wxMac.
5// Author: Stefan Csomor
6// Modified by:
7// Created: 08.02.01
6762286d 8// Copyright: (c) 2004 Stefan Csomor
526954c5 9// Licence: wxWindows licence
6762286d
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_TOGGLEBUTTON_H_
13#define _WX_TOGGLEBUTTON_H_
14
b4354db1 15class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
6762286d
SC
16{
17public:
b4354db1
VZ
18 wxToggleButton() {}
19 wxToggleButton(wxWindow *parent,
6762286d 20 wxWindowID id,
b4354db1 21 const wxString& label,
6762286d
SC
22 const wxPoint& pos = wxDefaultPosition,
23 const wxSize& size = wxDefaultSize,
24 long style = 0,
25 const wxValidator& validator = wxDefaultValidator,
26 const wxString& name = wxCheckBoxNameStr)
27 {
28 Create(parent, id, label, pos, size, style, validator, name);
29 }
30
31 bool Create(wxWindow *parent,
32 wxWindowID id,
b4354db1 33 const wxString& label,
6762286d
SC
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxCheckBoxNameStr);
39
40 virtual void SetValue(bool value);
41 virtual bool GetValue() const ;
42
12b5f4b4 43 virtual bool OSXHandleClicked( double timestampsec );
6762286d
SC
44
45 virtual void Command(wxCommandEvent& event);
46
6762286d
SC
47protected:
48 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
6762286d
SC
49
50private:
b4354db1 51 DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
6762286d
SC
52};
53
54
b4354db1 55class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton
6762286d
SC
56{
57public:
b4354db1
VZ
58 wxBitmapToggleButton() {}
59 wxBitmapToggleButton(wxWindow *parent,
6762286d 60 wxWindowID id,
b4354db1 61 const wxBitmap& label,
6762286d
SC
62 const wxPoint& pos = wxDefaultPosition,
63 const wxSize& size = wxDefaultSize,
64 long style = 0,
65 const wxValidator& validator = wxDefaultValidator,
66 const wxString& name = wxCheckBoxNameStr)
67 {
68 Create(parent, id, label, pos, size, style, validator, name);
69 }
70
71 bool Create(wxWindow *parent,
72 wxWindowID id,
b4354db1 73 const wxBitmap& label,
6762286d
SC
74 const wxPoint& pos = wxDefaultPosition,
75 const wxSize& size = wxDefaultSize,
76 long style = 0,
77 const wxValidator& validator = wxDefaultValidator,
78 const wxString& name = wxCheckBoxNameStr);
79
6762286d 80private:
b4354db1 81 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
6762286d
SC
82};
83
84#endif // _WX_TOGGLEBUTTON_H_
85