]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/button.h
Fixed regression: in wxPropertyGrid::PerformValidation(), wxPGProperty::ValidateValue...
[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
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
44 static wxSize GetDefaultSize();
45
85284ca4 46 virtual void SetLabel(const wxString& label);
6762286d
SC
47 virtual wxWindow *SetDefault();
48 virtual void Command(wxCommandEvent& event);
49
50 // osx specific event handling common for all osx-ports
e5d05b90 51
12b5f4b4 52 virtual bool OSXHandleClicked( double timestampsec );
6762286d
SC
53
54protected:
55 virtual wxSize DoGetBestSize() const ;
56
e5d05b90
VZ
57#if wxOSX_USE_COCOA
58 virtual wxBitmap DoGetBitmap(State which) const;
59 virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
60 virtual void DoSetBitmapPosition(wxDirection dir);
61#endif // wxOSX_USE_COCOA
62
6762286d
SC
63 DECLARE_DYNAMIC_CLASS(wxButton)
64};
65
e5d05b90
VZ
66// OS X specific class, not part of public wx API
67class WXDLLIMPEXP_CORE wxDisclosureTriangle : public wxControl
6762286d
SC
68{
69public:
70 wxDisclosureTriangle(wxWindow *parent,
71 wxWindowID id,
72 const wxString& label = wxEmptyString,
73 const wxPoint& pos = wxDefaultPosition,
74 const wxSize& size = wxDefaultSize,
75 long style = 0,
76 const wxValidator& validator = wxDefaultValidator,
77 const wxString& name = wxButtonNameStr)
78 {
79 Create(parent, id, label, pos, size, style, validator, name);
80 }
81
82 bool Create(wxWindow *parent,
83 wxWindowID id,
84 const wxString& label = wxEmptyString,
85 const wxPoint& pos = wxDefaultPosition,
86 const wxSize& size = wxDefaultSize,
87 long style = 0,
88 const wxValidator& validator = wxDefaultValidator,
89 const wxString& name = wxButtonNameStr);
90
91 void SetOpen( bool open );
92 bool IsOpen() const;
93
94 // osx specific event handling common for all osx-ports
e5d05b90 95
12b5f4b4 96 virtual bool OSXHandleClicked( double timestampsec );
6762286d
SC
97
98protected:
99 virtual wxSize DoGetBestSize() const ;
e5d05b90 100
6762286d
SC
101};
102
e5d05b90 103#endif // _WX_OSX_BUTTON_H_