LCOV - code coverage report
Current view: top level - include/svx - pagectrl.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 37 0.0 %
Date: 2014-04-14 Functions: 0 37 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 INCLUDED_SVX_PAGECTRL_HXX
      20             : #define INCLUDED_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             :     bool        bFooter :1;
      63             :     bool        bHeader :1;
      64             :     bool        bTable  :1;
      65             :     bool        bHorz   :1;
      66             :     bool        bVert   :1;
      67             : 
      68             :     sal_uInt16      eUsage;
      69             : 
      70             :     OUString    aLeftText;
      71             :     OUString    aRightText;
      72             : 
      73             : protected:
      74             :     virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
      75             : 
      76             :     virtual void DrawPage( const Point& rPoint,
      77             :                            const bool bSecond,
      78             :                            const bool bEnabled );
      79             : 
      80             : public:
      81             :     SvxPageWindow( Window* pParent );
      82             :     virtual ~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           0 :     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           0 :     long        GetHdLeft() const                       { return nHdLeft;  }
     114           0 :     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           0 :     long        GetFtLeft() const                       { return nFtLeft;  }
     129           0 :     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( bool bNew )                  { bHeader = bNew; }
     140             :     bool        GetHeader() const                       { return bHeader;}
     141           0 :     void        SetFooter( bool bNew )                  { bFooter = bNew; }
     142             :     bool        GetFooter() const                       { return bFooter;}
     143             : 
     144           0 :     void        SetTable( bool bNew )                   { bTable = bNew; }
     145             :     bool        GetTable() const                        { return bTable;}
     146           0 :     void        SetHorz( bool bNew )                    { bHorz = bNew; }
     147             :     bool        GetHorz() const                         { return bHorz;}
     148           0 :     void        SetVert( bool bNew )                    { bVert = bNew; }
     149             :     bool        GetVert() const                         { return bVert;}
     150             : 
     151             :     void        EnableFrameDirection(bool bEnable);
     152             :     //uses enum SvxFrameDirection
     153             :     void        SetFrameDirection(sal_Int32 nFrameDirection);
     154             : 
     155             :     void        ResetBackground();
     156             : 
     157             :     virtual Size GetOptimalSize() const SAL_OVERRIDE;
     158             : };
     159             : 
     160             : #endif // INCLUDED_SVX_PAGECTRL_HXX
     161             : 
     162             : 
     163             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10