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 void SetLabel(const wxString
& label
);
49 virtual wxWindow
*SetDefault();
50 virtual void Command(wxCommandEvent
& event
);
52 // osx specific event handling common for all osx-ports
54 virtual bool OSXHandleClicked( double timestampsec
);
57 virtual wxSize
DoGetBestSize() const ;
59 DECLARE_DYNAMIC_CLASS(wxButton
)
62 class WXDLLIMPEXP_CORE wxDisclosureTriangle
: public wxControl
65 wxDisclosureTriangle(wxWindow
*parent
,
67 const wxString
& label
= wxEmptyString
,
68 const wxPoint
& pos
= wxDefaultPosition
,
69 const wxSize
& size
= wxDefaultSize
,
71 const wxValidator
& validator
= wxDefaultValidator
,
72 const wxString
& name
= wxButtonNameStr
)
74 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
77 bool Create(wxWindow
*parent
,
79 const wxString
& label
= wxEmptyString
,
80 const wxPoint
& pos
= wxDefaultPosition
,
81 const wxSize
& size
= wxDefaultSize
,
83 const wxValidator
& validator
= wxDefaultValidator
,
84 const wxString
& name
= wxButtonNameStr
);
86 void SetOpen( bool open
);
89 // osx specific event handling common for all osx-ports
91 virtual bool OSXHandleClicked( double timestampsec
);
94 virtual wxSize
DoGetBestSize() const ;