]>
Commit | Line | Data |
---|---|---|
ffecfa5a JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/palmos/button.h | |
3 | // Purpose: wxButton class | |
e1d63b79 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
db101bd3 | 5 | // Modified by: Wlodzimierz ABX Skiba - native wxButton implementation |
ffecfa5a | 6 | // Created: 10/13/04 |
e1d63b79 | 7 | // RCS-ID: $Id$ |
db101bd3 | 8 | // Copyright: (c) William Osborne, Wlodzimierz Skiba |
ffecfa5a JS |
9 | // Licence: wxWindows licence |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_BUTTON_H_ | |
13 | #define _WX_BUTTON_H_ | |
14 | ||
ffecfa5a JS |
15 | // ---------------------------------------------------------------------------- |
16 | // Pushbutton | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
53a2db12 | 19 | class WXDLLIMPEXP_CORE wxButton : public wxButtonBase |
ffecfa5a JS |
20 | { |
21 | public: | |
22 | wxButton() { } | |
23 | wxButton(wxWindow *parent, | |
24 | wxWindowID id, | |
db101bd3 | 25 | const wxString& label = wxEmptyString, |
ffecfa5a JS |
26 | const wxPoint& pos = wxDefaultPosition, |
27 | const wxSize& size = wxDefaultSize, | |
28 | long style = 0, | |
29 | const wxValidator& validator = wxDefaultValidator, | |
30 | const wxString& name = wxButtonNameStr) | |
31 | { | |
32 | Create(parent, id, label, pos, size, style, validator, name); | |
33 | } | |
34 | ||
35 | bool Create(wxWindow *parent, | |
36 | wxWindowID id, | |
37 | const wxString& label, | |
38 | const wxPoint& pos = wxDefaultPosition, | |
39 | const wxSize& size = wxDefaultSize, | |
40 | long style = 0, | |
41 | const wxValidator& validator = wxDefaultValidator, | |
42 | const wxString& name = wxButtonNameStr); | |
43 | ||
44 | virtual ~wxButton(); | |
45 | ||
94aff5ff | 46 | virtual wxWindow *SetDefault(); |
ffecfa5a JS |
47 | |
48 | // implementation from now on | |
49 | virtual void Command(wxCommandEvent& event); | |
ffecfa5a | 50 | |
a152561c WS |
51 | // send a notification event, return true if processed |
52 | bool SendClickEvent(); | |
53 | ||
ffecfa5a | 54 | protected: |
ffecfa5a JS |
55 | |
56 | // default button handling | |
57 | void SetTmpDefault(); | |
58 | void UnsetTmpDefault(); | |
59 | ||
60 | // set or unset BS_DEFPUSHBUTTON style | |
61 | static void SetDefaultStyle(wxButton *btn, bool on); | |
62 | ||
63 | // usually overridden base class virtuals | |
64 | virtual wxSize DoGetBestSize() const; | |
ffecfa5a JS |
65 | |
66 | private: | |
67 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton) | |
68 | }; | |
69 | ||
70 | #endif | |
71 | // _WX_BUTTON_H_ |