Latest Updates
[wxWidgets.git] / include / wx / os2 / button.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: button.h
3 // Purpose: wxButton class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/13/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_BUTTON_H_
13 #define _WX_BUTTON_H_
14
15 #include "wx/control.h"
16
17 WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
18
19 // Pushbutton
20 class WXDLLEXPORT wxButton: public wxControl
21 {
22 DECLARE_DYNAMIC_CLASS(wxButton)
23 public:
24 inline wxButton() {}
25 inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize, long style = 0,
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxButtonNameStr)
30 {
31 Create(parent, id, label, pos, size, style, validator, name);
32 }
33
34 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize, long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxButtonNameStr);
39
40 virtual ~wxButton();
41
42 virtual void SetDefault();
43
44 static wxSize GetDefaultSize();
45
46 virtual void Command(wxCommandEvent& event);
47 virtual bool OS2Command(WXUINT param, WXWORD id);
48 virtual WXHBRUSH OnCtlColor(WXHDC pDC,
49 WXHWND pWnd,
50 WXUINT nCtlColor,
51 WXUINT message,
52 WXWPARAM wParam,
53 WXLPARAM lParam);
54 protected:
55 // send a notification event, return TRUE if processed
56 bool SendClickEvent();
57
58 virtual wxSize DoGetBestSize();
59 };
60
61 #endif
62 // _WX_BUTTON_H_