Fix compilation errors due to wxAuiMDIChildFrame deriving from wxTDIChildFrame

This commit is contained in:
Robin Dunn
2018-06-18 23:34:45 -07:00
parent 3f79d925a5
commit 609246698d
2 changed files with 21 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ def run():
c = module.find('wxAuiMDIChildFrame')
c.bases = ['wxTDIChildFrame']
tools.fixTopLevelWindowClass(c)
tools.fixSetStatusWidths(c.find('SetStatusWidths'))
c.find('SetMenuBar.menuBar').transfer = True

View File

@@ -33,12 +33,30 @@ def run():
# Tweak the parsed meta objects in the module object as needed for
# customizing the generated code and docstrings.
# Let the generator know about these intermediate classes even though they
# are undocumented. wxTDIChildFrame is used elsewhere in the class hiearchy
# so it needs to be available.
module.insertItemBefore(module.find('wxMDIClientWindow'), etgtools.WigCode("""\
class wxMDIChildFrameBase : wxFrame
{
public:
wxMDIChildFrameBase();
virtual void Activate() = 0;
wxMDIParentFrame *GetMDIParent() const;
virtual bool IsTopLevel() const;
};
class wxTDIChildFrame : wxMDIChildFrameBase /Abstract/
{
public:
};
"""))
c = module.find('wxMDIClientWindow')
assert isinstance(c, etgtools.ClassDef)
tools.fixWindowClass(c)
c.find('CreateClient').isVirtual = True
c = module.find('wxMDIParentFrame')
tools.fixTopLevelWindowClass(c)
c.find('OnCreateClient').isVirtual = True
@@ -48,8 +66,8 @@ def run():
m.type = 'wxMDIClientWindow *'
m.setCppCode("return static_cast<wxMDIClientWindow*>(self->GetClientWindow());")
c = module.find('wxMDIChildFrame')
c.bases = ['wxMDIChildFrameBase']
tools.fixTopLevelWindowClass(c)