added toolbars
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8576d6a454
commit
98b99630a5
@ -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);
|
||||
@ -477,6 +477,18 @@ void EditorFrame::RefreshPreview(wxXmlNode *node)
|
||||
m_Preview->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user