]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/radiobut.h
Implement wxRB_GROUP
[wxWidgets.git] / include / wx / mac / radiobut.h
CommitLineData
0dbd6262
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: radiobut.h
3// Purpose: wxRadioButton class
4// Author: AUTHOR
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_RADIOBUT_H_
13#define _WX_RADIOBUT_H_
14
15#ifdef __GNUG__
16#pragma interface "radiobut.h"
17#endif
18
19#include "wx/control.h"
20
21WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr;
22
23class WXDLLEXPORT wxRadioButton: public wxControl
24{
079c842c
RR
25public:
26 inline wxRadioButton() {}
27 inline wxRadioButton(wxWindow *parent, wxWindowID id,
0dbd6262
SC
28 const wxString& label,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize, long style = 0,
31 const wxValidator& validator = wxDefaultValidator,
32 const wxString& name = wxRadioButtonNameStr)
079c842c
RR
33 {
34 Create(parent, id, label, pos, size, style, validator, name);
35 }
0dbd6262 36
079c842c 37 bool Create(wxWindow *parent, wxWindowID id,
0dbd6262
SC
38 const wxString& label,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize, long style = 0,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxRadioButtonNameStr);
43
079c842c
RR
44 virtual void SetValue(bool val);
45 virtual bool GetValue() const ;
0dbd6262 46
079c842c
RR
47 // implementation
48
1dd52151 49 virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart );
079c842c
RR
50 void Command(wxCommandEvent& event);
51 wxRadioButton *AddInCycle(wxRadioButton *cycle);
52 inline wxRadioButton *NextInCycle() {return m_cycle;}
53
54 void OnIdle( wxIdleEvent &event );
1dd52151 55
079c842c
RR
56protected:
57 wxRadioButton *m_cycle;
58
59private:
60 DECLARE_EVENT_TABLE()
61 DECLARE_DYNAMIC_CLASS(wxRadioButton)
0dbd6262
SC
62};
63
64// Not implemented
65#if 0
66class WXDLLEXPORT wxBitmap ;
67
68WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
69
70class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
71{
72 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
73 protected:
74 wxBitmap *theButtonBitmap;
75 public:
76 inline wxBitmapRadioButton() { theButtonBitmap = NULL; }
77 inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
78 const wxBitmap *label,
79 const wxPoint& pos = wxDefaultPosition,
80 const wxSize& size = wxDefaultSize, long style = 0,
81 const wxValidator& validator = wxDefaultValidator,
82 const wxString& name = wxBitmapRadioButtonNameStr)
83 {
84 Create(parent, id, label, pos, size, style, validator, name);
85 }
86
87 bool Create(wxWindow *parent, wxWindowID id,
88 const wxBitmap *label,
89 const wxPoint& pos = wxDefaultPosition,
90 const wxSize& size = wxDefaultSize, long style = 0,
91 const wxValidator& validator = wxDefaultValidator,
92 const wxString& name = wxBitmapRadioButtonNameStr);
93
94 virtual void SetLabel(const wxBitmap *label);
95 virtual void SetValue(bool val) ;
96 virtual bool GetValue() const ;
97};
98#endif
99
100#endif
101 // _WX_RADIOBUT_H_