1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxButton class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "button.h"
19 #include "wx/control.h"
20 #include "wx/gdicmn.h"
22 WXDLLEXPORT_DATA(extern const wxChar
*) wxButtonNameStr
;
25 class WXDLLEXPORT wxButton
: public wxButtonBase
27 DECLARE_DYNAMIC_CLASS(wxButton
)
30 inline wxButton(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
, long style
= 0,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxButtonNameStr
)
36 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
39 inline wxButton(wxWindow
*parent
, wxWindowID id
, wxStockItemID stock
,
40 const wxString
& descriptiveLabel
= wxEmptyString
,
41 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxButtonNameStr
)
46 Create(parent
, id
, stock
, descriptiveLabel
, pos
, style
, validator
, name
);
49 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
, long style
= 0,
52 const wxValidator
& validator
= wxDefaultValidator
,
53 const wxString
& name
= wxButtonNameStr
);
55 bool Create(wxWindow
*parent
, wxWindowID id
, wxStockItemID stock
,
56 const wxString
& descriptiveLabel
= wxEmptyString
,
57 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxValidator
& validator
= wxDefaultValidator
,
60 const wxString
& name
= wxButtonNameStr
)
62 return CreateStock(parent
, id
, stock
, descriptiveLabel
,
63 pos
, style
, validator
, name
);
66 virtual wxInt32
MacControlHit( WXEVENTHANDLERREF handler
, WXEVENTREF event
) ;
67 static wxSize
GetDefaultSize();
69 virtual void SetDefault();
70 virtual void Command(wxCommandEvent
& event
);
72 virtual wxSize
DoGetBestSize() const ;