Kaydet (Commit) ef6f2490 authored tarafından Michael Meeks's avatar Michael Meeks

vcldemo: add a tooltip to debug rendering issue.

Change-Id: Ic7c02736505969c3d74acc59b80794b3be62bf6b
üst 2c0189a8
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
#include <vcl/virdev.hxx> #include <vcl/virdev.hxx>
#include <vcl/graphicfilter.hxx> #include <vcl/graphicfilter.hxx>
#include <vcl/button.hxx> #include <vcl/button.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/pngwrite.hxx> #include <vcl/pngwrite.hxx>
#include <vcl/floatwin.hxx> #include <vcl/floatwin.hxx>
#include <vcl/salbtype.hxx> #include <vcl/salbtype.hxx>
#include <vcl/bmpacc.hxx> #include <vcl/bmpacc.hxx>
#include <vcl/help.hxx>
#include <basegfx/numeric/ftools.hxx> #include <basegfx/numeric/ftools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrix.hxx>
#include <vcldemo-debug.hxx> #include <vcldemo-debug.hxx>
...@@ -1434,15 +1436,18 @@ public: ...@@ -1434,15 +1436,18 @@ public:
class DemoWidgets : public WorkWindow class DemoWidgets : public WorkWindow
{ {
VclBox *mpBox; VclBox *mpBox;
ToolBox *mpToolbox;
PushButton *mpButton;
public: public:
DemoWidgets() : 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"); SetText("VCL widget demo");
mpBox = new VclVBox(this, false, 3);
Wallpaper aWallpaper(BitmapEx("sfx2/res/startcenter-logo.png")); Wallpaper aWallpaper(BitmapEx("sfx2/res/startcenter-logo.png"));
aWallpaper.SetStyle(WALLPAPER_BOTTOMRIGHT); aWallpaper.SetStyle(WALLPAPER_BOTTOMRIGHT);
aWallpaper.SetColor(COL_RED); aWallpaper.SetColor(COL_RED);
...@@ -1450,10 +1455,27 @@ public: ...@@ -1450,10 +1455,27 @@ public:
mpBox->SetBackground(aWallpaper); mpBox->SetBackground(aWallpaper);
mpBox->Show(); 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(); Show();
} }
virtual ~DemoWidgets() virtual ~DemoWidgets()
{ {
delete mpButton;
delete mpToolbox;
delete mpBox;
} }
virtual void Paint(const Rectangle&) SAL_OVERRIDE virtual void Paint(const Rectangle&) SAL_OVERRIDE
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment