Motif files added.
[wxWidgets.git] / src / motif / radiobut.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: radiobut.cpp
3 // Purpose: wxRadioButton
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "radiobut.h"
14 #endif
15
16 #include "wx/radiobut.h"
17
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
20 #endif
21
22 bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
23 const wxString& label,
24 const wxPoint& pos,
25 const wxSize& size, long style,
26 const wxValidator& validator,
27 const wxString& name)
28 {
29 SetName(name);
30 SetValidator(validator);
31
32 if (parent) parent->AddChild(this);
33
34 if ( id == -1 )
35 m_windowId = (int)NewControlId();
36 else
37 m_windowId = id;
38
39 m_windowStyle = style ;
40
41 // TODO create radiobutton
42 return FALSE;
43 }
44
45 void wxRadioButton::SetLabel(const wxString& label)
46 {
47 // TODO
48 }
49
50 void wxRadioButton::SetValue(bool value)
51 {
52 // TODO
53 }
54
55 // Get single selection, for single choice list items
56 bool wxRadioButton::GetValue() const
57 {
58 // TODO
59 return FALSE;
60 }
61
62 void wxRadioButton::Command (wxCommandEvent & event)
63 {
64 SetValue ( (event.m_commandInt != 0) );
65 ProcessCommand (event);
66 }
67
68