]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/os2/button.h | |
3 | // Purpose: wxButton class | |
4 | // Author: David Webster | |
5 | // Modified by: | |
6 | // Created: 10/13/99 | |
7 | // Copyright: (c) David Webster | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_BUTTON_H_ | |
12 | #define _WX_BUTTON_H_ | |
13 | ||
14 | #include "wx/control.h" | |
15 | ||
16 | // Pushbutton | |
17 | class WXDLLIMPEXP_CORE wxButton: public wxButtonBase | |
18 | { | |
19 | public: | |
20 | inline wxButton() {} | |
21 | inline wxButton( wxWindow* pParent | |
22 | ,wxWindowID vId | |
23 | ,const wxString& rsLabel = wxEmptyString | |
24 | ,const wxPoint& rPos = wxDefaultPosition | |
25 | ,const wxSize& rSize = wxDefaultSize | |
26 | ,long lStyle = 0 | |
27 | ,const wxValidator& rValidator = wxDefaultValidator | |
28 | ,const wxString& rsName = wxButtonNameStr | |
29 | ) | |
30 | { | |
31 | Create( pParent | |
32 | ,vId | |
33 | ,rsLabel | |
34 | ,rPos | |
35 | ,rSize | |
36 | ,lStyle | |
37 | ,rValidator | |
38 | ,rsName | |
39 | ); | |
40 | } | |
41 | ||
42 | bool Create( wxWindow* pParent | |
43 | ,wxWindowID vId | |
44 | ,const wxString& rsLabel = wxEmptyString | |
45 | ,const wxPoint& rPos = wxDefaultPosition | |
46 | ,const wxSize& rSize = wxDefaultSize | |
47 | ,long lStyle = 0 | |
48 | ,const wxValidator& rValidator = wxDefaultValidator | |
49 | ,const wxString& rsName = wxButtonNameStr | |
50 | ); | |
51 | ||
52 | virtual ~wxButton(); | |
53 | ||
54 | virtual wxWindow *SetDefault(); | |
55 | ||
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); | |
69 | ||
70 | virtual MRESULT WindowProc( WXUINT uMsg | |
71 | ,WXWPARAM wParam | |
72 | ,WXLPARAM lParam | |
73 | ); | |
74 | ||
75 | protected: | |
76 | ||
77 | bool SendClickEvent(void); | |
78 | void SetTmpDefault(void); | |
79 | void UnsetTmpDefault(void); | |
80 | ||
81 | static void SetDefaultStyle( wxButton* pButton | |
82 | ,bool bOn | |
83 | ); | |
84 | ||
85 | virtual wxSize DoGetBestSize(void) const; | |
86 | virtual WXDWORD OS2GetStyle( long style | |
87 | ,WXDWORD* exstyle | |
88 | ) const; | |
89 | private: | |
90 | DECLARE_DYNAMIC_CLASS(wxButton) | |
91 | }; // end of CLASS wxButton | |
92 | ||
93 | #endif | |
94 | // _WX_BUTTON_H_ | |
95 |