diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-08-26 16:53:59 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-08-26 16:55:58 +0100 |
commit | 4c068949c28a72d77bcc161160bea117358d2958 (patch) | |
tree | 087aac6757f9538abd11c839bb33ea644f5f90ca /vcl/workben | |
parent | 015adf15ca4bb836d199c69e37446b41eeaa745a (diff) |
Add menubar to vcldemo --widgets test.
Change-Id: I848b5a8834212fce1089fb3ef2186424a1e7a11e
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/vcldemo.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 4706d29f8a33..d140b4f678bb 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 |