1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxButton class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_OSX_BUTTON_H_
13 #define _WX_OSX_BUTTON_H_
15 #include "wx/control.h"
16 #include "wx/gdicmn.h"
19 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
23 wxButton(wxWindow
*parent
,
25 const wxString
& label
= wxEmptyString
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxButtonNameStr
)
32 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
35 bool Create(wxWindow
*parent
,
37 const wxString
& label
= wxEmptyString
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxButtonNameStr
);
44 static wxSize
GetDefaultSize();
46 virtual void SetLabel(const wxString
& label
);
47 virtual wxWindow
*SetDefault();
48 virtual void Command(wxCommandEvent
& event
);
50 // osx specific event handling common for all osx-ports
52 virtual bool OSXHandleClicked( double timestampsec
);
55 virtual wxSize
DoGetBestSize() const ;
58 virtual wxBitmap
DoGetBitmap(State which
) const;
59 virtual void DoSetBitmap(const wxBitmap
& bitmap
, State which
);
60 virtual void DoSetBitmapPosition(wxDirection dir
);
61 #endif // wxOSX_USE_COCOA
63 DECLARE_DYNAMIC_CLASS(wxButton
)
66 // OS X specific class, not part of public wx API
67 class WXDLLIMPEXP_CORE wxDisclosureTriangle
: public wxControl
70 wxDisclosureTriangle(wxWindow
*parent
,
72 const wxString
& label
= wxEmptyString
,
73 const wxPoint
& pos
= wxDefaultPosition
,
74 const wxSize
& size
= wxDefaultSize
,
76 const wxValidator
& validator
= wxDefaultValidator
,
77 const wxString
& name
= wxButtonNameStr
)
79 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
82 bool Create(wxWindow
*parent
,
84 const wxString
& label
= wxEmptyString
,
85 const wxPoint
& pos
= wxDefaultPosition
,
86 const wxSize
& size
= wxDefaultSize
,
88 const wxValidator
& validator
= wxDefaultValidator
,
89 const wxString
& name
= wxButtonNameStr
);
91 void SetOpen( bool open
);
94 // osx specific event handling common for all osx-ports
96 virtual bool OSXHandleClicked( double timestampsec
);
99 virtual wxSize
DoGetBestSize() const ;
103 #endif // _WX_OSX_BUTTON_H_