]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/button.h
derive wxConfig classes from wxObject and add wxRTTI macros to them (patch 1587607)
[wxWidgets.git] / include / wx / os2 / button.h
... / ...
CommitLineData
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
18class WXDLLEXPORT wxButton: public wxButtonBase
19{
20 public:
21 inline wxButton() {}
22 inline wxButton( wxWindow* pParent
23 ,wxWindowID vId
24 ,const wxString& rsLabel = wxEmptyString
25 ,const wxPoint& rPos = wxDefaultPosition
26 ,const wxSize& rSize = wxDefaultSize
27 ,long lStyle = 0
28 ,const wxValidator& rValidator = wxDefaultValidator
29 ,const wxString& rsName = wxButtonNameStr
30 )
31 {
32 Create( pParent
33 ,vId
34 ,rsLabel
35 ,rPos
36 ,rSize
37 ,lStyle
38 ,rValidator
39 ,rsName
40 );
41 }
42
43 bool Create( wxWindow* pParent
44 ,wxWindowID vId
45 ,const wxString& rsLabel = wxEmptyString
46 ,const wxPoint& rPos = wxDefaultPosition
47 ,const wxSize& rSize = wxDefaultSize
48 ,long lStyle = 0
49 ,const wxValidator& rValidator = wxDefaultValidator
50 ,const wxString& rsName = wxButtonNameStr
51 );
52
53 virtual ~wxButton();
54
55 virtual void SetDefault(void);
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
75protected:
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;
89private:
90 DECLARE_DYNAMIC_CLASS(wxButton)
91}; // end of CLASS wxButton
92
93#endif
94 // _WX_BUTTON_H_
95