X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab0f37b97b488f0ec3082dbb0abac66bd0c48bd6..6cef0db28018fd2644ee4e38af715872e5242459:/src/mac/carbon/radiobox.cpp diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index 68ad272a3c..69ce082c1b 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -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 )