2009-01-17 10:43:43 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2010-07-13 13:29:13 +00:00
|
|
|
// Name: wx/osx/tglbtn.h
|
2009-01-17 10:43:43 +00:00
|
|
|
// Purpose: Declaration of the wxToggleButton class, which implements a
|
|
|
|
// toggle button under wxMac.
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 08.02.01
|
|
|
|
// Copyright: (c) 2004 Stefan Csomor
|
2010-07-13 13:29:13 +00:00
|
|
|
// Licence: wxWindows licence
|
2009-01-17 10:43:43 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_TOGGLEBUTTON_H_
|
|
|
|
#define _WX_TOGGLEBUTTON_H_
|
|
|
|
|
2011-06-14 13:00:42 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
|
2009-01-17 10:43:43 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-06-14 13:00:42 +00:00
|
|
|
wxToggleButton() {}
|
|
|
|
wxToggleButton(wxWindow *parent,
|
2009-01-17 10:43:43 +00:00
|
|
|
wxWindowID id,
|
2011-06-14 13:00:42 +00:00
|
|
|
const wxString& label,
|
2009-01-17 10:43:43 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
2011-06-14 13:00:42 +00:00
|
|
|
const wxString& label,
|
2009-01-17 10:43:43 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr);
|
|
|
|
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual void SetValue(bool value) wxOVERRIDE;
|
|
|
|
virtual bool GetValue() const wxOVERRIDE;
|
2009-01-17 10:43:43 +00:00
|
|
|
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual bool OSXHandleClicked( double timestampsec ) wxOVERRIDE;
|
2009-01-17 10:43:43 +00:00
|
|
|
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual void Command(wxCommandEvent& event) wxOVERRIDE;
|
2009-01-17 10:43:43 +00:00
|
|
|
|
|
|
|
protected:
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
|
2009-01-17 10:43:43 +00:00
|
|
|
|
|
|
|
private:
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton);
|
2009-01-17 10:43:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-06-14 13:00:42 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton
|
2009-01-17 10:43:43 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-06-14 13:00:42 +00:00
|
|
|
wxBitmapToggleButton() {}
|
|
|
|
wxBitmapToggleButton(wxWindow *parent,
|
2009-01-17 10:43:43 +00:00
|
|
|
wxWindowID id,
|
2011-06-14 13:00:42 +00:00
|
|
|
const wxBitmap& label,
|
2009-01-17 10:43:43 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
2011-06-14 13:00:42 +00:00
|
|
|
const wxBitmap& label,
|
2009-01-17 10:43:43 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr);
|
|
|
|
|
|
|
|
private:
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton);
|
2009-01-17 10:43:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_TOGGLEBUTTON_H_
|
|
|
|
|