]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/radiobut.h
Some minor modifications for VA 4.0 support
[wxWidgets.git] / include / wx / os2 / radiobut.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/12/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_RADIOBUT_H_
13 #define _WX_RADIOBUT_H_
14
15 #include "wx/control.h"
16
17 WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr;
18
19 class WXDLLEXPORT wxRadioButton: public wxControl
20 {
21 DECLARE_DYNAMIC_CLASS(wxRadioButton)
22 protected:
23 public:
24 inline wxRadioButton() {}
25 inline wxRadioButton(wxWindow *parent, wxWindowID id,
26 const wxString& label,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize, long style = 0,
29 #if wxUSE_VALIDATORS
30 # if defined(__VISAGECPP__)
31 const wxValidator* validator = wxDefaultValidator,
32 # else
33 const wxValidator& validator = wxDefaultValidator,
34 # endif
35 #endif
36 const wxString& name = wxRadioButtonNameStr)
37 {
38 Create(parent, id, label, pos, size, style, validator, name);
39 }
40
41 bool Create(wxWindow *parent, wxWindowID id,
42 const wxString& label,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize, long style = 0,
45 #if wxUSE_VALIDATORS
46 # if defined(__VISAGECPP__)
47 const wxValidator* validator = wxDefaultValidator,
48 # else
49 const wxValidator& validator = wxDefaultValidator,
50 # endif
51 #endif
52 const wxString& name = wxRadioButtonNameStr);
53
54 virtual void SetLabel(const wxString& label);
55 virtual void SetValue(bool val);
56 virtual bool GetValue() const ;
57
58 bool OS2Command(WXUINT param, WXWORD id);
59 void Command(wxCommandEvent& event);
60 };
61
62 // Not implemented
63 class WXDLLEXPORT wxBitmap ;
64
65 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
66
67 class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
68 {
69 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
70 protected:
71 wxBitmap *theButtonBitmap;
72 public:
73 inline wxBitmapRadioButton() { theButtonBitmap = NULL; }
74 inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
75 const wxBitmap *label,
76 const wxPoint& pos = wxDefaultPosition,
77 const wxSize& size = wxDefaultSize, long style = 0,
78 #if wxUSE_VALIDATORS
79 # if defined(__VISAGECPP__)
80 const wxValidator* validator = wxDefaultValidator,
81 # else
82 const wxValidator& validator = wxDefaultValidator,
83 # endif
84 #endif
85 const wxString& name = wxBitmapRadioButtonNameStr)
86 {
87 Create(parent, id, label, pos, size, style, validator, name);
88 }
89
90 bool Create(wxWindow *parent, wxWindowID id,
91 const wxBitmap *label,
92 const wxPoint& pos = wxDefaultPosition,
93 const wxSize& size = wxDefaultSize, long style = 0,
94 #if wxUSE_VALIDATORS
95 # if defined(__VISAGECPP__)
96 const wxValidator* validator = wxDefaultValidator,
97 # else
98 const wxValidator& validator = wxDefaultValidator,
99 # endif
100 #endif
101 const wxString& name = wxBitmapRadioButtonNameStr);
102
103 virtual void SetLabel(const wxBitmap *label);
104 virtual void SetValue(bool val) ;
105 virtual bool GetValue() const ;
106 private:
107 // virtual function hiding suppression, do not use
108 virtual void SetLabel(const wxString& label)
109 { wxRadioButton::SetLabel(label); };
110 };
111
112 #endif
113 // _WX_RADIOBUT_H_