]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/bmpbuttn.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / cocoa / bmpbuttn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/bmpbuttn.h
3 // Purpose: wxBitmapButton class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/03/16
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __WX_COCOA_BMPBUTTN_H__
12 #define __WX_COCOA_BMPBUTTN_H__
13
14 #include "wx/cocoa/NSButton.h"
15
16 // ========================================================================
17 // wxBitmapButton
18 // ========================================================================
19 class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase
20 {
21 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
22 DECLARE_EVENT_TABLE()
23 WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
24 // ------------------------------------------------------------------------
25 // initialization
26 // ------------------------------------------------------------------------
27 public:
28 wxBitmapButton() { }
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)
35 {
36 Create(parent, winid, bitmap, pos, size, style, validator, name);
37 }
38
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();
46
47 // ------------------------------------------------------------------------
48 // Cocoa callbacks
49 // ------------------------------------------------------------------------
50 protected:
51 virtual void Cocoa_wxNSButtonAction(void);
52 // ------------------------------------------------------------------------
53 // Implementation
54 // ------------------------------------------------------------------------
55 public:
56 // The wxButton::DoGetBestSize is not correct for bitmap buttons
57 wxSize DoGetBestSize() const
58 { return wxButtonBase::DoGetBestSize(); }
59 };
60
61 #endif // __WX_COCOA_BMPBUTTN_H__