wxMDIChildFrame inherits from wxFrame

toolbar work
  mini menubar change
  compile fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-07-29 13:21:22 +00:00
parent da468d387d
commit cf4219e77a
17 changed files with 228 additions and 223 deletions

View File

@@ -486,38 +486,7 @@ void wxView::OnChangeFilename(void)
wxString name;
GetDocument()->GetPrintableName(name);
// If the frame is an MDI child, just set the title to the name.
// Otherwise, append the document name to the name of the application
// I have to do an illegal cast because in wxGTK, wxMDIChildFrame
// doesn't inherited from wxFrame, Robert Roebling
wxFrame *frame = NULL;
wxMDIChildFrame *mdi_frame = NULL;
#ifdef __WXGTK__
if (GetFrame()->IsKindOf(CLASSINFO(wxMDIChildFrame)))
mdi_frame = (wxMDIChildFrame*)GetFrame();
else
#endif
frame = GetFrame();
if (frame)
{
frame->SetTitle(name);
return;
}
#ifdef __WXGTK__
if (mdi_frame)
{
if (wxTheApp->GetAppName() != "")
{
char buf[400];
sprintf(buf, "%s - %s", (const char *)wxTheApp->GetAppName(), (const char *)name);
mdi_frame->SetTitle(buf);
}
else
mdi_frame->SetTitle(name);
}
#endif
GetFrame()->SetTitle(name);
}
}