]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/button.h
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 wxControl
22 DECLARE_DYNAMIC_CLASS(wxButton
)
25 inline wxButton(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
, long style
= 0,
29 # if defined(__VISAGECPP__)
30 const wxValidator
* validator
= wxDefaultValidator
,
32 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxButtonNameStr
)
37 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
40 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
, long style
= 0,
44 # if defined(__VISAGECPP__)
45 const wxValidator
* validator
= wxDefaultValidator
,
47 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxButtonNameStr
);
54 virtual void SetDefault();
56 static wxSize
GetDefaultSize();
58 virtual void Command(wxCommandEvent
& event
);
59 virtual bool OS2Command(WXUINT param
, WXWORD id
);
60 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
,
67 // send a notification event, return TRUE if processed
68 bool SendClickEvent();
70 virtual wxSize
DoGetBestSize();