]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/button.h
implemented (untested) work around for wxScrolledWindow painting bug
[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 wxButtonBase
21 {
22 public:
23 inline wxButton() {}
24 inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize, long style = 0,
27 #if wxUSE_VALIDATORS
28 const wxValidator& validator = wxDefaultValidator,
29 #endif
30 const wxString& name = wxButtonNameStr)
31 {
32 Create(parent, id, label, pos, size, style, validator, name);
33 }
34
35 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize, long style = 0,
38 #if wxUSE_VALIDATORS
39 const wxValidator& validator = wxDefaultValidator,
40 #endif
41 const wxString& name = wxButtonNameStr);
42
43 virtual ~wxButton();
44
45 virtual void SetDefault();
46
47 static wxSize GetDefaultSize();
48
49 virtual void Command(wxCommandEvent& event);
50 virtual bool OS2Command(WXUINT param, WXWORD id);
51 virtual WXHBRUSH OnCtlColor(WXHDC pDC,
52 WXHWND pWnd,
53 WXUINT nCtlColor,
54 WXUINT message,
55 WXWPARAM wParam,
56 WXLPARAM lParam);
57 protected:
58 // send a notification event, return TRUE if processed
59 bool SendClickEvent();
60
61 virtual wxSize DoGetBestSize() const;
62 private:
63 DECLARE_DYNAMIC_CLASS(wxButton)
64 };
65
66 #endif
67 // _WX_BUTTON_H_