X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427ff66291af2d8dd34ff5ee68c81436997144a1..9c54e4ae1f401a9c337b97b588e5a356d79cbe82:/src/mac/radiobox.cpp diff --git a/src/mac/radiobox.cpp b/src/mac/radiobox.cpp index 141c7971fc..fb47af661a 100644 --- a/src/mac/radiobox.cpp +++ b/src/mac/radiobox.cpp @@ -28,9 +28,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) #endif -#pragma mark - -#pragma mark ### Constructors & destructor ### - //------------------------------------------------------------------------------------- // ¥ wxRadioBox() //------------------------------------------------------------------------------------- @@ -77,6 +74,8 @@ wxRadioBox::wxRadioBox() wxRadioBox::~wxRadioBox() { + m_isBeingDeleted = TRUE; + wxRadioButton *next,*current; current=m_radioButtonCycle->NextInCycle(); @@ -100,6 +99,9 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, int majorDim, long style, const wxValidator& val, const wxString& name) { + if ( !wxControl::Create(parent, id, pos, size, style, val, name) ) + return false; + int i; m_noItems = n; @@ -122,8 +124,15 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, for (i = 0; i < n; i++) { - wxRadioButton *radBtn = new wxRadioButton(this, NewControlId(), wxStripMenuCodes(choices[i]),wxPoint(5,20*i+10), - wxDefaultSize , i == 0 ? wxRB_GROUP : 0 ) ; + wxRadioButton *radBtn = new wxRadioButton + ( + this, + wxID_ANY, + wxStripMenuCodes(choices[i]), + wxPoint(5,20*i+10), + wxDefaultSize, + i == 0 ? wxRB_GROUP : 0 + ); if ( i == 0 ) m_radioButtonCycle = radBtn ; // m_radioButtonCycle=radBtn->AddInCycle(m_radioButtonCycle); @@ -136,9 +145,6 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, } -#pragma mark - -#pragma mark ### Specific functions (reference v2) ### - //------------------------------------------------------------------------------------- // ¥ Enable(bool) //------------------------------------------------------------------------------------- @@ -337,9 +343,6 @@ void wxRadioBox::Show(int item, bool show) current->Show(show); } -#pragma mark - -#pragma mark ### Other external functions ### - //------------------------------------------------------------------------------------- // ¥ Command //------------------------------------------------------------------------------------- @@ -371,15 +374,12 @@ void wxRadioBox::SetFocus() } -#pragma mark - -#pragma mark ### Internal functions ### - //------------------------------------------------------------------------------------- // ¥ DoSetSize //------------------------------------------------------------------------------------- // Simulates the effect of the user issuing a command to the item -#define RADIO_SIZE 40 +#define RADIO_SIZE 20 void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) { @@ -423,7 +423,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) if (maxHeight