]>
Commit | Line | Data |
---|---|---|
6762286d | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/osx/button.h |
6762286d SC |
3 | // Purpose: wxButton class |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
6762286d SC |
7 | // Copyright: (c) Stefan Csomor |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
e5d05b90 VZ |
11 | #ifndef _WX_OSX_BUTTON_H_ |
12 | #define _WX_OSX_BUTTON_H_ | |
6762286d SC |
13 | |
14 | #include "wx/control.h" | |
15 | #include "wx/gdicmn.h" | |
16 | ||
6762286d | 17 | // Pushbutton |
e5d05b90 | 18 | class WXDLLIMPEXP_CORE wxButton : public wxButtonBase |
6762286d SC |
19 | { |
20 | public: | |
21 | wxButton() {} | |
22 | wxButton(wxWindow *parent, | |
23 | wxWindowID id, | |
24 | const wxString& label = wxEmptyString, | |
25 | const wxPoint& pos = wxDefaultPosition, | |
26 | const wxSize& size = wxDefaultSize, | |
27 | long style = 0, | |
28 | const wxValidator& validator = wxDefaultValidator, | |
29 | const wxString& name = wxButtonNameStr) | |
30 | { | |
31 | Create(parent, id, label, pos, size, style, validator, name); | |
32 | } | |
33 | ||
34 | bool Create(wxWindow *parent, | |
35 | wxWindowID id, | |
36 | const wxString& label = wxEmptyString, | |
37 | const wxPoint& pos = wxDefaultPosition, | |
38 | const wxSize& size = wxDefaultSize, | |
39 | long style = 0, | |
40 | const wxValidator& validator = wxDefaultValidator, | |
41 | const wxString& name = wxButtonNameStr); | |
42 | ||
85284ca4 | 43 | virtual void SetLabel(const wxString& label); |
6762286d SC |
44 | virtual wxWindow *SetDefault(); |
45 | virtual void Command(wxCommandEvent& event); | |
46 | ||
47 | // osx specific event handling common for all osx-ports | |
e5d05b90 | 48 | |
12b5f4b4 | 49 | virtual bool OSXHandleClicked( double timestampsec ); |
6762286d | 50 | |
0afa3752 | 51 | #if wxOSX_USE_COCOA |
5af80d31 | 52 | void OSXUpdateAfterLabelChange(const wxString& label); |
0afa3752 VZ |
53 | #endif |
54 | ||
6762286d | 55 | protected: |
6762286d SC |
56 | DECLARE_DYNAMIC_CLASS(wxButton) |
57 | }; | |
58 | ||
e5d05b90 VZ |
59 | // OS X specific class, not part of public wx API |
60 | class WXDLLIMPEXP_CORE wxDisclosureTriangle : public wxControl | |
6762286d SC |
61 | { |
62 | public: | |
63 | wxDisclosureTriangle(wxWindow *parent, | |
64 | wxWindowID id, | |
65 | const wxString& label = wxEmptyString, | |
66 | const wxPoint& pos = wxDefaultPosition, | |
67 | const wxSize& size = wxDefaultSize, | |
73b1b996 | 68 | long style = wxBORDER_NONE, |
6762286d SC |
69 | const wxValidator& validator = wxDefaultValidator, |
70 | const wxString& name = wxButtonNameStr) | |
71 | { | |
72 | Create(parent, id, label, pos, size, style, validator, name); | |
73 | } | |
74 | ||
75 | bool Create(wxWindow *parent, | |
76 | wxWindowID id, | |
77 | const wxString& label = wxEmptyString, | |
78 | const wxPoint& pos = wxDefaultPosition, | |
79 | const wxSize& size = wxDefaultSize, | |
73b1b996 | 80 | long style = wxBORDER_NONE, |
6762286d SC |
81 | const wxValidator& validator = wxDefaultValidator, |
82 | const wxString& name = wxButtonNameStr); | |
83 | ||
84 | void SetOpen( bool open ); | |
85 | bool IsOpen() const; | |
86 | ||
87 | // osx specific event handling common for all osx-ports | |
e5d05b90 | 88 | |
12b5f4b4 | 89 | virtual bool OSXHandleClicked( double timestampsec ); |
6762286d SC |
90 | |
91 | protected: | |
92 | virtual wxSize DoGetBestSize() const ; | |
6762286d SC |
93 | }; |
94 | ||
e5d05b90 | 95 | #endif // _WX_OSX_BUTTON_H_ |