]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/button.h
Revert HasModifiers() change in behaviour, add HasAnyModifiers().
[wxWidgets.git] / include / wx / osx / button.h
CommitLineData
6762286d 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/osx/button.h
6762286d
SC
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
e5d05b90
VZ
12#ifndef _WX_OSX_BUTTON_H_
13#define _WX_OSX_BUTTON_H_
6762286d
SC
14
15#include "wx/control.h"
16#include "wx/gdicmn.h"
17
6762286d 18// Pushbutton
e5d05b90 19class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
6762286d
SC
20{
21public:
22 wxButton() {}
23 wxButton(wxWindow *parent,
24 wxWindowID id,
25 const wxString& label = wxEmptyString,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = 0,
29 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxButtonNameStr)
31 {
32 Create(parent, id, label, pos, size, style, validator, name);
33 }
34
35 bool Create(wxWindow *parent,
36 wxWindowID id,
37 const wxString& label = wxEmptyString,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = 0,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxButtonNameStr);
43
85284ca4 44 virtual void SetLabel(const wxString& label);
6762286d
SC
45 virtual wxWindow *SetDefault();
46 virtual void Command(wxCommandEvent& event);
47
48 // osx specific event handling common for all osx-ports
e5d05b90 49
12b5f4b4 50 virtual bool OSXHandleClicked( double timestampsec );
6762286d
SC
51
52protected:
6762286d
SC
53 DECLARE_DYNAMIC_CLASS(wxButton)
54};
55
e5d05b90
VZ
56// OS X specific class, not part of public wx API
57class WXDLLIMPEXP_CORE wxDisclosureTriangle : public wxControl
6762286d
SC
58{
59public:
60 wxDisclosureTriangle(wxWindow *parent,
61 wxWindowID id,
62 const wxString& label = wxEmptyString,
63 const wxPoint& pos = wxDefaultPosition,
64 const wxSize& size = wxDefaultSize,
73b1b996 65 long style = wxBORDER_NONE,
6762286d
SC
66 const wxValidator& validator = wxDefaultValidator,
67 const wxString& name = wxButtonNameStr)
68 {
69 Create(parent, id, label, pos, size, style, validator, name);
70 }
71
72 bool Create(wxWindow *parent,
73 wxWindowID id,
74 const wxString& label = wxEmptyString,
75 const wxPoint& pos = wxDefaultPosition,
76 const wxSize& size = wxDefaultSize,
73b1b996 77 long style = wxBORDER_NONE,
6762286d
SC
78 const wxValidator& validator = wxDefaultValidator,
79 const wxString& name = wxButtonNameStr);
80
81 void SetOpen( bool open );
82 bool IsOpen() const;
83
84 // osx specific event handling common for all osx-ports
e5d05b90 85
12b5f4b4 86 virtual bool OSXHandleClicked( double timestampsec );
6762286d
SC
87
88protected:
89 virtual wxSize DoGetBestSize() const ;
6762286d
SC
90};
91
e5d05b90 92#endif // _WX_OSX_BUTTON_H_