2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-06 12:12:33 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2007-04-11 16:56:38 +00:00
|
|
|
|
2013-10-23 19:10:20 +02:00
|
|
|
#ifndef INCLUDED_VCL_HELP_HXX
|
|
|
|
#define INCLUDED_VCL_HELP_HXX
|
2007-04-11 16:56:38 +00:00
|
|
|
|
2012-10-01 11:03:34 +01:00
|
|
|
#include <rtl/ustring.hxx>
|
2012-06-10 19:26:30 +03:00
|
|
|
#include <tools/solar.h>
|
2007-04-11 16:56:38 +00:00
|
|
|
#include <vcl/dllapi.h>
|
2015-05-14 10:39:01 +02:00
|
|
|
#include <o3tl/typed_flags_set.hxx>
|
2007-04-11 16:56:38 +00:00
|
|
|
|
|
|
|
class Point;
|
|
|
|
class Rectangle;
|
2014-09-23 11:20:40 +02:00
|
|
|
namespace vcl { class Window; }
|
2007-04-11 16:56:38 +00:00
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2015-05-14 10:39:01 +02:00
|
|
|
enum class QuickHelpFlags
|
|
|
|
{
|
|
|
|
NONE = 0x0000,
|
|
|
|
Left = 0x0001,
|
|
|
|
Center = 0x0002,
|
|
|
|
Right = 0x0004,
|
|
|
|
Top = 0x0008,
|
|
|
|
VCenter = 0x0010,
|
|
|
|
Bottom = 0x0020,
|
|
|
|
NoAutoPos = Left | Center | Right | Top | VCenter | Bottom,
|
|
|
|
CtrlText = 0x0040,
|
2011-01-14 13:56:26 +01:00
|
|
|
/// no delay when opening the quick help. Applies to ShowBallon and ShowQuickHelp
|
2016-02-17 10:47:16 +00:00
|
|
|
NoDelay = 0x0080,
|
2016-09-04 02:48:18 +03:00
|
|
|
/// force balloon-style in ShowPopover and ShowQuickHelp
|
2016-02-17 10:47:16 +00:00
|
|
|
TipStyleBalloon = 0x0100,
|
|
|
|
NoEvadePointer = 0x0200,
|
|
|
|
BiDiRtl = 0x0400,
|
2015-05-14 10:39:01 +02:00
|
|
|
};
|
|
|
|
namespace o3tl
|
|
|
|
{
|
2016-02-17 10:47:16 +00:00
|
|
|
template<> struct typed_flags<QuickHelpFlags> : is_typed_flags<QuickHelpFlags, 0x7ff> {};
|
2015-05-14 10:39:01 +02:00
|
|
|
}
|
2007-04-11 16:56:38 +00:00
|
|
|
|
2010-06-04 13:46:22 +02:00
|
|
|
#define OOO_HELP_INDEX ".help:index"
|
2014-02-25 19:06:16 +01:00
|
|
|
|
|
|
|
|
2007-04-11 16:56:38 +00:00
|
|
|
class VCL_DLLPUBLIC Help
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Help();
|
|
|
|
virtual ~Help();
|
|
|
|
|
2015-05-14 10:39:01 +02:00
|
|
|
virtual bool Start( const OUString& rHelpId, const vcl::Window* pWindow );
|
|
|
|
virtual bool SearchKeyword( const OUString& rKeyWord );
|
2014-09-23 11:20:40 +02:00
|
|
|
virtual OUString GetHelpText( const OUString& aHelpURL, const vcl::Window* pWindow );
|
2007-04-11 16:56:38 +00:00
|
|
|
|
|
|
|
static void EnableContextHelp();
|
|
|
|
static void DisableContextHelp();
|
2015-05-14 10:39:01 +02:00
|
|
|
static bool IsContextHelpEnabled();
|
2007-04-11 16:56:38 +00:00
|
|
|
|
|
|
|
static void EnableExtHelp();
|
|
|
|
static void DisableExtHelp();
|
2015-05-14 10:39:01 +02:00
|
|
|
static bool IsExtHelpEnabled();
|
|
|
|
static bool StartExtHelp();
|
|
|
|
static bool EndExtHelp();
|
2007-04-11 16:56:38 +00:00
|
|
|
|
|
|
|
static void EnableBalloonHelp();
|
|
|
|
static void DisableBalloonHelp();
|
2015-05-14 10:39:01 +02:00
|
|
|
static bool IsBalloonHelpEnabled();
|
|
|
|
static bool ShowBalloon( vcl::Window* pParent,
|
2007-04-11 16:56:38 +00:00
|
|
|
const Point& rScreenPos,
|
|
|
|
const Rectangle&,
|
2012-10-01 11:03:34 +01:00
|
|
|
const OUString& rHelpText );
|
2007-04-11 16:56:38 +00:00
|
|
|
|
|
|
|
static void EnableQuickHelp();
|
|
|
|
static void DisableQuickHelp();
|
2015-05-14 10:39:01 +02:00
|
|
|
static bool IsQuickHelpEnabled();
|
|
|
|
static bool ShowQuickHelp( vcl::Window* pParent,
|
2007-04-11 16:56:38 +00:00
|
|
|
const Rectangle& rScreenRect,
|
2012-10-01 11:03:34 +01:00
|
|
|
const OUString& rHelpText,
|
|
|
|
const OUString& rLongHelpText,
|
2016-08-30 15:34:35 +02:00
|
|
|
QuickHelpFlags nStyle );
|
2015-05-14 10:39:01 +02:00
|
|
|
static bool ShowQuickHelp( vcl::Window* pParent,
|
2007-04-11 16:56:38 +00:00
|
|
|
const Rectangle& rScreenRect,
|
2012-10-01 11:03:34 +01:00
|
|
|
const OUString& rHelpText,
|
2015-05-14 10:39:01 +02:00
|
|
|
QuickHelpFlags nStyle = QuickHelpFlags::NONE )
|
2012-10-01 11:03:34 +01:00
|
|
|
{ return Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, OUString(), nStyle ); }
|
2007-04-11 16:56:38 +00:00
|
|
|
|
2012-08-20 21:35:06 -05:00
|
|
|
static void HideBalloonAndQuickHelp();
|
|
|
|
|
2016-02-17 11:56:18 +00:00
|
|
|
static sal_uLong ShowPopover(vcl::Window* pParent,
|
|
|
|
const Rectangle& rScreenRect,
|
|
|
|
const OUString& rText,
|
2016-08-30 15:34:35 +02:00
|
|
|
QuickHelpFlags nStyle);
|
2016-02-17 11:56:18 +00:00
|
|
|
static void UpdatePopover(sal_uLong nId,
|
|
|
|
vcl::Window* pParent,
|
|
|
|
const Rectangle& rScreenRect,
|
|
|
|
const OUString& rText);
|
|
|
|
static void HidePopover(vcl::Window* pParent, sal_uLong nId);
|
2007-04-11 16:56:38 +00:00
|
|
|
};
|
|
|
|
|
2013-10-23 19:10:20 +02:00
|
|
|
#endif // INCLUDED_VCL_HELP_HXX
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|