]> git.saurik.com Git - wxWidgets.git/commitdiff
implemented IsItemEnabled/Shown()
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 30 Nov 2005 17:28:18 +0000 (17:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 30 Nov 2005 17:28:18 +0000 (17:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/univ/radiobox.h
src/univ/radiobox.cpp

index 7cb1bb788834e694a5e76ddd8f7f21c9d8ae54c0..784b14da877061a429e820e2612bbe90b0e5fd4a 100644 (file)
@@ -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);
index 9b45f783513e5596c824a19b9ee850505804a2dd..e4038b1a0d7d8511bb1be0e1da8a3b3cc3d08b4d 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------