1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxButton class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/control.h"
17 WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr
;
20 class WXDLLEXPORT wxButton
: public wxButtonBase
24 inline wxButton(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
, long style
= 0,
28 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxButtonNameStr
)
32 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
35 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
36 const wxPoint
& pos
= wxDefaultPosition
,
37 const wxSize
& size
= wxDefaultSize
, long style
= 0,
39 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxButtonNameStr
);
45 virtual void SetDefault();
47 static wxSize
GetDefaultSize();
49 virtual void Command(wxCommandEvent
& event
);
50 virtual bool OS2Command(WXUINT param
, WXWORD id
);
51 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
,
58 // send a notification event, return TRUE if processed
59 bool SendClickEvent();
61 virtual wxSize
DoGetBestSize() const;
63 DECLARE_DYNAMIC_CLASS(wxButton
)