1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/button.h
3 // Purpose: wxButton class
4 // Author: David Elliott
7 // Copyright: (c) 2002 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_COCOA_BUTTON_H__
12 #define __WX_COCOA_BUTTON_H__
14 #include "wx/cocoa/NSButton.h"
16 // ========================================================================
18 // ========================================================================
19 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
, protected wxCocoaNSButton
21 DECLARE_DYNAMIC_CLASS(wxButton
)
23 WX_DECLARE_COCOA_OWNER(NSButton
,NSControl
,NSView
)
24 // ------------------------------------------------------------------------
26 // ------------------------------------------------------------------------
29 wxButton(wxWindow
*parent
, wxWindowID winid
,
30 const wxString
& label
= wxEmptyString
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
, long style
= 0,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxButtonNameStr
)
36 Create(parent
, winid
, label
, pos
, size
, style
, validator
, name
);
40 bool Create(wxWindow
*parent
, wxWindowID winid
,
41 const wxString
& label
= wxEmptyString
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
, long style
= 0,
44 const wxValidator
& validator
= wxDefaultValidator
,
45 const wxString
& name
= wxButtonNameStr
);
49 // ------------------------------------------------------------------------
51 // ------------------------------------------------------------------------
53 virtual void Cocoa_wxNSButtonAction(void);
54 // ------------------------------------------------------------------------
56 // ------------------------------------------------------------------------
58 wxString
GetLabel() const;
59 void SetLabel(const wxString
& label
);
60 wxSize
DoGetBestSize() const;
64 // __WX_COCOA_BUTTON_H__