LibreOffice Module vcl (master)  1
help.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_HELP_HXX
21 #define INCLUDED_VCL_HELP_HXX
22 
23 #include <rtl/ustring.hxx>
24 #include <vcl/dllapi.h>
25 #include <o3tl/typed_flags_set.hxx>
26 
27 class Point;
28 namespace tools { class Rectangle; }
29 namespace vcl { class Window; }
30 
31 
32 enum class QuickHelpFlags
33 {
34  NONE = 0x0000,
35  Left = 0x0001,
36  Center = 0x0002,
37  Right = 0x0004,
38  Top = 0x0008,
39  VCenter = 0x0010,
40  Bottom = 0x0020,
42  CtrlText = 0x0040,
44  TipStyleBalloon = 0x0100,
45  NoEvadePointer = 0x0200,
46  BiDiRtl = 0x0400,
47 };
48 namespace o3tl
49 {
50  template<> struct typed_flags<QuickHelpFlags> : is_typed_flags<QuickHelpFlags, 0x77f> {};
51 }
52 
53 #define OOO_HELP_INDEX ".help:index"
54 
55 namespace weld
56 {
57  class Widget;
58 }
59 
61 {
62 public:
63  Help();
64  virtual ~Help();
65 
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);
71 
72  static void EnableContextHelp();
73  static void DisableContextHelp();
74  static bool IsContextHelpEnabled();
75 
76  static void EnableExtHelp();
77  static void DisableExtHelp();
78  static bool IsExtHelpEnabled();
79  static bool StartExtHelp();
80  static bool EndExtHelp();
81 
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 );
89 
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,
97 
98  static void HideBalloonAndQuickHelp();
99 
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);
109 };
110 
111 #endif // INCLUDED_VCL_HELP_HXX
112 
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: help.hxx:60
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_Int16 nId
force balloon-style in ShowPopover and ShowQuickHelp
QuickHelpFlags
Definition: help.hxx:32