[Libreoffice-commits] core.git: vcl/workben

Michael Meeks michael.meeks at collabora.com
Wed Aug 26 08:46:41 PDT 2015


 vcl/workben/vcldemo.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 4c068949c28a72d77bcc161160bea117358d2958
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Aug 26 16:53:59 2015 +0100

    Add menubar to vcldemo --widgets test.
    
    Change-Id: I848b5a8834212fce1089fb3ef2186424a1e7a11e

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 4706d29..d140b4f 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -37,6 +37,7 @@
 #include <vcl/salbtype.hxx>
 #include <vcl/bmpacc.hxx>
 #include <vcl/help.hxx>
+#include <vcl/menu.hxx>
 
 #include <basegfx/numeric/ftools.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
@@ -1455,6 +1456,9 @@ public:
 
 class DemoWidgets : public WorkWindow
 {
+    MenuBar *mpBar;
+    PopupMenu *mpPopup;
+
     VclPtr<VclBox> mpBox;
     VclPtr<ToolBox> mpToolbox;
     VclPtr<PushButton> mpButton;
@@ -1507,6 +1511,13 @@ public:
         mpGLButton->Show();
         mpHBox->Show();
 
+        mpBar = new MenuBar();
+        mpBar->InsertItem(0,"File");
+        mpPopup = new PopupMenu();
+        mpPopup->InsertItem(0,"Item");
+        mpBar->SetPopupMenu(0, mpPopup);
+        SetMenuBar(mpBar);
+
         Show();
     }
     virtual ~DemoWidgets() { disposeOnce(); }
@@ -1519,6 +1530,8 @@ public:
         mpToolbox.disposeAndClear();
         mpButton.disposeAndClear();
         mpBox.disposeAndClear();
+        delete mpPopup;
+        delete mpBar;
         WorkWindow::dispose();
     }
     virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE


More information about the Libreoffice-commits mailing list