From 1661354b7768a23db967756181858ac32ca03d01 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 30 Nov 2005 17:28:18 +0000 Subject: [PATCH] implemented IsItemEnabled/Shown() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/univ/radiobox.h | 3 +++ src/univ/radiobox.cpp | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/wx/univ/radiobox.h b/include/wx/univ/radiobox.h index 7cb1bb7888..784b14da87 100644 --- a/include/wx/univ/radiobox.h +++ b/include/wx/univ/radiobox.h @@ -92,6 +92,9 @@ public: virtual bool Enable(int n, bool enable = true); virtual bool Show(int n, bool show = true); + virtual bool IsItemEnabled(int n) const; + virtual bool IsItemShown(int n) const; + // we also override the wxControl methods to avoid virtual function hiding virtual bool Enable(bool enable = true); virtual bool Show(bool show = true); diff --git a/src/univ/radiobox.cpp b/src/univ/radiobox.cpp index 9b45f78351..e4038b1a0d 100644 --- a/src/univ/radiobox.cpp +++ b/src/univ/radiobox.cpp @@ -304,6 +304,13 @@ bool wxRadioBox::Enable(int n, bool enable) return m_buttons[n]->Enable(enable); } +bool wxRadioBox::IsItemEnabled(int n) const +{ + wxCHECK_MSG( IsValid(n), false, _T("invalid index in wxRadioBox::IsItemEnabled") ); + + return m_buttons[n]->IsEnabled(); +} + bool wxRadioBox::Show(int n, bool show) { wxCHECK_MSG( IsValid(n), false, _T("invalid index in wxRadioBox::Show") ); @@ -311,6 +318,13 @@ bool wxRadioBox::Show(int n, bool show) return m_buttons[n]->Show(show); } +bool wxRadioBox::IsItemShown(int n) const +{ + wxCHECK_MSG( IsValid(n), false, _T("invalid index in wxRadioBox::IsItemShown") ); + + return m_buttons[n]->IsShown(); +} + // ---------------------------------------------------------------------------- // methods forwarded to the static box // ---------------------------------------------------------------------------- -- 2.45.2