vcl/workben/vcldemo.cxx | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)
New commits: commit 39a64f7ed8c78dd325503728cf2f88316cb68dec Author: Michael Meeks <michael.me...@collabora.com> Date: Wed Mar 18 11:19:29 2015 +0000 vcldemo: make balloon help test minimal, and pop-up help on start. Change-Id: I7b0350c288a7a5fe891570387d2f0813b5d8a435 diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 3c9f3cc..d3c1198 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1447,6 +1447,10 @@ class DemoWidgets : public WorkWindow VclBox *mpBox; ToolBox *mpToolbox; PushButton *mpButton; + + Timer maHelpTimer; + DECL_LINK (HelpTimerCb, void *); + public: DemoWidgets() : WorkWindow(NULL, WB_STDWORK), @@ -1463,21 +1467,21 @@ 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(); + + maHelpTimer.SetTimeoutHdl(LINK(this,DemoWidgets,HelpTimerCb)); + maHelpTimer.SetTimeout(1000); + maHelpTimer.Start(); } virtual ~DemoWidgets() { @@ -1512,6 +1516,18 @@ public: } }; +// Horrible code to manually provoke a help event +IMPL_LINK_NOARG(DemoWidgets,HelpTimerCb) +{ + Point aPos = mpToolbox->GetPosPixel(); + aPos.Move(10,10); + HelpEvent aHelpEvent( aPos, HelpEventMode::BALLOON ); +// pSVData->maHelpData.mbRequestingHelp = true; + mpToolbox->RequestHelp( aHelpEvent ); +// pSVData->maHelpData.mbRequestingHelp = false; + return 0; +} + class DemoApp : public Application { int showHelp(DemoRenderer &rRenderer) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits