LCOV - code coverage report
Current view: top level - libreoffice/svx/inc/svx - pagectrl.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 32 0.0 %
Date: 2012-12-17 Functions: 0 32 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             : #ifndef _SVX_PAGECTRL_HXX
      20             : #define _SVX_PAGECTRL_HXX
      21             : 
      22             : #include <vcl/window.hxx>
      23             : #include "svx/svxdllapi.h"
      24             : 
      25             : // forward ---------------------------------------------------------------
      26             : 
      27             : class SvxBoxItem;
      28             : struct PageWindow_Impl;
      29             : 
      30             : // class SvxPageWindow ---------------------------------------------------
      31             : 
      32             : class SVX_DLLPUBLIC SvxPageWindow : public Window
      33             : {
      34             :     using Window::GetBorder;
      35             : 
      36             : private:
      37             :     Size        aWinSize;
      38             :     Size        aSize;
      39             : 
      40             :     long        nTop;
      41             :     long        nBottom;
      42             :     long        nLeft;
      43             :     long        nRight;
      44             :     Color       aColor;
      45             : 
      46             :     PageWindow_Impl* pImpl;
      47             : 
      48             :     long        nHdLeft;
      49             :     long        nHdRight;
      50             :     long        nHdDist;
      51             :     long        nHdHeight;
      52             :     Color       aHdColor;
      53             :     SvxBoxItem* pHdBorder;
      54             : 
      55             :     long        nFtLeft;
      56             :     long        nFtRight;
      57             :     long        nFtDist;
      58             :     long        nFtHeight;
      59             :     Color       aFtColor;
      60             :     SvxBoxItem* pFtBorder;
      61             : 
      62             :     sal_Bool        bFooter :1;
      63             :     sal_Bool        bHeader :1;
      64             :     sal_Bool        bTable  :1;
      65             :     sal_Bool        bHorz   :1;
      66             :     sal_Bool        bVert   :1;
      67             : 
      68             :     sal_uInt16      eUsage;
      69             : 
      70             :     String      aLeftText;
      71             :     String      aRightText;
      72             : 
      73             : protected:
      74             :     virtual void Paint( const Rectangle& rRect );
      75             : 
      76             :     virtual void DrawPage( const Point& rPoint,
      77             :                            const sal_Bool bSecond,
      78             :                            const sal_Bool bEnabled );
      79             : 
      80             : public:
      81             :     SvxPageWindow( Window* pParent, const ResId& rId );
      82             :     ~SvxPageWindow();
      83             : 
      84             :     void        SetWidth( long nW )                     { aSize.Width()  = nW; }
      85             :     void        SetHeight( long nH )                    { aSize.Height() = nH; }
      86             : 
      87           0 :     void        SetSize( const Size& rSz )              { aSize = rSz; }
      88           0 :     const Size& GetSize() const                         { return aSize; }
      89             : 
      90           0 :     void        SetTop( long nNew )                     { nTop = nNew; }
      91           0 :     void        SetBottom( long nNew )                  { nBottom = nNew; }
      92           0 :     void        SetLeft( long nNew )                    { nLeft = nNew; }
      93           0 :     void        SetRight( long nNew )                   { nRight = nNew; }
      94           0 :     void        SetColor( const Color& rNew )           { aColor = rNew; }
      95             :     void        SetBorder( const SvxBoxItem& rNew );
      96             :     void        SetBitmap( Bitmap* pBmp );
      97             : 
      98           0 :     long        GetTop() const                          { return nTop;   }
      99           0 :     long        GetBottom() const                       { return nBottom;}
     100           0 :     long        GetLeft() const                         { return nLeft;  }
     101           0 :     long        GetRight() const                        { return nRight; }
     102             : 
     103             :     const Color&        GetColor() const                { return aColor; }
     104             :     const SvxBoxItem&   GetBorder() const;
     105             : 
     106           0 :     void        SetHdLeft( long nNew )                  { nHdLeft = nNew; }
     107           0 :     void        SetHdRight( long nNew )                 { nHdRight = nNew; }
     108           0 :     void        SetHdDist( long nNew )                  { nHdDist = nNew; }
     109           0 :     void        SetHdHeight( long nNew )                { nHdHeight = nNew; }
     110           0 :     void        SetHdColor( const Color& aNew )         { aHdColor = aNew; }
     111             :     void        SetHdBorder( const SvxBoxItem& rNew );
     112             : 
     113             :     long        GetHdLeft() const                       { return nHdLeft;  }
     114             :     long        GetHdRight() const                      { return nHdRight; }
     115           0 :     long        GetHdDist() const                       { return nHdDist;  }
     116           0 :     long        GetHdHeight() const                     { return nHdHeight;}
     117             : 
     118             :     const Color&        GetHdColor() const              { return aHdColor; }
     119             :     const SvxBoxItem&   GetHdBorder() const             { return *pHdBorder; }
     120             : 
     121           0 :     void        SetFtLeft( long nNew )                  { nFtLeft = nNew; }
     122           0 :     void        SetFtRight( long nNew )                 { nFtRight = nNew; }
     123           0 :     void        SetFtDist( long nNew )                  { nFtDist = nNew; }
     124           0 :     void        SetFtHeight( long nNew )                { nFtHeight = nNew; }
     125           0 :     void        SetFtColor( const Color& aNew )         { aFtColor = aNew; }
     126             :     void        SetFtBorder( const SvxBoxItem& rNew );
     127             : 
     128             :     long        GetFtLeft() const                       { return nFtLeft;  }
     129             :     long        GetFtRight() const                      { return nFtRight; }
     130           0 :     long        GetFtDist() const                       { return nFtDist;  }
     131           0 :     long        GetFtHeight() const                     { return nFtHeight;}
     132             : 
     133             :     const Color&        GetFtColor() const              { return aFtColor; }
     134             :     const SvxBoxItem&   GetFtBorder() const             { return *pFtBorder; }
     135             : 
     136           0 :     void        SetUsage( sal_uInt16 eU )                   { eUsage = eU;  }
     137           0 :     sal_uInt16      GetUsage() const                        { return eUsage;}
     138             : 
     139           0 :     void        SetHeader( sal_Bool bNew )                  { bHeader = bNew; }
     140             :     sal_Bool        GetHeader() const                       { return bHeader;}
     141           0 :     void        SetFooter( sal_Bool bNew )                  { bFooter = bNew; }
     142             :     sal_Bool        GetFooter() const                       { return bFooter;}
     143             : 
     144           0 :     void        SetTable( sal_Bool bNew )                   { bTable = bNew; }
     145             :     sal_Bool        GetTable() const                        { return bTable;}
     146           0 :     void        SetHorz( sal_Bool bNew )                    { bHorz = bNew; }
     147             :     sal_Bool        GetHorz() const                         { return bHorz;}
     148           0 :     void        SetVert( sal_Bool bNew )                    { bVert = bNew; }
     149             :     sal_Bool        GetVert() const                         { return bVert;}
     150             : 
     151             :     void        EnableFrameDirection(sal_Bool bEnable);
     152             :     //uses enum SvxFrameDirection
     153             :     void        SetFrameDirection(sal_Int32 nFrameDirection);
     154             : 
     155             :     void        ResetBackground();
     156             : };
     157             : 
     158             : #endif // #ifndef _SVX_PAGECTRL_HXX
     159             : 
     160             : 
     161             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10