// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "xh_menu.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
+#if wxUSE_XRC
+
#include "wx/xrc/xh_menu.h"
#include "wx/menu.h"
#include "wx/frame.h"
wxMenuBar *p_bar = wxDynamicCast(m_parent, wxMenuBar);
if (p_bar)
+ {
p_bar->Append(menu, title);
+ }
else
{
wxMenu *p_menu = wxDynamicCast(m_parent, wxMenu);
if (p_menu)
+ {
p_menu->Append(GetID(), title, menu, help);
+ if (HasParam(wxT("enabled")))
+ p_menu->Enable(GetID(), GetBool(wxT("enabled")));
+ }
}
return menu;
wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel,
GetText(wxT("help")), kind);
-#if wxCHECK_VERSION(2,3,0) || (defined(__WXMSW__) && wxUSE_OWNER_DRAWN)
+#if (!defined(__WXMSW__) && !defined(__WXPM__)) || wxUSE_OWNER_DRAWN
if (HasParam(wxT("bitmap")))
mitem->SetBitmap(GetBitmap(wxT("bitmap"), wxART_MENU));
#endif
{
return IsOfClass(node, wxT("wxMenuBar"));
}
+
+#endif // wxUSE_XRC