]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/radiobut.h
wxCALLBACK added, wxCOMPFUNC_CONV moved to defs.h
[wxWidgets.git] / include / wx / msw / radiobut.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
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
21 WXDLLEXPORT_DATA(extern const wxChar*) wxRadioButtonNameStr;
22
23 class WXDLLEXPORT wxRadioButton: public wxControl
24 {
25 DECLARE_DYNAMIC_CLASS(wxRadioButton)
26 protected:
27 public:
28 inline wxRadioButton(void) {}
29 inline wxRadioButton(wxWindow *parent, wxWindowID id,
30 const wxString& label,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize, long style = 0,
33 const wxValidator& validator = wxDefaultValidator,
34 const wxString& name = wxRadioButtonNameStr)
35 {
36 Create(parent, id, label, pos, size, style, validator, name);
37 }
38
39 bool Create(wxWindow *parent, wxWindowID id,
40 const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize, long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxRadioButtonNameStr);
45
46 virtual void SetLabel(const wxString& label);
47 virtual void SetValue(bool val);
48 virtual bool GetValue(void) const ;
49
50 bool MSWCommand(WXUINT param, WXWORD id);
51 void Command(wxCommandEvent& event);
52 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
53 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
54 };
55
56 // Not implemented
57 #if 0
58 class WXDLLEXPORT wxBitmap ;
59
60 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
61
62 class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
63 {
64 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
65 protected:
66 wxBitmap *theButtonBitmap;
67 public:
68 inline wxBitmapRadioButton(void) { theButtonBitmap = NULL; }
69 inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
70 const wxBitmap *label,
71 const wxPoint& pos = wxDefaultPosition,
72 const wxSize& size = wxDefaultSize, long style = 0,
73 const wxValidator& validator = wxDefaultValidator,
74 const wxString& name = wxBitmapRadioButtonNameStr)
75 {
76 Create(parent, id, label, pos, size, style, validator, name);
77 }
78
79 bool Create(wxWindow *parent, wxWindowID id,
80 const wxBitmap *label,
81 const wxPoint& pos = wxDefaultPosition,
82 const wxSize& size = wxDefaultSize, long style = 0,
83 const wxValidator& validator = wxDefaultValidator,
84 const wxString& name = wxBitmapRadioButtonNameStr);
85
86 virtual void SetLabel(const wxBitmap *label);
87 virtual void SetValue(bool val) ;
88 virtual bool GetValue(void) const ;
89 };
90 #endif
91
92 #endif
93 // _WX_RADIOBUT_H_