+ MENU_CLASS_HEADER = """\
+class xrc%(windowName)s(wx.%(windowClass)s):
+ def __init__(self):
+ pre = get_resources().LoadMenu("%(windowName)s")
+
+ # This is a copy of Robin's PostCreate voodoo magic in wx.Window that
+ # relinks the self object with the menu object.
+ self.this = pre.this
+ self.thisown = pre.thisown
+ pre.thisown = 0
+ if hasattr(self, '_setOORInfo'):
+ self._setOORInfo(self)
+ if hasattr(self, '_setCallbackInfo'):
+ self._setCallbackInfo(self, self.__class__)
+
+ # Define variables for the menu items
+"""
+
+ CREATE_MENUITEM_VAR = """\
+ self.%(widgetName)s = self.FindItemById(xrc.XRCID(\"%(widgetName)s\"))
+"""
+