X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/716d0327363e81485eb6dd13b62d6f83c9dd4bab..5c7b506103cfc078a821860766e31c47d595e07f:/src/mac/carbon/radiobox.cpp diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index da6e258868..69ce082c1b 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -107,7 +107,7 @@ bool wxRadioBox::Create( wxWindow *parent, SetMajorDim( majorDim == 0 ? n : majorDim, style ); - m_label = label; + m_labelOrig = m_label = label; Rect bounds = wxMacGetBoundsForControl( this, pos, size ); if ( bounds.right <= bounds.left ) @@ -181,6 +181,22 @@ bool wxRadioBox::Enable(unsigned int item, bool enable) return current->Enable( enable ); } +bool wxRadioBox::IsItemEnabled(unsigned int item) const +{ + if (!IsValid( item )) + return false; + + unsigned int i = 0; + wxRadioButton *current = m_radioButtonCycle; + while (i != item) + { + i++; + current = current->NextInCycle(); + } + + return current->IsEnabled(); +} + // Returns the radiobox label // wxString wxRadioBox::GetLabel() const @@ -309,6 +325,23 @@ bool wxRadioBox::Show(unsigned int item, bool show) return current->Show( show ); } +bool wxRadioBox::IsItemShown(unsigned int item) const +{ + if (!IsValid( item )) + return false; + + unsigned int i = 0; + wxRadioButton *current = m_radioButtonCycle; + while (i != item) + { + i++; + current = current->NextInCycle(); + } + + return current->IsShown(); +} + + // Simulates the effect of the user issuing a command to the item // void wxRadioBox::Command( wxCommandEvent& event )