Patch [ 588732 ] makes wxRB_GROUP/radiobuttons working
from Marcin Wojdyr (wojdyr) Applied with some modifications (remove buttons from the chain on destruction, or the program will segfault). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -26,6 +26,8 @@ class WXDLLEXPORT wxRadioButton: public wxControl
|
||||
protected:
|
||||
public:
|
||||
wxRadioButton();
|
||||
~wxRadioButton() { RemoveFromCycle(); }
|
||||
|
||||
inline wxRadioButton(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@@ -52,6 +54,17 @@ public:
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
// *this function is an implementation detail*
|
||||
// clears the selection in the readiobuttons in the cycle
|
||||
// and returns the old selection (if any)
|
||||
wxRadioButton* ClearSelections();
|
||||
private:
|
||||
wxRadioButton* AddInCycle(wxRadioButton* cycle);
|
||||
void RemoveFromCycle();
|
||||
wxRadioButton* NextInCycle() { return m_cycle; }
|
||||
|
||||
wxRadioButton *m_cycle;
|
||||
};
|
||||
|
||||
// Not implemented
|
||||
|
Reference in New Issue
Block a user