LCOV - code coverage report
Current view: top level - include/vcl - decoview.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 1 1 100.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_DECOVIEW_HXX
      21             : #define INCLUDED_VCL_DECOVIEW_HXX
      22             : 
      23             : #include <vcl/dllapi.h>
      24             : #include <vcl/vclptr.hxx>
      25             : #include <rsc/rsc-vcl-shared-types.hxx>
      26             : #include <o3tl/typed_flags_set.hxx>
      27             : 
      28             : class Rectangle;
      29             : class Point;
      30             : class Color;
      31             : class OutputDevice;
      32             : 
      33             : // Flags for DrawSymbol()
      34             : enum class DrawSymbolFlags
      35             : {
      36             :     NONE                    = 0x0000,
      37             :     Mono                    = 0x0001,
      38             :     Disable                 = 0x0002,
      39             : };
      40             : namespace o3tl
      41             : {
      42             :     template<> struct typed_flags<DrawSymbolFlags> : is_typed_flags<DrawSymbolFlags, 0x03> {};
      43             : }
      44             : 
      45             : // Flags for DrawFrame()
      46             : enum class DrawFrameStyle
      47             : {
      48             :     NONE                     = 0x0000,
      49             :     In                       = 0x0001,
      50             :     Out                      = 0x0002,
      51             :     Group                    = 0x0003,
      52             :     DoubleIn                 = 0x0004,
      53             :     DoubleOut                = 0x0005,
      54             :     NWF                      = 0x0006,
      55             : };
      56             : enum class DrawFrameFlags
      57             : {
      58             :     NONE                     = 0x0000,
      59             :     Menu                     = 0x0010,
      60             :     WindowBorder             = 0x0020,
      61             :     BorderWindowBorder       = 0x0040,
      62             :     Mono                     = 0x1000,
      63             :     NoDraw                   = 0x8000,
      64             : };
      65             : namespace o3tl
      66             : {
      67             :     template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
      68             : }
      69             : 
      70             : // Flags for DrawHighlightFrame()
      71             : enum class DrawHighlightFrameStyle
      72             : {
      73             :     In                  = 1,
      74             :     Out                 = 2,
      75             : };
      76             : 
      77             : // Flags for DrawButton()
      78             : enum class DrawButtonFlags
      79             : {
      80             :     NONE                    = 0x0000,
      81             :     Default                 = 0x0001,
      82             :     NoLightBorder           = 0x0002,
      83             :     Pressed                 = 0x0004,
      84             :     Checked                 = 0x0008,
      85             :     DontKnow                = 0x0010,
      86             :     Mono                    = 0x0020,
      87             :     NoFill                  = 0x0040,
      88             :     Disabled                = 0x0080,
      89             :     Highlight               = 0x0100,
      90             :     Flat                    = 0x0200,
      91             :     NoLeftLightBorder       = 0x1000,
      92             :     NoText                  = 0x2000,
      93             :     NoImage                 = 0x4000,
      94             : };
      95             : namespace o3tl
      96             : {
      97             :     template<> struct typed_flags<DrawButtonFlags> : is_typed_flags<DrawButtonFlags, 0x73ff> {};
      98             : }
      99             : 
     100      135293 : class VCL_DLLPUBLIC DecorationView
     101             : {
     102             : private:
     103             :     VclPtr<OutputDevice>  mpOutDev;
     104             : 
     105             : public:
     106             :     DecorationView(OutputDevice* pOutDev);
     107             : 
     108             :     void                DrawSymbol( const Rectangle& rRect, SymbolType eType,
     109             :                                     const Color& rColor, DrawSymbolFlags nStyle = DrawSymbolFlags::NONE );
     110             :     void                DrawFrame( const Rectangle& rRect,
     111             :                                    const Color& rLeftTopColor,
     112             :                                    const Color& rRightBottomColor );
     113             :     void                DrawHighlightFrame( const Rectangle& rRect,
     114             :                                             DrawHighlightFrameStyle nStyle = DrawHighlightFrameStyle::Out, bool bTestBackground = false );
     115             :     Rectangle           DrawFrame( const Rectangle& rRect, DrawFrameStyle nStyle = DrawFrameStyle::Out, DrawFrameFlags nFlags = DrawFrameFlags::NONE );
     116             :     Rectangle           DrawButton( const Rectangle& rRect, DrawButtonFlags nStyle );
     117             :     void                DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true );
     118             :     void                DrawHandle(const Rectangle& rRectangle, bool bVertical = true);
     119             : };
     120             : 
     121             : #endif // INCLUDED_VCL_DECOVIEW_HXX
     122             : 
     123             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11