]>
Commit | Line | Data |
---|---|---|
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 | virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; | |
47 | static wxSize GetDefaultSize(); | |
48 | ||
49 | virtual wxWindow *SetDefault(); | |
50 | virtual void Command(wxCommandEvent& event); | |
51 | ||
52 | protected: | |
53 | virtual wxSize DoGetBestSize() const ; | |
54 | ||
55 | DECLARE_DYNAMIC_CLASS(wxButton) | |
56 | }; | |
57 | ||
58 | class WXDLLIMPEXP_CORE wxDisclosureTriangle: public wxControl | |
59 | { | |
60 | public: | |
61 | wxDisclosureTriangle(wxWindow *parent, | |
62 | wxWindowID id, | |
63 | const wxString& label = wxEmptyString, | |
64 | const wxPoint& pos = wxDefaultPosition, | |
65 | const wxSize& size = wxDefaultSize, | |
66 | long style = 0, | |
67 | const wxValidator& validator = wxDefaultValidator, | |
68 | const wxString& name = wxButtonNameStr) | |
69 | { | |
70 | Create(parent, id, label, pos, size, style, validator, name); | |
71 | } | |
72 | ||
73 | bool Create(wxWindow *parent, | |
74 | wxWindowID id, | |
75 | const wxString& label = wxEmptyString, | |
76 | const wxPoint& pos = wxDefaultPosition, | |
77 | const wxSize& size = wxDefaultSize, | |
78 | long style = 0, | |
79 | const wxValidator& validator = wxDefaultValidator, | |
80 | const wxString& name = wxButtonNameStr); | |
81 | ||
82 | void SetOpen( bool open ); | |
83 | bool IsOpen() const; | |
84 | ||
85 | virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; | |
86 | ||
87 | protected: | |
88 | virtual wxSize DoGetBestSize() const ; | |
89 | ||
90 | }; | |
91 | ||
92 | #endif | |
93 | // _WX_BUTTON_H_ |