]>
Commit | Line | Data |
---|---|---|
0e320a79 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/os2/button.h |
0e320a79 | 3 | // Purpose: wxButton class |
d88de032 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
d88de032 | 6 | // Created: 10/13/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
d88de032 | 8 | // Copyright: (c) David Webster |
65571936 | 9 | // Licence: wxWindows licence |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_BUTTON_H_ | |
13 | #define _WX_BUTTON_H_ | |
14 | ||
0e320a79 | 15 | #include "wx/control.h" |
0e320a79 | 16 | |
0e320a79 | 17 | // Pushbutton |
53a2db12 | 18 | class WXDLLIMPEXP_CORE wxButton: public wxButtonBase |
0e320a79 | 19 | { |
b7276b44 | 20 | public: |
afa59b4e DW |
21 | inline wxButton() {} |
22 | inline wxButton( wxWindow* pParent | |
23 | ,wxWindowID vId | |
5f7bcb48 | 24 | ,const wxString& rsLabel = wxEmptyString |
afa59b4e DW |
25 | ,const wxPoint& rPos = wxDefaultPosition |
26 | ,const wxSize& rSize = wxDefaultSize | |
27 | ,long lStyle = 0 | |
afa59b4e | 28 | ,const wxValidator& rValidator = wxDefaultValidator |
afa59b4e DW |
29 | ,const wxString& rsName = wxButtonNameStr |
30 | ) | |
31 | { | |
32 | Create( pParent | |
33 | ,vId | |
34 | ,rsLabel | |
35 | ,rPos | |
36 | ,rSize | |
37 | ,lStyle | |
afa59b4e | 38 | ,rValidator |
afa59b4e DW |
39 | ,rsName |
40 | ); | |
41 | } | |
0e320a79 | 42 | |
afa59b4e DW |
43 | bool Create( wxWindow* pParent |
44 | ,wxWindowID vId | |
5f7bcb48 | 45 | ,const wxString& rsLabel = wxEmptyString |
afa59b4e DW |
46 | ,const wxPoint& rPos = wxDefaultPosition |
47 | ,const wxSize& rSize = wxDefaultSize | |
48 | ,long lStyle = 0 | |
afa59b4e | 49 | ,const wxValidator& rValidator = wxDefaultValidator |
afa59b4e DW |
50 | ,const wxString& rsName = wxButtonNameStr |
51 | ); | |
94aff5ff | 52 | |
afa59b4e | 53 | virtual ~wxButton(); |
1408104d | 54 | |
b7276b44 VZ |
55 | virtual wxWindow *SetDefault(); |
56 | ||
afa59b4e DW |
57 | static wxSize GetDefaultSize(void); |
58 | virtual void Command(wxCommandEvent& rEvent); | |
59 | virtual bool OS2Command( WXUINT uParam | |
60 | ,WXWORD vId | |
61 | ); | |
62 | virtual WXHBRUSH OnCtlColor( WXHDC hDC | |
63 | ,WXHWND hWnd | |
64 | ,WXUINT uCtlColor | |
65 | ,WXUINT uMessage | |
66 | ,WXWPARAM wParam | |
67 | ,WXLPARAM lParam | |
68 | ); | |
69 | void MakeOwnerDrawn(void); | |
1408104d | 70 | |
afa59b4e DW |
71 | virtual MRESULT WindowProc( WXUINT uMsg |
72 | ,WXWPARAM wParam | |
73 | ,WXLPARAM lParam | |
74 | ); | |
1408104d | 75 | |
d88de032 | 76 | protected: |
d88de032 | 77 | |
b9b1d6c8 | 78 | bool SendClickEvent(void); |
430974f8 DW |
79 | void SetTmpDefault(void); |
80 | void UnsetTmpDefault(void); | |
81 | ||
018d3030 DW |
82 | static void SetDefaultStyle( wxButton* pButton |
83 | ,bool bOn | |
84 | ); | |
430974f8 | 85 | |
b9b1d6c8 DW |
86 | virtual wxSize DoGetBestSize(void) const; |
87 | virtual WXDWORD OS2GetStyle( long style | |
88 | ,WXDWORD* exstyle | |
89 | ) const; | |
210a651b DW |
90 | private: |
91 | DECLARE_DYNAMIC_CLASS(wxButton) | |
afa59b4e | 92 | }; // end of CLASS wxButton |
0e320a79 DW |
93 | |
94 | #endif | |
95 | // _WX_BUTTON_H_ | |
afa59b4e | 96 |