]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/button.h
fixed wxImage->wxBitmap conversion for images with alpha channel
[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, const wxString& label,
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, id, label, pos, size, style, validator, name);
37 }
38
39 inline wxButton(wxWindow *parent, wxWindowID id, wxStockItemID stock,
40 const wxString& descriptiveLabel = wxEmptyString,
41 const wxPoint& pos = wxDefaultPosition,
42 long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxButtonNameStr)
45 {
46 Create(parent, id, stock, descriptiveLabel, pos, style, validator, name);
47 }
48
49 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& size = wxDefaultSize, long style = 0,
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxButtonNameStr);
54
55 bool Create(wxWindow *parent, wxWindowID id, wxStockItemID stock,
56 const wxString& descriptiveLabel = wxEmptyString,
57 const wxPoint& pos = wxDefaultPosition,
58 long style = 0,
59 const wxValidator& validator = wxDefaultValidator,
60 const wxString& name = wxButtonNameStr)
61 {
62 return CreateStock(parent, id, stock, descriptiveLabel,
63 pos, style, validator, name);
64 }
65
66 virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
67 static wxSize GetDefaultSize();
68
69 virtual void SetDefault();
70 virtual void Command(wxCommandEvent& event);
71 protected:
72 virtual wxSize DoGetBestSize() const ;
73 };
74
75 #endif
76 // _WX_BUTTON_H_