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
8 // Copyright: (c) William Osborne, Wlodzimierz Skiba
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
23 wxButton(wxWindow
*parent
,
25 const wxString
& label
= wxEmptyString
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxButtonNameStr
)
32 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
35 bool Create(wxWindow
*parent
,
37 const wxString
& label
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxButtonNameStr
);
46 virtual wxWindow
*SetDefault();
48 // implementation from now on
49 virtual void Command(wxCommandEvent
& event
);
51 // send a notification event, return true if processed
52 bool SendClickEvent();
56 // default button handling
58 void UnsetTmpDefault();
60 // set or unset BS_DEFPUSHBUTTON style
61 static void SetDefaultStyle(wxButton
*btn
, bool on
);
63 // usually overridden base class virtuals
64 virtual wxSize
DoGetBestSize() const;
67 DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton
)