1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/bmpbuttn.h
3 // Purpose: wxBitmapButton class
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_BMPBUTTN_H__
13 #define __WX_COCOA_BMPBUTTN_H__
15 #include "wx/cocoa/NSButton.h"
17 // ========================================================================
19 // ========================================================================
20 class WXDLLIMPEXP_CORE wxBitmapButton
: public wxBitmapButtonBase
22 DECLARE_DYNAMIC_CLASS(wxBitmapButton
)
24 WX_DECLARE_COCOA_OWNER(NSButton
,NSControl
,NSView
)
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
30 wxBitmapButton(wxWindow
*parent
, wxWindowID winid
,
31 const wxBitmap
& bitmap
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
, long style
= 0,
34 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxButtonNameStr
)
37 Create(parent
, winid
, bitmap
, pos
, size
, style
, validator
, name
);
40 bool Create(wxWindow
*parent
, wxWindowID winid
,
41 const wxBitmap
& bitmap
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
, long style
= 0,
44 const wxValidator
& validator
= wxDefaultValidator
,
45 const wxString
& name
= wxButtonNameStr
);
46 virtual ~wxBitmapButton();
48 // ------------------------------------------------------------------------
50 // ------------------------------------------------------------------------
52 virtual void Cocoa_wxNSButtonAction(void);
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
57 // The wxButton::DoGetBestSize is not correct for bitmap buttons
58 wxSize
DoGetBestSize() const
59 { return wxButtonBase::DoGetBestSize(); }
62 #endif // __WX_COCOA_BMPBUTTN_H__