vcl: 'horizontically'
[LibreOffice.git] / include / vcl / help.hxx
blob83b2bdbe569ffe04efd254f96d9e48f3f3f4001d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_HELP_HXX
21 #define INCLUDED_VCL_HELP_HXX
23 #include <rtl/ustring.hxx>
24 #include <vcl/dllapi.h>
25 #include <o3tl/typed_flags_set.hxx>
27 class Point;
28 namespace tools { class Rectangle; }
29 namespace vcl { class Window; }
32 enum class QuickHelpFlags
34 NONE = 0x0000,
35 Left = 0x0001,
36 Center = 0x0002,
37 Right = 0x0004,
38 Top = 0x0008,
39 VCenter = 0x0010,
40 Bottom = 0x0020,
41 NoAutoPos = Left | Center | Right | Top | VCenter | Bottom,
42 CtrlText = 0x0040,
43 /// force balloon-style in ShowPopover and ShowQuickHelp
44 TipStyleBalloon = 0x0100,
45 NoEvadePointer = 0x0200,
46 BiDiRtl = 0x0400,
48 namespace o3tl
50 template<> struct typed_flags<QuickHelpFlags> : is_typed_flags<QuickHelpFlags, 0x77f> {};
53 #define OOO_HELP_INDEX ".help:index"
55 namespace weld
57 class Widget;
60 class VCL_DLLPUBLIC Help
62 public:
63 Help();
64 virtual ~Help();
66 virtual bool Start(const OUString& rHelpId, const vcl::Window* pWindow);
67 virtual bool Start(const OUString& rHelpId, weld::Widget* pWidget);
68 virtual void SearchKeyword( const OUString& rKeyWord );
69 virtual OUString GetHelpText(const OUString& aHelpURL, const vcl::Window* pWindow);
70 virtual OUString GetHelpText(const OUString& aHelpURL, const weld::Widget* pWidget);
72 static void EnableContextHelp();
73 static void DisableContextHelp();
74 static bool IsContextHelpEnabled();
76 static void EnableExtHelp();
77 static void DisableExtHelp();
78 static bool IsExtHelpEnabled();
79 static bool StartExtHelp();
80 static bool EndExtHelp();
82 static void EnableBalloonHelp();
83 static void DisableBalloonHelp();
84 static bool IsBalloonHelpEnabled();
85 static void ShowBalloon( vcl::Window* pParent,
86 const Point& rScreenPos,
87 const tools::Rectangle&,
88 const OUString& rHelpText );
90 static void EnableQuickHelp();
91 static void DisableQuickHelp();
92 static bool IsQuickHelpEnabled();
93 static void ShowQuickHelp( vcl::Window* pParent,
94 const tools::Rectangle& rScreenRect,
95 const OUString& rHelpText,
96 QuickHelpFlags nStyle = QuickHelpFlags::NONE );
98 static void HideBalloonAndQuickHelp();
100 static void* ShowPopover(vcl::Window* pParent,
101 const tools::Rectangle& rScreenRect,
102 const OUString& rText,
103 QuickHelpFlags nStyle);
104 static void UpdatePopover(void* nId,
105 vcl::Window* pParent,
106 const tools::Rectangle& rScreenRect,
107 const OUString& rText);
108 static void HidePopover(vcl::Window const * pParent, void* nId);
111 #endif // INCLUDED_VCL_HELP_HXX
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */