added toolbars

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2000-08-11 19:11:06 +00:00
parent 8576d6a454
commit 98b99630a5

View File

@ -434,7 +434,7 @@ void EditorFrame::RefreshPreview(wxXmlNode *node)
if (node->GetName() == "dialog")
{
wxDialog *dlg = new wxDialog;
if (res->LoadDialog(dlg, this, node->GetPropVal("name", "-1")))
if (res->LoadDialog(dlg, NULL, node->GetPropVal("name", "-1")))
{
if (pos.x != -1) dlg->Move(pos);
dlg->Show(TRUE);
@ -478,6 +478,18 @@ void EditorFrame::RefreshPreview(wxXmlNode *node)
}
}
else if (node->GetName() == "toolbar")
{
wxFrame *frame = new wxFrame(NULL, -1, _("Menu preview"), pos, size);
frame->SetToolBar(res->LoadToolBar(frame, node->GetPropVal("name", "-1")));
frame->CreateStatusBar();
if (m_Preview) m_Preview->Close(TRUE);
m_Preview = frame;
m_Preview->SetName("preview_window");
m_Preview->Show(TRUE);
m_Preview->SetFocus();
}
delete res;
wxRemoveFile(tempfile);
}