]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/button.h
Simple wxBatteryPower API for the support in wxWinCE, wxPalmOS and any other mobile...
[wxWidgets.git] / include / wx / mac / carbon / button.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: button.h
3 // Purpose: wxButton class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // RCS-ID: $Id$
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_BUTTON_H_
13 #define _WX_BUTTON_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "button.h"
17 #endif
18
19 #include "wx/control.h"
20 #include "wx/gdicmn.h"
21
22 WXDLLEXPORT_DATA(extern const wxChar*) wxButtonNameStr;
23
24 // Pushbutton
25 class WXDLLEXPORT wxButton: public wxButtonBase
26 {
27 DECLARE_DYNAMIC_CLASS(wxButton)
28 public:
29 inline wxButton() {}
30 inline wxButton(wxWindow *parent, wxWindowID id,
31 const wxString& label = wxEmptyString,
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, id, label, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent, wxWindowID id,
41 const wxString& label = wxEmptyString,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize, long style = 0,
44 const wxValidator& validator = wxDefaultValidator,
45 const wxString& name = wxButtonNameStr);
46
47 virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
48 static wxSize GetDefaultSize();
49
50 virtual void SetDefault();
51 virtual void Command(wxCommandEvent& event);
52 protected:
53 virtual wxSize DoGetBestSize() const ;
54 };
55
56 #endif
57 // _WX_BUTTON_H_