]> git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/button.h
cleanup
[wxWidgets.git] / include / wx / palmos / button.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/button.h
3 // Purpose: wxButton class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by: Wlodzimierz ABX Skiba - native wxButton implementation
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne, Wlodzimierz Skiba
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_BUTTON_H_
13 #define _WX_BUTTON_H_
14
15 // ----------------------------------------------------------------------------
16 // Pushbutton
17 // ----------------------------------------------------------------------------
18
19 class WXDLLEXPORT wxButton : public wxButtonBase
20 {
21 public:
22 wxButton() { }
23 wxButton(wxWindow *parent,
24 wxWindowID id,
25 const wxString& label = wxEmptyString,
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
46 virtual void SetDefault();
47
48 // implementation from now on
49 virtual void Command(wxCommandEvent& event);
50
51 // send a notification event, return true if processed
52 bool SendClickEvent();
53
54 protected:
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;
65
66 private:
67 DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)
68 };
69
70 #endif
71 // _WX_BUTTON_H_