]>
Commit | Line | Data |
---|---|---|
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 | // Pushbutton | |
18 | class WXDLLEXPORT wxButton: public wxButtonBase | |
19 | { | |
20 | public: | |
21 | inline wxButton() {} | |
22 | inline wxButton( wxWindow* pParent | |
23 | ,wxWindowID vId | |
24 | ,const wxString& rsLabel | |
25 | ,const wxPoint& rPos = wxDefaultPosition | |
26 | ,const wxSize& rSize = wxDefaultSize | |
27 | ,long lStyle = 0 | |
28 | #if wxUSE_VALIDATORS | |
29 | ,const wxValidator& rValidator = wxDefaultValidator | |
30 | #endif | |
31 | ,const wxString& rsName = wxButtonNameStr | |
32 | ) | |
33 | { | |
34 | Create( pParent | |
35 | ,vId | |
36 | ,rsLabel | |
37 | ,rPos | |
38 | ,rSize | |
39 | ,lStyle | |
40 | #if wxUSE_VALIDATORS | |
41 | ,rValidator | |
42 | #endif | |
43 | ,rsName | |
44 | ); | |
45 | } | |
46 | ||
47 | bool Create( wxWindow* pParent | |
48 | ,wxWindowID vId | |
49 | ,const wxString& rsLabel | |
50 | ,const wxPoint& rPos = wxDefaultPosition | |
51 | ,const wxSize& rSize = wxDefaultSize | |
52 | ,long lStyle = 0 | |
53 | #if wxUSE_VALIDATORS | |
54 | ,const wxValidator& rValidator = wxDefaultValidator | |
55 | #endif | |
56 | ,const wxString& rsName = wxButtonNameStr | |
57 | ); | |
58 | ||
59 | virtual ~wxButton(); | |
60 | ||
61 | virtual void SetDefault(void); | |
62 | static wxSize GetDefaultSize(void); | |
63 | virtual void Command(wxCommandEvent& rEvent); | |
64 | virtual bool OS2Command( WXUINT uParam | |
65 | ,WXWORD vId | |
66 | ); | |
67 | virtual WXHBRUSH OnCtlColor( WXHDC hDC | |
68 | ,WXHWND hWnd | |
69 | ,WXUINT uCtlColor | |
70 | ,WXUINT uMessage | |
71 | ,WXWPARAM wParam | |
72 | ,WXLPARAM lParam | |
73 | ); | |
74 | void MakeOwnerDrawn(void); | |
75 | ||
76 | virtual MRESULT WindowProc( WXUINT uMsg | |
77 | ,WXWPARAM wParam | |
78 | ,WXLPARAM lParam | |
79 | ); | |
80 | ||
81 | protected: | |
82 | ||
83 | bool SendClickEvent(void); | |
84 | virtual wxSize DoGetBestSize(void) const; | |
85 | private: | |
86 | DECLARE_DYNAMIC_CLASS(wxButton) | |
87 | }; // end of CLASS wxButton | |
88 | ||
89 | #endif | |
90 | // _WX_BUTTON_H_ | |
91 |