From: Václav Slavík Date: Fri, 11 Aug 2000 19:11:06 +0000 (+0000) Subject: added toolbars X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/98b99630a5ad8d11ba6ebc16bcd9686bbe06f66a added toolbars git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/utils/wxrcedit/editor.cpp b/contrib/utils/wxrcedit/editor.cpp index db467b36a2..334b6f2b62 100644 --- a/contrib/utils/wxrcedit/editor.cpp +++ b/contrib/utils/wxrcedit/editor.cpp @@ -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);