1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxButton class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/control.h"
16 #include "wx/gdicmn.h"
18 WXDLLIMPEXP_DATA_CORE(extern const char) wxButtonNameStr
[];
21 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
25 wxButton(wxWindow
*parent
,
27 const wxString
& label
= wxEmptyString
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxButtonNameStr
)
34 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
,
39 const wxString
& label
= wxEmptyString
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxButtonNameStr
);
46 virtual wxInt32
MacControlHit( WXEVENTHANDLERREF handler
, WXEVENTREF event
) ;
47 static wxSize
GetDefaultSize();
49 virtual wxWindow
*SetDefault();
50 virtual void Command(wxCommandEvent
& event
);
53 virtual wxSize
DoGetBestSize() const ;
55 DECLARE_DYNAMIC_CLASS(wxButton
)
58 class WXDLLIMPEXP_CORE wxDisclosureTriangle
: public wxControl
61 wxDisclosureTriangle(wxWindow
*parent
,
63 const wxString
& label
= wxEmptyString
,
64 const wxPoint
& pos
= wxDefaultPosition
,
65 const wxSize
& size
= wxDefaultSize
,
67 const wxValidator
& validator
= wxDefaultValidator
,
68 const wxString
& name
= wxButtonNameStr
)
70 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
73 bool Create(wxWindow
*parent
,
75 const wxString
& label
= wxEmptyString
,
76 const wxPoint
& pos
= wxDefaultPosition
,
77 const wxSize
& size
= wxDefaultSize
,
79 const wxValidator
& validator
= wxDefaultValidator
,
80 const wxString
& name
= wxButtonNameStr
);
82 void SetOpen( bool open
);
85 virtual wxInt32
MacControlHit( WXEVENTHANDLERREF handler
, WXEVENTREF event
) ;
88 virtual wxSize
DoGetBestSize() const ;