respect wxBU_NOTEXT style in wxButton
[wxWidgets.git] / include / wx / osx / button.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: button.h
3 // Purpose: wxButton class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // RCS-ID: $Id$
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_BUTTON_H_
13 #define _WX_BUTTON_H_
14
15 #include "wx/control.h"
16 #include "wx/gdicmn.h"
17
18 WXDLLIMPEXP_DATA_CORE(extern const char) wxButtonNameStr[];
19
20 // Pushbutton
21 class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
22 {
23 public:
24 wxButton() {}
25 wxButton(wxWindow *parent,
26 wxWindowID id,
27 const wxString& label = wxEmptyString,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = 0,
31 const wxValidator& validator = wxDefaultValidator,
32 const wxString& name = wxButtonNameStr)
33 {
34 Create(parent, id, label, pos, size, style, validator, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
39 const wxString& label = wxEmptyString,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxButtonNameStr);
45
46 static wxSize GetDefaultSize();
47
48 virtual void SetLabel(const wxString& label);
49 virtual wxWindow *SetDefault();
50 virtual void Command(wxCommandEvent& event);
51
52 // osx specific event handling common for all osx-ports
53
54 virtual bool OSXHandleClicked( double timestampsec );
55
56 protected:
57 virtual wxSize DoGetBestSize() const ;
58
59 DECLARE_DYNAMIC_CLASS(wxButton)
60 };
61
62 class WXDLLIMPEXP_CORE wxDisclosureTriangle: public wxControl
63 {
64 public:
65 wxDisclosureTriangle(wxWindow *parent,
66 wxWindowID id,
67 const wxString& label = wxEmptyString,
68 const wxPoint& pos = wxDefaultPosition,
69 const wxSize& size = wxDefaultSize,
70 long style = 0,
71 const wxValidator& validator = wxDefaultValidator,
72 const wxString& name = wxButtonNameStr)
73 {
74 Create(parent, id, label, pos, size, style, validator, name);
75 }
76
77 bool Create(wxWindow *parent,
78 wxWindowID id,
79 const wxString& label = wxEmptyString,
80 const wxPoint& pos = wxDefaultPosition,
81 const wxSize& size = wxDefaultSize,
82 long style = 0,
83 const wxValidator& validator = wxDefaultValidator,
84 const wxString& name = wxButtonNameStr);
85
86 void SetOpen( bool open );
87 bool IsOpen() const;
88
89 // osx specific event handling common for all osx-ports
90
91 virtual bool OSXHandleClicked( double timestampsec );
92
93 protected:
94 virtual wxSize DoGetBestSize() const ;
95
96 };
97
98 #endif
99 // _WX_BUTTON_H_