]> git.saurik.com Git - wxWidgets.git/commitdiff
wxPython needs wxRTTI info for wxToolBarToolBase in order to return
authorRobin Dunn <robin@alldunn.com>
Wed, 17 Dec 2003 21:12:36 +0000 (21:12 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 17 Dec 2003 21:12:36 +0000 (21:12 +0000)
objects of the right type.  Also made FindById public.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/tbarbase.h
src/common/tbarbase.cpp

index 30396a4b077500dc01bca1c422cb3e1b1e35de5a..16344e72f4416b9816fbd41a39e047c943fabe45 100644 (file)
@@ -235,7 +235,7 @@ protected:
     wxString m_shortHelpString;
     wxString m_longHelpString;
 
-    DECLARE_NO_COPY_CLASS(wxToolBarToolBase)
+    DECLARE_DYNAMIC_CLASS_NO_COPY(wxToolBarToolBase)
 };
 
 // a list of toolbar tools
@@ -427,6 +427,9 @@ public:
     virtual wxToolBarToolBase *FindToolForPosition(wxCoord x,
                                                    wxCoord y) const = 0;
 
+    // find the tool by id
+    wxToolBarToolBase *FindById(int toolid) const;
+
     // return TRUE if this is a vertical toolbar, otherwise FALSE
     bool IsVertical() const { return HasFlag(wxTB_VERTICAL); }
 
@@ -572,9 +575,6 @@ protected:
     // helper functions
     // ----------------
 
-    // find the tool by id
-    wxToolBarToolBase *FindById(int toolid) const;
-
     // un-toggle all buttons in the same radio group
     void UnToggleRadioGroup(wxToolBarToolBase *tool);
 
index 62ec150e49507b44c7c80d442ebe4738560e3279..f2310dc1a912e1e92dfdf62172f7ae7efd2beeac 100644 (file)
@@ -59,6 +59,8 @@ WX_DEFINE_LIST(wxToolBarToolsList);
 // wxToolBarToolBase
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_DYNAMIC_CLASS(wxToolBarToolBase, wxObject)   
+
 bool wxToolBarToolBase::Enable(bool enable)
 {
     if ( m_enabled == enable )