2009-01-17 05:43:43 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/osx/radiobut.h
|
2009-01-17 05:43:43 -05:00
|
|
|
// Purpose: wxRadioButton class
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// Copyright: (c) Stefan Csomor
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_RADIOBUT_H_
|
|
|
|
#define _WX_RADIOBUT_H_
|
|
|
|
|
2020-09-21 11:59:22 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase
|
2009-01-17 05:43:43 -05:00
|
|
|
{
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxRadioButton);
|
|
|
|
|
2009-01-17 05:43:43 -05:00
|
|
|
public:
|
2015-10-25 13:20:32 -04:00
|
|
|
wxRadioButton() {}
|
|
|
|
wxRadioButton(wxWindow *parent, wxWindowID id,
|
2009-01-17 05:43:43 -05:00
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
2019-10-22 06:34:29 -04:00
|
|
|
const wxString& name = wxASCII_STR(wxRadioButtonNameStr))
|
2009-01-17 05:43:43 -05:00
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
virtual ~wxRadioButton();
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
2019-10-22 06:34:29 -04:00
|
|
|
const wxString& name = wxASCII_STR(wxRadioButtonNameStr));
|
2009-01-17 05:43:43 -05:00
|
|
|
|
2020-09-21 10:08:16 -04:00
|
|
|
virtual void SetValue(bool val) wxOVERRIDE;
|
|
|
|
virtual bool GetValue() const wxOVERRIDE;
|
2009-01-17 05:43:43 -05:00
|
|
|
|
2009-08-21 06:41:26 -04:00
|
|
|
// implementation
|
|
|
|
|
2019-04-05 14:08:53 -04:00
|
|
|
void Command(wxCommandEvent& event) wxOVERRIDE;
|
2009-01-17 05:43:43 -05:00
|
|
|
wxRadioButton *AddInCycle(wxRadioButton *cycle);
|
|
|
|
void RemoveFromCycle();
|
2015-10-25 13:20:32 -04:00
|
|
|
wxRadioButton *NextInCycle() {return m_cycle;}
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2009-01-17 05:43:43 -05:00
|
|
|
// osx specific event handling common for all osx-ports
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2019-04-05 14:08:53 -04:00
|
|
|
virtual bool OSXHandleClicked(double timestampsec) wxOVERRIDE;
|
2009-01-17 05:43:43 -05:00
|
|
|
protected:
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2009-01-17 05:43:43 -05:00
|
|
|
wxRadioButton *m_cycle;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Not implemented
|
|
|
|
#if 0
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBitmap ;
|
|
|
|
|
|
|
|
WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxBitmapRadioButtonNameStr[];
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxBitmapRadioButton: public wxRadioButton
|
|
|
|
{
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxBitmapRadioButton);
|
|
|
|
protected:
|
2009-01-17 05:43:43 -05:00
|
|
|
wxBitmap *theButtonBitmap;
|
2015-04-23 07:49:01 -04:00
|
|
|
public:
|
2015-10-25 13:20:32 -04:00
|
|
|
wxBitmapRadioButton() { theButtonBitmap = NULL; }
|
|
|
|
wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
|
2009-01-17 05:43:43 -05:00
|
|
|
const wxBitmap *label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxBitmapRadioButtonNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxBitmap *label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxBitmapRadioButtonNameStr);
|
|
|
|
|
|
|
|
virtual void SetLabel(const wxBitmap *label);
|
|
|
|
virtual void SetValue(bool val) ;
|
|
|
|
virtual bool GetValue() const ;
|
|
|
|
};
|
2008-06-11 12:30:48 -04:00
|
|
|
#endif
|
2009-01-17 05:43:43 -05:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_RADIOBUT_H_
|