]> git.saurik.com Git - wxWidgets.git/blob - src/common/radiobtncmn.cpp
Misc validity fixes to samples/xrc/rc/*.xrc.
[wxWidgets.git] / src / common / radiobtncmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/radiobtncmn.cpp
3 // Purpose: wxRadioButton common code
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ============================================================================
12 // declarations
13 // ============================================================================
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 #if wxUSE_RADIOBTN
27
28 #include "wx/radiobut.h"
29
30 #ifndef WX_PRECOMP
31 #include "wx/settings.h"
32 #include "wx/dcscreen.h"
33 #endif
34
35 extern WXDLLEXPORT_DATA(const char) wxRadioButtonNameStr[] = "radioButton";
36 extern WXDLLEXPORT_DATA(const char) wxBitmapRadioButtonNameStr[] = "radioButton";
37
38 // ----------------------------------------------------------------------------
39 // XTI
40 // ----------------------------------------------------------------------------
41
42 wxDEFINE_FLAGS( wxRadioButtonStyle )
43 wxBEGIN_FLAGS( wxRadioButtonStyle )
44 // new style border flags, we put them first to
45 // use them for streaming out
46 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
47 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
48 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
49 wxFLAGS_MEMBER(wxBORDER_RAISED)
50 wxFLAGS_MEMBER(wxBORDER_STATIC)
51 wxFLAGS_MEMBER(wxBORDER_NONE)
52
53 // old style border flags
54 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
55 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
56 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
57 wxFLAGS_MEMBER(wxRAISED_BORDER)
58 wxFLAGS_MEMBER(wxSTATIC_BORDER)
59 wxFLAGS_MEMBER(wxBORDER)
60
61 // standard window styles
62 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
63 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
64 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
65 wxFLAGS_MEMBER(wxWANTS_CHARS)
66 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
67 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
68 wxFLAGS_MEMBER(wxVSCROLL)
69 wxFLAGS_MEMBER(wxHSCROLL)
70
71 wxFLAGS_MEMBER(wxRB_GROUP)
72 wxEND_FLAGS( wxRadioButtonStyle )
73
74 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton, wxControl, "wx/radiobut.h")
75
76 wxBEGIN_PROPERTIES_TABLE(wxRadioButton)
77 wxEVENT_PROPERTY( Click, wxEVT_RADIOBUTTON, wxCommandEvent )
78 wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
79 wxT("Helpstring"), wxT("group"))
80 wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/, \
81 wxT("Helpstring"), wxT("group") )
82 wxPROPERTY( Value,bool, SetValue, GetValue, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
83 wxT("Helpstring"), wxT("group") )
84 wxPROPERTY_FLAGS( WindowStyle, wxRadioButtonStyle, long, SetWindowStyleFlag, \
85 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
86 wxT("Helpstring"), wxT("group")) // style
87 wxEND_PROPERTIES_TABLE()
88
89 wxEMPTY_HANDLERS_TABLE(wxRadioButton)
90
91 wxCONSTRUCTOR_6( wxRadioButton, wxWindow*, Parent, wxWindowID, Id, \
92 wxString, Label, wxPoint, Position, wxSize, Size, long, WindowStyle )
93
94
95 #endif // wxUSE_RADIOBTN