]> git.saurik.com Git - wxWidgets.git/commitdiff
added toolbars
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 11 Aug 2000 19:11:06 +0000 (19:11 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 11 Aug 2000 19:11:06 +0000 (19:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/utils/wxrcedit/editor.cpp

index db467b36a2182e9bfc4b1f08bbb17967d7da9b62..334b6f2b621a4578079cbf5c272aa80fd4d68ce3 100644 (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);
@@ -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);