1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/radiobtncmn.cpp
3 // Purpose: wxRadioButton common code
4 // Author: Julian Smart
7 // RCS-ID: $Id: radiobut.cpp 41144 2006-09-10 23:08:13Z VZ $
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 // ----------------------------------------------------------------------------
38 // ----------------------------------------------------------------------------
40 wxDEFINE_FLAGS( wxRadioButtonStyle
)
41 wxBEGIN_FLAGS( wxRadioButtonStyle
)
42 // new style border flags, we put them first to
43 // use them for streaming out
44 wxFLAGS_MEMBER(wxBORDER_SIMPLE
)
45 wxFLAGS_MEMBER(wxBORDER_SUNKEN
)
46 wxFLAGS_MEMBER(wxBORDER_DOUBLE
)
47 wxFLAGS_MEMBER(wxBORDER_RAISED
)
48 wxFLAGS_MEMBER(wxBORDER_STATIC
)
49 wxFLAGS_MEMBER(wxBORDER_NONE
)
51 // old style border flags
52 wxFLAGS_MEMBER(wxSIMPLE_BORDER
)
53 wxFLAGS_MEMBER(wxSUNKEN_BORDER
)
54 wxFLAGS_MEMBER(wxDOUBLE_BORDER
)
55 wxFLAGS_MEMBER(wxRAISED_BORDER
)
56 wxFLAGS_MEMBER(wxSTATIC_BORDER
)
57 wxFLAGS_MEMBER(wxBORDER
)
59 // standard window styles
60 wxFLAGS_MEMBER(wxTAB_TRAVERSAL
)
61 wxFLAGS_MEMBER(wxCLIP_CHILDREN
)
62 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW
)
63 wxFLAGS_MEMBER(wxWANTS_CHARS
)
64 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE
)
65 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB
)
66 wxFLAGS_MEMBER(wxVSCROLL
)
67 wxFLAGS_MEMBER(wxHSCROLL
)
69 wxFLAGS_MEMBER(wxRB_GROUP
)
70 wxEND_FLAGS( wxRadioButtonStyle
)
72 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton
, wxControl
, "wx/radiobut.h")
74 wxBEGIN_PROPERTIES_TABLE(wxRadioButton
)
75 wxEVENT_PROPERTY( Click
, wxEVT_COMMAND_RADIOBUTTON_SELECTED
, wxCommandEvent
)
76 wxPROPERTY( Font
, wxFont
, SetFont
, GetFont
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
77 wxT("Helpstring"), wxT("group"))
78 wxPROPERTY( Label
,wxString
, SetLabel
, GetLabel
, wxString(), 0 /*flags*/, \
79 wxT("Helpstring"), wxT("group") )
80 wxPROPERTY( Value
,bool, SetValue
, GetValue
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
81 wxT("Helpstring"), wxT("group") )
82 wxPROPERTY_FLAGS( WindowStyle
, wxRadioButtonStyle
, long, SetWindowStyleFlag
, \
83 GetWindowStyleFlag
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
84 wxT("Helpstring"), wxT("group")) // style
85 wxEND_PROPERTIES_TABLE()
87 wxEMPTY_HANDLERS_TABLE(wxRadioButton
)
89 wxCONSTRUCTOR_6( wxRadioButton
, wxWindow
*, Parent
, wxWindowID
, Id
, \
90 wxString
, Label
, wxPoint
, Position
, wxSize
, Size
, long, WindowStyle
)
93 #endif // wxUSE_RADIOBTN