]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/button.h
62d8e5f0378e1b9e5a670dbcdca5d2d369f48a16
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "button.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxButton
: public wxButtonBase
27 wxButton(wxWindow
*parent
,
29 const wxString
& label
= wxEmptyString
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxButtonNameStr
)
36 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
,
41 const wxString
& label
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
& name
= wxButtonNameStr
);
50 virtual void SetDefault();
52 // implementation from now on
53 virtual void Command(wxCommandEvent
& event
);
54 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
56 virtual void ApplyParentThemeBackground(const wxColour
& bg
)
58 // avoide switching into owner-drawn mode
59 wxControl::SetBackgroundColour(bg
);
63 // send a notification event, return true if processed
64 bool SendClickEvent();
66 // default button handling
68 void UnsetTmpDefault();
70 // set or unset BS_DEFPUSHBUTTON style
71 static void SetDefaultStyle(wxButton
*btn
, bool on
);
73 // usually overridden base class virtuals
74 virtual wxSize
DoGetBestSize() const;
75 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const ;
78 DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton
)