1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/radiobtncmn.cpp
3 // Purpose: wxRadioButton common code
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
28 #include "wx/radiobut.h"
31 #include "wx/settings.h"
32 #include "wx/dcscreen.h"
35 extern WXDLLEXPORT_DATA(const char) wxRadioButtonNameStr
[] = "radioButton";
36 extern WXDLLEXPORT_DATA(const char) wxBitmapRadioButtonNameStr
[] = "radioButton";
38 // ----------------------------------------------------------------------------
40 // ----------------------------------------------------------------------------
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
)
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
)
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
)
71 wxFLAGS_MEMBER(wxRB_GROUP
)
72 wxEND_FLAGS( wxRadioButtonStyle
)
74 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton
, wxControl
, "wx/radiobut.h")
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()
89 wxEMPTY_HANDLERS_TABLE(wxRadioButton
)
91 wxCONSTRUCTOR_6( wxRadioButton
, wxWindow
*, Parent
, wxWindowID
, Id
, \
92 wxString
, Label
, wxPoint
, Position
, wxSize
, Size
, long, WindowStyle
)
95 #endif // wxUSE_RADIOBTN