]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/button.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxButton class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/control.h"
18 class WXDLLEXPORT wxButton
: public wxButtonBase
22 inline wxButton( wxWindow
* pParent
24 ,const wxString
& rsLabel
25 ,const wxPoint
& rPos
= wxDefaultPosition
26 ,const wxSize
& rSize
= wxDefaultSize
28 ,const wxValidator
& rValidator
= wxDefaultValidator
29 ,const wxString
& rsName
= wxButtonNameStr
43 wxButton(wxWindow
*parent
, wxWindowID id
, wxStockItemID stock
,
44 const wxString
& descriptiveLabel
= wxEmptyString
,
45 const wxPoint
& pos
= wxDefaultPosition
,
47 const wxValidator
& validator
= wxDefaultValidator
,
48 const wxString
& name
= wxButtonNameStr
)
50 Create(parent
, id
, stock
, descriptiveLabel
, pos
, style
, validator
, name
);
53 bool Create( wxWindow
* pParent
55 ,const wxString
& rsLabel
56 ,const wxPoint
& rPos
= wxDefaultPosition
57 ,const wxSize
& rSize
= wxDefaultSize
59 ,const wxValidator
& rValidator
= wxDefaultValidator
60 ,const wxString
& rsName
= wxButtonNameStr
63 bool Create(wxWindow
*parent
, wxWindowID id
, wxStockItemID stock
,
64 const wxString
& descriptiveLabel
= wxEmptyString
,
65 const wxPoint
& pos
= wxDefaultPosition
,
67 const wxValidator
& validator
= wxDefaultValidator
,
68 const wxString
& name
= wxButtonNameStr
)
70 return CreateStock(parent
, id
, stock
, descriptiveLabel
,
71 pos
, style
, validator
, name
);
76 virtual void SetDefault(void);
77 static wxSize
GetDefaultSize(void);
78 virtual void Command(wxCommandEvent
& rEvent
);
79 virtual bool OS2Command( WXUINT uParam
82 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
89 void MakeOwnerDrawn(void);
91 virtual MRESULT
WindowProc( WXUINT uMsg
98 bool SendClickEvent(void);
99 void SetTmpDefault(void);
100 void UnsetTmpDefault(void);
102 static void SetDefaultStyle( wxButton
* pButton
106 virtual wxSize
DoGetBestSize(void) const;
107 virtual WXDWORD
OS2GetStyle( long style
111 DECLARE_DYNAMIC_CLASS(wxButton
)
112 }; // end of CLASS wxButton