1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/button.h
3 // Purpose: wxButton class
4 // Author: Stefan Csomor
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_OSX_BUTTON_H_
12 #define _WX_OSX_BUTTON_H_
14 #include "wx/control.h"
15 #include "wx/gdicmn.h"
18 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
22 wxButton(wxWindow
*parent
,
24 const wxString
& label
= wxEmptyString
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
,
28 const wxValidator
& validator
= wxDefaultValidator
,
29 const wxString
& name
= wxButtonNameStr
)
31 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
34 bool Create(wxWindow
*parent
,
36 const wxString
& label
= wxEmptyString
,
37 const wxPoint
& pos
= wxDefaultPosition
,
38 const wxSize
& size
= wxDefaultSize
,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxButtonNameStr
);
43 virtual void SetLabel(const wxString
& label
);
44 virtual wxWindow
*SetDefault();
45 virtual void Command(wxCommandEvent
& event
);
47 // osx specific event handling common for all osx-ports
49 virtual bool OSXHandleClicked( double timestampsec
);
52 void OSXUpdateAfterLabelChange(const wxString
& label
);
56 DECLARE_DYNAMIC_CLASS(wxButton
)
59 // OS X specific class, not part of public wx API
60 class WXDLLIMPEXP_CORE wxDisclosureTriangle
: public wxControl
63 wxDisclosureTriangle(wxWindow
*parent
,
65 const wxString
& label
= wxEmptyString
,
66 const wxPoint
& pos
= wxDefaultPosition
,
67 const wxSize
& size
= wxDefaultSize
,
68 long style
= wxBORDER_NONE
,
69 const wxValidator
& validator
= wxDefaultValidator
,
70 const wxString
& name
= wxButtonNameStr
)
72 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
75 bool Create(wxWindow
*parent
,
77 const wxString
& label
= wxEmptyString
,
78 const wxPoint
& pos
= wxDefaultPosition
,
79 const wxSize
& size
= wxDefaultSize
,
80 long style
= wxBORDER_NONE
,
81 const wxValidator
& validator
= wxDefaultValidator
,
82 const wxString
& name
= wxButtonNameStr
);
84 void SetOpen( bool open
);
87 // osx specific event handling common for all osx-ports
89 virtual bool OSXHandleClicked( double timestampsec
);
92 virtual wxSize
DoGetBestSize() const ;
95 #endif // _WX_OSX_BUTTON_H_