From ef6f2490a697e7c23fea40c567f751db05f1bbbf Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 6 Mar 2015 16:50:09 +0000 Subject: vcldemo: add a tooltip to debug rendering issue. Change-Id: Ic7c02736505969c3d74acc59b80794b3be62bf6b --- vcl/workben/vcldemo.cxx | 30 ++++++++++++++++++++++++++---- 1 file 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 #include #include +#include #include #include #include #include +#include #include #include #include @@ -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 { -- cgit