1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/bmpbuttn.h
3 // Purpose: wxBitmapButton class
4 // Author: David Elliott
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_COCOA_BMPBUTTN_H__
12 #define __WX_COCOA_BMPBUTTN_H__
14 #include "wx/cocoa/NSButton.h"
16 // ========================================================================
18 // ========================================================================
19 class WXDLLIMPEXP_CORE wxBitmapButton
: public wxBitmapButtonBase
21 DECLARE_DYNAMIC_CLASS(wxBitmapButton
)
23 WX_DECLARE_COCOA_OWNER(NSButton
,NSControl
,NSView
)
24 // ------------------------------------------------------------------------
26 // ------------------------------------------------------------------------
29 wxBitmapButton(wxWindow
*parent
, wxWindowID winid
,
30 const wxBitmap
& bitmap
,
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
, bitmap
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
, wxWindowID winid
,
40 const wxBitmap
& bitmap
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
, long style
= 0,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxButtonNameStr
);
45 virtual ~wxBitmapButton();
47 // ------------------------------------------------------------------------
49 // ------------------------------------------------------------------------
51 virtual void Cocoa_wxNSButtonAction(void);
52 // ------------------------------------------------------------------------
54 // ------------------------------------------------------------------------
56 // The wxButton::DoGetBestSize is not correct for bitmap buttons
57 wxSize
DoGetBestSize() const
58 { return wxButtonBase::DoGetBestSize(); }
61 #endif // __WX_COCOA_BMPBUTTN_H__