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 static wxSize
GetDefaultSize();
48 virtual wxWindow
*SetDefault();
49 virtual void Command(wxCommandEvent
& event
);
51 // osx specific event handling common for all osx-ports
53 virtual bool OSXHandleClicked( double timestampsec
);
56 virtual wxSize
DoGetBestSize() const ;
58 DECLARE_DYNAMIC_CLASS(wxButton
)
61 class WXDLLIMPEXP_CORE wxDisclosureTriangle
: public wxControl
64 wxDisclosureTriangle(wxWindow
*parent
,
66 const wxString
& label
= wxEmptyString
,
67 const wxPoint
& pos
= wxDefaultPosition
,
68 const wxSize
& size
= wxDefaultSize
,
70 const wxValidator
& validator
= wxDefaultValidator
,
71 const wxString
& name
= wxButtonNameStr
)
73 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
76 bool Create(wxWindow
*parent
,
78 const wxString
& label
= wxEmptyString
,
79 const wxPoint
& pos
= wxDefaultPosition
,
80 const wxSize
& size
= wxDefaultSize
,
82 const wxValidator
& validator
= wxDefaultValidator
,
83 const wxString
& name
= wxButtonNameStr
);
85 void SetOpen( bool open
);
88 // osx specific event handling common for all osx-ports
90 virtual bool OSXHandleClicked( double timestampsec
);
93 virtual wxSize
DoGetBestSize() const ;