]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_menu.cpp
overseeing the obvious, there is already a perfect scroll call for HIView...
[wxWidgets.git] / contrib / src / xrc / xh_menu.cpp
index ec9a9d0f5ffb21787bb626546b35f0a42ba8e4c8..5df0d5f8d5f779f47feffcd6b7097b285838fde6 100644 (file)
@@ -23,6 +23,7 @@
 #include "wx/menu.h"
 #include "wx/frame.h"
 
+IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler)
 
 wxMenuXmlHandler::wxMenuXmlHandler() : 
         wxXmlResourceHandler(), m_insideMenu(FALSE)
@@ -85,11 +86,9 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
             wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel,
                                                GetText(wxT("help")), kind);
                                                
-#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__)
-#if wxUSE_OWNER_DRAWN
-                if (HasParam(wxT("bitmap")))
-                    mitem->SetBitmap(GetBitmap(wxT("bitmap"), wxART_MENU));
-#endif
+#if wxCHECK_VERSION(2,3,0) || (defined(__WXMSW__) && wxUSE_OWNER_DRAWN)
+            if (HasParam(wxT("bitmap")))
+                mitem->SetBitmap(GetBitmap(wxT("bitmap"), wxART_MENU));
 #endif
             p_menu->Append(mitem);
             mitem->Enable(GetBool(wxT("enabled"), TRUE));
@@ -112,6 +111,8 @@ bool wxMenuXmlHandler::CanHandle(wxXmlNode *node)
            );
 }
 
+IMPLEMENT_DYNAMIC_CLASS(wxMenuBarXmlHandler, wxXmlResourceHandler)
+
 wxMenuBarXmlHandler::wxMenuBarXmlHandler() : wxXmlResourceHandler()
 {
     XRC_ADD_STYLE(wxMB_DOCKABLE);