]>
Commit | Line | Data |
---|---|---|
9b6dbb09 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: button.h | |
3 | // Purpose: wxButton class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
31528cd3 | 9 | // Licence: wxWindows licence |
9b6dbb09 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_BUTTON_H_ | |
13 | #define _WX_BUTTON_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
83df96d6 | 16 | #pragma interface "button.h" |
9b6dbb09 JS |
17 | #endif |
18 | ||
9b6dbb09 JS |
19 | WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; |
20 | ||
21 | // Pushbutton | |
a63b0098 | 22 | class WXDLLEXPORT wxButton: public wxButtonBase |
9b6dbb09 | 23 | { |
31528cd3 | 24 | DECLARE_DYNAMIC_CLASS(wxButton) |
83df96d6 | 25 | |
31528cd3 VZ |
26 | public: |
27 | wxButton() { } | |
28 | wxButton(wxWindow *parent, | |
83df96d6 JS |
29 | wxWindowID id, |
30 | const wxString& label, | |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, long style = 0, | |
33 | const wxValidator& validator = wxDefaultValidator, | |
34 | const wxString& name = wxButtonNameStr) | |
31528cd3 VZ |
35 | { |
36 | Create(parent, id, label, pos, size, style, validator, name); | |
37 | } | |
83df96d6 | 38 | |
31528cd3 | 39 | bool Create(wxWindow *parent, wxWindowID id, const wxString& label, |
83df96d6 JS |
40 | const wxPoint& pos = wxDefaultPosition, |
41 | const wxSize& size = wxDefaultSize, long style = 0, | |
42 | const wxValidator& validator = wxDefaultValidator, | |
43 | const wxString& name = wxButtonNameStr); | |
44 | ||
31528cd3 VZ |
45 | virtual void SetDefault(); |
46 | virtual void Command(wxCommandEvent& event); | |
83df96d6 | 47 | |
4d194d63 MB |
48 | static wxSize GetDefaultSize(); |
49 | ||
31528cd3 | 50 | // Implementation |
458ca8c1 MB |
51 | private: |
52 | virtual wxSize DoGetBestSize() const; | |
53 | void SetDefaultShadowThicknessAndResize(); | |
9b6dbb09 JS |
54 | }; |
55 | ||
56 | #endif | |
83df96d6 | 57 | // _WX_BUTTON_H_ |