2009-01-17 05:43:43 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2010-07-13 09:29:13 -04:00
|
|
|
// Name: wx/osx/tglbtn.h
|
2009-01-17 05:43:43 -05: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 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2009-01-17 05:43:43 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_TOGGLEBUTTON_H_
|
|
|
|
#define _WX_TOGGLEBUTTON_H_
|
|
|
|
|
2011-06-14 09:00:42 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
|
2009-01-17 05:43:43 -05:00
|
|
|
{
|
|
|
|
public:
|
2011-06-14 09:00:42 -04:00
|
|
|
wxToggleButton() {}
|
|
|
|
wxToggleButton(wxWindow *parent,
|
2009-01-17 05:43:43 -05:00
|
|
|
wxWindowID id,
|
2011-06-14 09:00:42 -04:00
|
|
|
const wxString& label,
|
2009-01-17 05:43:43 -05: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 09:00:42 -04:00
|
|
|
const wxString& label,
|
2009-01-17 05:43:43 -05:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr);
|
|
|
|
|
|
|
|
virtual void SetValue(bool value);
|
|
|
|
virtual bool GetValue() const ;
|
|
|
|
|
2009-01-23 03:40:26 -05:00
|
|
|
virtual bool OSXHandleClicked( double timestampsec );
|
2009-01-17 05:43:43 -05:00
|
|
|
|
|
|
|
virtual void Command(wxCommandEvent& event);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
|
|
|
|
|
|
|
private:
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton);
|
2009-01-17 05:43:43 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-06-14 09:00:42 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton
|
2009-01-17 05:43:43 -05:00
|
|
|
{
|
|
|
|
public:
|
2011-06-14 09:00:42 -04:00
|
|
|
wxBitmapToggleButton() {}
|
|
|
|
wxBitmapToggleButton(wxWindow *parent,
|
2009-01-17 05:43:43 -05:00
|
|
|
wxWindowID id,
|
2011-06-14 09:00:42 -04:00
|
|
|
const wxBitmap& label,
|
2009-01-17 05:43:43 -05: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 09:00:42 -04:00
|
|
|
const wxBitmap& label,
|
2009-01-17 05:43:43 -05:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr);
|
|
|
|
|
|
|
|
private:
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton);
|
2009-01-17 05:43:43 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_TOGGLEBUTTON_H_
|
|
|
|
|