]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/bmpbuttn.h
handle actions of the columns popup menu in wxHeaderCtrl itself (but the derived...
[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 // RCS-ID: $Id$
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_BMPBUTTN_H__
13 #define __WX_COCOA_BMPBUTTN_H__
14
15 #include "wx/cocoa/NSButton.h"
16
17 // ========================================================================
18 // wxBitmapButton
19 // ========================================================================
20 class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase
21 {
22 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
23 DECLARE_EVENT_TABLE()
24 WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
25 // ------------------------------------------------------------------------
26 // initialization
27 // ------------------------------------------------------------------------
28 public:
29 wxBitmapButton() { }
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)
36 {
37 Create(parent, winid, bitmap, pos, size, style, validator, name);
38 }
39
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();
47
48 // ------------------------------------------------------------------------
49 // Cocoa callbacks
50 // ------------------------------------------------------------------------
51 protected:
52 virtual void Cocoa_wxNSButtonAction(void);
53 // ------------------------------------------------------------------------
54 // Implementation
55 // ------------------------------------------------------------------------
56 public:
57 // The wxButton::DoGetBestSize is not correct for bitmap buttons
58 wxSize DoGetBestSize() const
59 { return wxButtonBase::DoGetBestSize(); }
60 };
61
62 #endif // __WX_COCOA_BMPBUTTN_H__