2011-03-20 18:05:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/osx/tglbtn.h
|
|
|
|
// Purpose: Declaration of the wxToggleButton class, which implements a
|
|
|
|
// toggle button under wxMac.
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 08.02.01
|
2012-03-18 01:12:27 +00:00
|
|
|
// RCS-ID: $Id: tglbtn.h 67949 2011-06-16 00:43:22Z RD $
|
2011-03-20 18:05:19 +00:00
|
|
|
// Copyright: (c) 2004 Stefan Csomor
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_TOGGLEBUTTON_H_
|
|
|
|
#define _WX_TOGGLEBUTTON_H_
|
|
|
|
|
2012-03-18 01:12:27 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
|
2011-03-20 18:05:19 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-03-18 01:12:27 +00:00
|
|
|
wxToggleButton() {}
|
|
|
|
wxToggleButton(wxWindow *parent,
|
2011-03-20 18:05:19 +00:00
|
|
|
wxWindowID id,
|
2012-03-18 01:12:27 +00:00
|
|
|
const wxString& label,
|
2011-03-20 18:05:19 +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,
|
2012-03-18 01:12:27 +00:00
|
|
|
const wxString& label,
|
2011-03-20 18:05:19 +00: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 ;
|
|
|
|
|
|
|
|
virtual bool OSXHandleClicked( double timestampsec );
|
|
|
|
|
|
|
|
virtual void Command(wxCommandEvent& event);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
|
|
|
|
|
|
|
private:
|
2012-03-18 01:12:27 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
|
2011-03-20 18:05:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-03-18 01:12:27 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton
|
2011-03-20 18:05:19 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-03-18 01:12:27 +00:00
|
|
|
wxBitmapToggleButton() {}
|
|
|
|
wxBitmapToggleButton(wxWindow *parent,
|
2011-03-20 18:05:19 +00:00
|
|
|
wxWindowID id,
|
2012-03-18 01:12:27 +00:00
|
|
|
const wxBitmap& label,
|
2011-03-20 18:05:19 +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,
|
2012-03-18 01:12:27 +00:00
|
|
|
const wxBitmap& label,
|
2011-03-20 18:05:19 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr);
|
|
|
|
|
|
|
|
private:
|
2012-03-18 01:12:27 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
|
2011-03-20 18:05:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_TOGGLEBUTTON_H_
|
|
|
|
|