Applied patch [ 677730 ] Menus with radio items (wxUniv)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -115,6 +115,9 @@ private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// terminate the current radio group, if any
|
||||
void EndRadioGroup();
|
||||
|
||||
// the exact menu geometry is defined by a struct derived from this one
|
||||
// which is opaque and defined by the renderer
|
||||
wxMenuGeometryInfo *m_geometry;
|
||||
@@ -127,6 +130,9 @@ private:
|
||||
wxAcceleratorTable m_accelTable;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
// the position of the first item in the current radio group or -1
|
||||
int m_startRadioGroup;
|
||||
|
||||
// it calls out OnDismiss()
|
||||
friend class wxPopupMenuWindow;
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
|
@@ -48,6 +48,11 @@ public:
|
||||
const wxBitmap& GetBitmap(bool checked = TRUE) const
|
||||
{ return checked ? m_bmpChecked : m_bmpUnchecked; }
|
||||
|
||||
// mark item as belonging to the given radio group
|
||||
void SetAsRadioGroupStart();
|
||||
void SetRadioGroupStart(int start);
|
||||
void SetRadioGroupEnd(int end);
|
||||
|
||||
// wxUniv-specific methods for implementation only starting from here
|
||||
|
||||
// get the accel index of our label or -1 if none
|
||||
@@ -89,6 +94,19 @@ protected:
|
||||
wxBitmap m_bmpChecked,
|
||||
m_bmpUnchecked;
|
||||
|
||||
// the positions of the first and last items of the radio group this item
|
||||
// belongs to or -1: start is the radio group start and is valid for all
|
||||
// but first radio group items (m_isRadioGroupStart == FALSE), end is valid
|
||||
// only for the first one
|
||||
union
|
||||
{
|
||||
int start;
|
||||
int end;
|
||||
} m_radioGroup;
|
||||
|
||||
// does this item start a radio group?
|
||||
bool m_isRadioGroupStart;
|
||||
|
||||
// the position of the accelerator in our label, -1 if none
|
||||
int m_indexAccel;
|
||||
|
||||
|
Reference in New Issue
Block a user