summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-18 11:19:29 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-03-18 11:40:44 +0000
commit8b39c01c5db663c835a6cabb4a5108939d50adc6 (patch)
treedc5d0a895ad50b5185b8364daccd7e97cae3b2d5
parent413f7c3642a6a237848e2c6d3b279bdf4d808c31 (diff)
vcldemo: make balloon help test minimal, and pop-up help on start.
Change-Id: I7b0350c288a7a5fe891570387d2f0813b5d8a435
-rw-r--r--vcl/workben/vcldemo.cxx24
1 files changed, 20 insertions, 4 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 3c9f3cc9798f..182d488a1a77 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(100);
+ 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)