1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/radiobtncmn.cpp
3 // Purpose: wxRadioButton common code
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
29 #include "wx/radiobut.h"
32 #include "wx/settings.h"
33 #include "wx/dcscreen.h"
36 extern WXDLLEXPORT_DATA(const char) wxRadioButtonNameStr
[] = "radioButton";
37 extern WXDLLEXPORT_DATA(const char) wxBitmapRadioButtonNameStr
[] = "radioButton";
39 // ----------------------------------------------------------------------------
41 // ----------------------------------------------------------------------------
43 wxDEFINE_FLAGS( wxRadioButtonStyle
)
44 wxBEGIN_FLAGS( wxRadioButtonStyle
)
45 // new style border flags, we put them first to
46 // use them for streaming out
47 wxFLAGS_MEMBER(wxBORDER_SIMPLE
)
48 wxFLAGS_MEMBER(wxBORDER_SUNKEN
)
49 wxFLAGS_MEMBER(wxBORDER_DOUBLE
)
50 wxFLAGS_MEMBER(wxBORDER_RAISED
)
51 wxFLAGS_MEMBER(wxBORDER_STATIC
)
52 wxFLAGS_MEMBER(wxBORDER_NONE
)
54 // old style border flags
55 wxFLAGS_MEMBER(wxSIMPLE_BORDER
)
56 wxFLAGS_MEMBER(wxSUNKEN_BORDER
)
57 wxFLAGS_MEMBER(wxDOUBLE_BORDER
)
58 wxFLAGS_MEMBER(wxRAISED_BORDER
)
59 wxFLAGS_MEMBER(wxSTATIC_BORDER
)
60 wxFLAGS_MEMBER(wxBORDER
)
62 // standard window styles
63 wxFLAGS_MEMBER(wxTAB_TRAVERSAL
)
64 wxFLAGS_MEMBER(wxCLIP_CHILDREN
)
65 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW
)
66 wxFLAGS_MEMBER(wxWANTS_CHARS
)
67 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE
)
68 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB
)
69 wxFLAGS_MEMBER(wxVSCROLL
)
70 wxFLAGS_MEMBER(wxHSCROLL
)
72 wxFLAGS_MEMBER(wxRB_GROUP
)
73 wxEND_FLAGS( wxRadioButtonStyle
)
75 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton
, wxControl
, "wx/radiobut.h")
77 wxBEGIN_PROPERTIES_TABLE(wxRadioButton
)
78 wxEVENT_PROPERTY( Click
, wxEVT_RADIOBUTTON
, wxCommandEvent
)
79 wxPROPERTY( Font
, wxFont
, SetFont
, GetFont
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
80 wxT("Helpstring"), wxT("group"))
81 wxPROPERTY( Label
,wxString
, SetLabel
, GetLabel
, wxString(), 0 /*flags*/, \
82 wxT("Helpstring"), wxT("group") )
83 wxPROPERTY( Value
,bool, SetValue
, GetValue
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
84 wxT("Helpstring"), wxT("group") )
85 wxPROPERTY_FLAGS( WindowStyle
, wxRadioButtonStyle
, long, SetWindowStyleFlag
, \
86 GetWindowStyleFlag
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
87 wxT("Helpstring"), wxT("group")) // style
88 wxEND_PROPERTIES_TABLE()
90 wxEMPTY_HANDLERS_TABLE(wxRadioButton
)
92 wxCONSTRUCTOR_6( wxRadioButton
, wxWindow
*, Parent
, wxWindowID
, Id
, \
93 wxString
, Label
, wxPoint
, Position
, wxSize
, Size
, long, WindowStyle
)
96 #endif // wxUSE_RADIOBTN