]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/button.h
2980e97747e4ea556c80a6fb8597d2a863f2ab7a
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxButton class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "button.h"
19 #include "wx/control.h"
20 #include "wx/gdicmn.h"
22 WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr
;
25 class WXDLLEXPORT wxButton
: public wxControl
27 DECLARE_DYNAMIC_CLASS(wxButton
)
31 wxButton(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
, long style
= 0,
34 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,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxButtonNameStr
);
46 virtual void SetDefault();
47 virtual void SetLabel(const wxString
& label
);
48 virtual wxString
GetLabel() const ;
49 virtual void Command(wxCommandEvent
& event
);
50 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
51 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
52 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
55 virtual void DoSetSize(int x
, int y
,
56 int width
, int height
,
57 int sizeFlags
= wxSIZE_AUTO
);