Kaydet (Commit) 4c068949 authored tarafından Michael Meeks's avatar Michael Meeks

Add menubar to vcldemo --widgets test.

Change-Id: I848b5a8834212fce1089fb3ef2186424a1e7a11e
üst 015adf15
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <vcl/salbtype.hxx> #include <vcl/salbtype.hxx>
#include <vcl/bmpacc.hxx> #include <vcl/bmpacc.hxx>
#include <vcl/help.hxx> #include <vcl/help.hxx>
#include <vcl/menu.hxx>
#include <basegfx/numeric/ftools.hxx> #include <basegfx/numeric/ftools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrix.hxx>
...@@ -1455,6 +1456,9 @@ public: ...@@ -1455,6 +1456,9 @@ public:
class DemoWidgets : public WorkWindow class DemoWidgets : public WorkWindow
{ {
MenuBar *mpBar;
PopupMenu *mpPopup;
VclPtr<VclBox> mpBox; VclPtr<VclBox> mpBox;
VclPtr<ToolBox> mpToolbox; VclPtr<ToolBox> mpToolbox;
VclPtr<PushButton> mpButton; VclPtr<PushButton> mpButton;
...@@ -1507,6 +1511,13 @@ public: ...@@ -1507,6 +1511,13 @@ public:
mpGLButton->Show(); mpGLButton->Show();
mpHBox->Show(); mpHBox->Show();
mpBar = new MenuBar();
mpBar->InsertItem(0,"File");
mpPopup = new PopupMenu();
mpPopup->InsertItem(0,"Item");
mpBar->SetPopupMenu(0, mpPopup);
SetMenuBar(mpBar);
Show(); Show();
} }
virtual ~DemoWidgets() { disposeOnce(); } virtual ~DemoWidgets() { disposeOnce(); }
...@@ -1519,6 +1530,8 @@ public: ...@@ -1519,6 +1530,8 @@ public:
mpToolbox.disposeAndClear(); mpToolbox.disposeAndClear();
mpButton.disposeAndClear(); mpButton.disposeAndClear();
mpBox.disposeAndClear(); mpBox.disposeAndClear();
delete mpPopup;
delete mpBar;
WorkWindow::dispose(); WorkWindow::dispose();
} }
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment