LCOV - code coverage report
Current view: top level - include/vcl - help.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 2 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 <tools/solar.h>
      25             : #include <vcl/dllapi.h>
      26             : #include <o3tl/typed_flags_set.hxx>
      27             : 
      28             : class Point;
      29             : class Rectangle;
      30             : namespace vcl { class Window; }
      31             : 
      32             : 
      33             : // - Help-Types -
      34             : 
      35             : enum class QuickHelpFlags
      36             : {
      37             :     NONE              = 0x0000,
      38             :     Left              = 0x0001,
      39             :     Center            = 0x0002,
      40             :     Right             = 0x0004,
      41             :     Top               = 0x0008,
      42             :     VCenter           = 0x0010,
      43             :     Bottom            = 0x0020,
      44             :     NoAutoPos         = Left | Center | Right | Top | VCenter | Bottom,
      45             :     CtrlText          = 0x0040,
      46             : /// force the existent tip window to be re-positioned, even if the previous incarnation has the same text. Applies to ShowBallon and ShowQuickHelp.
      47             :     ForceReposition   = 0x0080,
      48             : /// no delay when opening the quick help. Applies to ShowBallon and ShowQuickHelp
      49             :     NoDelay           = 0x0100,
      50             : /// force balloon-style in ShowTip
      51             :     TipStyleBalloon   = 0x0200,
      52             :     NoEvadePointer    = 0x4000,
      53             :     BiDiRtl           = 0x8000,
      54             : };
      55             : namespace o3tl
      56             : {
      57             :     template<> struct typed_flags<QuickHelpFlags> : is_typed_flags<QuickHelpFlags, 0xc3ff> {};
      58             : }
      59             : 
      60             : #define OOO_HELP_INDEX          ".help:index"
      61             : 
      62             : // - Help -
      63             : 
      64             : class VCL_DLLPUBLIC Help
      65             : {
      66             : public:
      67             :                         Help();
      68             :     virtual             ~Help();
      69             : 
      70             :     virtual bool        Start( const OUString& rHelpId, const vcl::Window* pWindow );
      71             :     virtual bool        SearchKeyword( const OUString& rKeyWord );
      72             :     virtual OUString    GetHelpText( const OUString& aHelpURL, const vcl::Window* pWindow );
      73             : 
      74             :     static void         EnableContextHelp();
      75             :     static void         DisableContextHelp();
      76             :     static bool         IsContextHelpEnabled();
      77             : 
      78             :     static void         EnableExtHelp();
      79             :     static void         DisableExtHelp();
      80             :     static bool         IsExtHelpEnabled();
      81             :     static bool         StartExtHelp();
      82             :     static bool         EndExtHelp();
      83             : 
      84             :     static void         EnableBalloonHelp();
      85             :     static void         DisableBalloonHelp();
      86             :     static bool         IsBalloonHelpEnabled();
      87             :     static bool         ShowBalloon( vcl::Window* pParent,
      88             :                                      const Point& rScreenPos,
      89             :                                      const OUString& rHelpText );
      90             :     static bool         ShowBalloon( vcl::Window* pParent,
      91             :                                      const Point& rScreenPos,
      92             :                                      const Rectangle&,
      93             :                                      const OUString& rHelpText );
      94             : 
      95             :     static void         EnableQuickHelp();
      96             :     static void         DisableQuickHelp();
      97             :     static bool         IsQuickHelpEnabled();
      98             :     static bool         ShowQuickHelp( vcl::Window* pParent,
      99             :                                        const Rectangle& rScreenRect,
     100             :                                        const OUString& rHelpText,
     101             :                                        const OUString& rLongHelpText,
     102             :                                        QuickHelpFlags nStyle = QuickHelpFlags::NONE );
     103           0 :     static bool         ShowQuickHelp( vcl::Window* pParent,
     104             :                                        const Rectangle& rScreenRect,
     105             :                                        const OUString& rHelpText,
     106             :                                        QuickHelpFlags nStyle = QuickHelpFlags::NONE )
     107           0 :                             { return Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, OUString(), nStyle ); }
     108             : 
     109             :     static void         HideBalloonAndQuickHelp();
     110             : 
     111             :     static sal_uLong    ShowTip( vcl::Window* pParent,
     112             :                                  const Rectangle& rScreenRect,
     113             :                                  const OUString& rText, QuickHelpFlags nStyle = QuickHelpFlags::NONE );
     114             :     static void         UpdateTip( sal_uLong nId,
     115             :                                    vcl::Window* pParent,
     116             :                                    const Rectangle& rScreenRect,
     117             :                                    const OUString& rText );
     118             :     static void         HideTip( sal_uLong nId );
     119             : };
     120             : 
     121             : #endif // INCLUDED_VCL_HELP_HXX
     122             : 
     123             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11