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