[Libreoffice-commits] core.git: Branch 'feature/priorities' - vcl/workben
Michael Meeks
michael.meeks at collabora.com
Fri Mar 6 08:46:42 PST 2015
vcl/workben/vcldemo.cxx | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
New commits:
commit 15b390e8255d07a5a40fe9de0f71d97a66ab54ff
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Mar 6 16:50:09 2015 +0000
vcldemo: add a tooltip to debug rendering issue.
Change-Id: Ic7c02736505969c3d74acc59b80794b3be62bf6b
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index f02ac03..f1b210e 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -28,10 +28,12 @@
#include <vcl/virdev.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/button.hxx>
+#include <vcl/toolbox.hxx>
#include <vcl/pngwrite.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/bmpacc.hxx>
+#include <vcl/help.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <vcldemo-debug.hxx>
@@ -1434,15 +1436,18 @@ public:
class DemoWidgets : public WorkWindow
{
- VclBox *mpBox;
+ VclBox *mpBox;
+ ToolBox *mpToolbox;
+ PushButton *mpButton;
public:
DemoWidgets() :
- WorkWindow(NULL, WB_STDWORK)
+ WorkWindow(NULL, WB_STDWORK),
+ mpBox(new VclVBox(this, false, 3)),
+ mpToolbox(new ToolBox(mpBox)),
+ mpButton(new PushButton(mpBox))
{
SetText("VCL widget demo");
- mpBox = new VclVBox(this, false, 3);
-
Wallpaper aWallpaper(BitmapEx("sfx2/res/startcenter-logo.png"));
aWallpaper.SetStyle(WALLPAPER_BOTTOMRIGHT);
aWallpaper.SetColor(COL_RED);
@@ -1450,10 +1455,27 @@ public:
mpBox->SetBackground(aWallpaper);
mpBox->Show();
+ Help::EnableQuickHelp();
+ Help::EnableBalloonHelp();
+ Help::EnableExtHelp();
+ mpToolbox->SetHelpText("Help text");
+ mpToolbox->InsertItem(0, "Toolbar item");
+ mpToolbox->SetQuickHelpText(0, "This is a tooltip popup");
+ mpToolbox->SetHelpText(0, "This is a longer help text popup");
+ mpToolbox->InsertSeparator();
+ mpToolbox->Show();
+
+ mpButton->SetText("Click me; go on");
+ mpToolbox->SetQuickHelpText("button help text");
+ mpButton->Show();
+
Show();
}
virtual ~DemoWidgets()
{
+ delete mpButton;
+ delete mpToolbox;
+ delete mpBox;
}
virtual void Paint(const Rectangle&) SAL_OVERRIDE
{
More information about the Libreoffice-commits
mailing list