]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/button.h
removed the inexistent (at least in 10.4 SDK) and unneeded carbon/carbon.h header...
[wxWidgets.git] / include / wx / osx / button.h
CommitLineData
6762286d
SC
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#include "wx/control.h"
16#include "wx/gdicmn.h"
17
18WXDLLIMPEXP_DATA_CORE(extern const char) wxButtonNameStr[];
19
20// Pushbutton
21class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
22{
23public:
24 wxButton() {}
25 wxButton(wxWindow *parent,
26 wxWindowID id,
27 const wxString& label = wxEmptyString,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = 0,
31 const wxValidator& validator = wxDefaultValidator,
32 const wxString& name = wxButtonNameStr)
33 {
34 Create(parent, id, label, pos, size, style, validator, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
39 const wxString& label = wxEmptyString,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxButtonNameStr);
45
46 static wxSize GetDefaultSize();
47
48 virtual wxWindow *SetDefault();
49 virtual void Command(wxCommandEvent& event);
50
51 // osx specific event handling common for all osx-ports
52
12b5f4b4 53 virtual bool OSXHandleClicked( double timestampsec );
6762286d
SC
54
55protected:
56 virtual wxSize DoGetBestSize() const ;
57
58 DECLARE_DYNAMIC_CLASS(wxButton)
59};
60
61class WXDLLIMPEXP_CORE wxDisclosureTriangle: public wxControl
62{
63public:
64 wxDisclosureTriangle(wxWindow *parent,
65 wxWindowID id,
66 const wxString& label = wxEmptyString,
67 const wxPoint& pos = wxDefaultPosition,
68 const wxSize& size = wxDefaultSize,
69 long style = 0,
70 const wxValidator& validator = wxDefaultValidator,
71 const wxString& name = wxButtonNameStr)
72 {
73 Create(parent, id, label, pos, size, style, validator, name);
74 }
75
76 bool Create(wxWindow *parent,
77 wxWindowID id,
78 const wxString& label = wxEmptyString,
79 const wxPoint& pos = wxDefaultPosition,
80 const wxSize& size = wxDefaultSize,
81 long style = 0,
82 const wxValidator& validator = wxDefaultValidator,
83 const wxString& name = wxButtonNameStr);
84
85 void SetOpen( bool open );
86 bool IsOpen() const;
87
88 // osx specific event handling common for all osx-ports
89
12b5f4b4 90 virtual bool OSXHandleClicked( double timestampsec );
6762286d
SC
91
92protected:
93 virtual wxSize DoGetBestSize() const ;
94
95};
96
5c6eb3a8 97#endif
6762286d 98 // _WX_BUTTON_H_