diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-06 16:50:09 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-03-06 16:53:10 +0000 |
commit | ef6f2490a697e7c23fea40c567f751db05f1bbbf (patch) | |
tree | a4a0f27c6e2fa48d95611c8ffc40919453053250 | |
parent | 2c0189a8a3aeb3668bf6de1ea1958ba475b80a38 (diff) |
vcldemo: add a tooltip to debug rendering issue.
Change-Id: Ic7c02736505969c3d74acc59b80794b3be62bf6b
-rw-r--r-- | vcl/workben/vcldemo.cxx | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 70e4ac8b6979..435e4e87edbc 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 { |