]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/radiobut.h
wxStrnicmp() function is not defined under windows, so I've provided a workaround...
[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 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxRadioButtonNameStr)
31 {
32 Create(parent, id, label, pos, size, style, validator, name);
33 }
34
35 bool Create(wxWindow *parent, wxWindowID id,
36 const wxString& label,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize, long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxRadioButtonNameStr);
41
42 virtual void SetLabel(const wxString& label);
43 virtual void SetValue(bool val);
44 virtual bool GetValue() const ;
45
46 bool OS2Command(WXUINT param, WXWORD id);
47 void Command(wxCommandEvent& event);
48 };
49
50 // Not implemented
51 class WXDLLEXPORT wxBitmap ;
52
53 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
54
55 class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
56 {
57 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
58 protected:
59 wxBitmap *theButtonBitmap;
60 public:
61 inline wxBitmapRadioButton() { theButtonBitmap = NULL; }
62 inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
63 const wxBitmap *label,
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize, long style = 0,
66 const wxValidator& validator = wxDefaultValidator,
67 const wxString& name = wxBitmapRadioButtonNameStr)
68 {
69 Create(parent, id, label, pos, size, style, validator, name);
70 }
71
72 bool Create(wxWindow *parent, wxWindowID id,
73 const wxBitmap *label,
74 const wxPoint& pos = wxDefaultPosition,
75 const wxSize& size = wxDefaultSize, long style = 0,
76 const wxValidator& validator = wxDefaultValidator,
77 const wxString& name = wxBitmapRadioButtonNameStr);
78
79 virtual void SetLabel(const wxBitmap *label);
80 virtual void SetValue(bool val) ;
81 virtual bool GetValue() const ;
82 private:
83 // virtual function hiding suppression, do not use
84 virtual void SetLabel(const wxString& label)
85 { wxRadioButton::SetLabel(label); };
86 };
87
88 #endif
89 // _WX_RADIOBUT_H_