xh_menu.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/xrc/xh_menu.h
  3. // Purpose: XML resource handler for menus/menubars
  4. // Author: Vaclav Slavik
  5. // Created: 2000/03/05
  6. // Copyright: (c) 2000 Vaclav Slavik
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_XH_MENU_H_
  10. #define _WX_XH_MENU_H_
  11. #include "wx/xrc/xmlres.h"
  12. #if wxUSE_XRC && wxUSE_MENUS
  13. class WXDLLIMPEXP_XRC wxMenuXmlHandler : public wxXmlResourceHandler
  14. {
  15. DECLARE_DYNAMIC_CLASS(wxMenuXmlHandler)
  16. public:
  17. wxMenuXmlHandler();
  18. virtual wxObject *DoCreateResource();
  19. virtual bool CanHandle(wxXmlNode *node);
  20. private:
  21. bool m_insideMenu;
  22. };
  23. class WXDLLIMPEXP_XRC wxMenuBarXmlHandler : public wxXmlResourceHandler
  24. {
  25. DECLARE_DYNAMIC_CLASS(wxMenuBarXmlHandler)
  26. public:
  27. wxMenuBarXmlHandler();
  28. virtual wxObject *DoCreateResource();
  29. virtual bool CanHandle(wxXmlNode *node);
  30. };
  31. #endif // wxUSE_XRC && wxUSE_MENUS
  32. #endif // _WX_XH_MENU_H_