]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/button.h
Disable disabling wxWeakRef<T>
[wxWidgets.git] / include / wx / cocoa / button.h
CommitLineData
fb896a32
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/button.h
3// Purpose: wxButton class
4// Author: David Elliott
5// Modified by:
6// Created: 2002/12/29
1b88201f 7// RCS-ID: $Id$
fb896a32 8// Copyright: (c) 2002 David Elliott
1b88201f 9// Licence: wxWindows licence
fb896a32
DE
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __WX_COCOA_BUTTON_H__
13#define __WX_COCOA_BUTTON_H__
14
15#include "wx/cocoa/NSButton.h"
16
17// ========================================================================
18// wxButton
19// ========================================================================
53a2db12 20class WXDLLIMPEXP_CORE wxButton : public wxButtonBase, protected wxCocoaNSButton
fb896a32
DE
21{
22 DECLARE_DYNAMIC_CLASS(wxButton)
23 DECLARE_EVENT_TABLE()
24 WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
25// ------------------------------------------------------------------------
26// initialization
27// ------------------------------------------------------------------------
28public:
29 wxButton() { }
30 wxButton(wxWindow *parent, wxWindowID winid,
5f7bcb48 31 const wxString& label = wxEmptyString,
fb896a32
DE
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, label, pos, size, style, validator, name);
38 }
1b88201f 39
fb896a32
DE
40
41 bool Create(wxWindow *parent, wxWindowID winid,
5f7bcb48 42 const wxString& label = wxEmptyString,
fb896a32
DE
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize, long style = 0,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxButtonNameStr);
1b88201f 47
fb896a32
DE
48 virtual ~wxButton();
49
50// ------------------------------------------------------------------------
51// Cocoa callbacks
52// ------------------------------------------------------------------------
53protected:
54 virtual void Cocoa_wxNSButtonAction(void);
55// ------------------------------------------------------------------------
56// Implementation
57// ------------------------------------------------------------------------
58public:
ce319b6d
DE
59 wxString GetLabel() const;
60 void SetLabel(const wxString& label);
635f0147 61 wxSize DoGetBestSize() const;
fb896a32
DE
62};
63
1b88201f
WS
64#endif
65 // __WX_COCOA_BUTTON_H__