bump product version to 4.2.0.1
[LibreOffice.git] / include / vcl / help.hxx
blob10ebd520fbe323e027a19beecc411621b1caaa2b
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 <tools/solar.h>
25 #include <vcl/dllapi.h>
27 class Point;
28 class Rectangle;
29 class Window;
31 // --------------
32 // - Help-Types -
33 // --------------
35 #define QUICKHELP_LEFT ((sal_uInt16)0x0001)
36 #define QUICKHELP_CENTER ((sal_uInt16)0x0002)
37 #define QUICKHELP_RIGHT ((sal_uInt16)0x0004)
38 #define QUICKHELP_TOP ((sal_uInt16)0x0008)
39 #define QUICKHELP_VCENTER ((sal_uInt16)0x0010)
40 #define QUICKHELP_BOTTOM ((sal_uInt16)0x0020)
41 #define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM)
42 #define QUICKHELP_CTRLTEXT ((sal_uInt16)0x0040)
43 /// force the existent tip window to be re-positioned, even if the previous incarnation has the same text. Applies to ShowBallon and ShowQuickHelp.
44 #define QUICKHELP_FORCE_REPOSITION ((sal_uInt16)0x0080)
45 /// no delay when opening the quick help. Applies to ShowBallon and ShowQuickHelp
46 #define QUICKHELP_NO_DELAY ((sal_uInt16)0x0100)
47 /// force balloon-style in ShowTip
48 #define QUICKHELP_TIP_STYLE_BALLOON ((sal_uInt16)0x0200)
49 #define QUICKHELP_NOEVADEPOINTER ((sal_uInt16)0x4000)
50 #define QUICKHELP_BIDI_RTL ((sal_uInt16)0x8000)
52 #define OOO_HELP_INDEX ".help:index"
53 #define OOO_HELP_HELPONHELP ".help:helponhelp"
55 // --------
56 // - Help -
57 // --------
59 class VCL_DLLPUBLIC Help
61 public:
62 Help();
63 virtual ~Help();
65 virtual sal_Bool Start( const OUString& rHelpId, const Window* pWindow );
66 virtual sal_Bool SearchKeyword( const OUString& rKeyWord );
67 virtual OUString GetHelpText( const OUString& aHelpURL, const Window* pWindow );
69 static void EnableContextHelp();
70 static void DisableContextHelp();
71 static sal_Bool IsContextHelpEnabled();
73 static void EnableExtHelp();
74 static void DisableExtHelp();
75 static sal_Bool IsExtHelpEnabled();
76 static sal_Bool StartExtHelp();
77 static sal_Bool EndExtHelp();
79 static void EnableBalloonHelp();
80 static void DisableBalloonHelp();
81 static sal_Bool IsBalloonHelpEnabled();
82 static sal_Bool ShowBalloon( Window* pParent,
83 const Point& rScreenPos,
84 const OUString& rHelpText );
85 static sal_Bool ShowBalloon( Window* pParent,
86 const Point& rScreenPos,
87 const Rectangle&,
88 const OUString& rHelpText );
90 static void EnableQuickHelp();
91 static void DisableQuickHelp();
92 static sal_Bool IsQuickHelpEnabled();
93 static sal_Bool ShowQuickHelp( Window* pParent,
94 const Rectangle& rScreenRect,
95 const OUString& rHelpText,
96 const OUString& rLongHelpText,
97 sal_uInt16 nStyle = 0 );
98 static sal_Bool ShowQuickHelp( Window* pParent,
99 const Rectangle& rScreenRect,
100 const OUString& rHelpText,
101 sal_uInt16 nStyle = 0 )
102 { return Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, OUString(), nStyle ); }
104 static void HideBalloonAndQuickHelp();
106 static sal_uLong ShowTip( Window* pParent,
107 const Rectangle& rScreenRect,
108 const OUString& rText, sal_uInt16 nStyle = 0 );
109 static void UpdateTip( sal_uLong nId,
110 Window* pParent,
111 const Rectangle& rScreenRect,
112 const OUString& rText );
113 static void HideTip( sal_uLong nId );
116 #endif // INCLUDED_VCL_HELP_HXX
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */