]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/button.h
Added code to show off wxDbGrid (contributed by Paul and Roger Gammans) in wxUSE_NEW_...
[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 #if wxUSE_VALIDATORS
29 const wxValidator& validator = wxDefaultValidator,
30 #endif
31 const wxString& name = wxButtonNameStr)
32 {
33 Create(parent, id, label, pos, size, style, validator, name);
34 }
35
36 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize, long style = 0,
39 #if wxUSE_VALIDATORS
40 const wxValidator& validator = wxDefaultValidator,
41 #endif
42 const wxString& name = wxButtonNameStr);
43
44 virtual ~wxButton();
45
46 virtual void SetDefault();
47
48 static wxSize GetDefaultSize();
49
50 virtual void Command(wxCommandEvent& event);
51 virtual bool OS2Command(WXUINT param, WXWORD id);
52 virtual WXHBRUSH OnCtlColor(WXHDC pDC,
53 WXHWND pWnd,
54 WXUINT nCtlColor,
55 WXUINT message,
56 WXWPARAM wParam,
57 WXLPARAM lParam);
58 protected:
59 // send a notification event, return TRUE if processed
60 bool SendClickEvent();
61
62 virtual wxSize DoGetBestSize() const;
63 };
64
65 #endif
66 // _WX_BUTTON_H_