Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / include / svx / pagectrl.hxx
blobe9128180315824b12a0c3f18b0240490a6bc0bfd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVX_PAGECTRL_HXX
20 #define INCLUDED_SVX_PAGECTRL_HXX
22 #include <vcl/window.hxx>
23 #include <svx/svxdllapi.h>
25 // forward ---------------------------------------------------------------
27 class SvxBoxItem;
28 struct PageWindow_Impl;
30 // class SvxPageWindow ---------------------------------------------------
32 class SVX_DLLPUBLIC SvxPageWindow : public Window
34 using Window::GetBorder;
36 private:
37 Size aWinSize;
38 Size aSize;
40 long nTop;
41 long nBottom;
42 long nLeft;
43 long nRight;
44 Color aColor;
46 PageWindow_Impl* pImpl;
48 long nHdLeft;
49 long nHdRight;
50 long nHdDist;
51 long nHdHeight;
52 Color aHdColor;
53 SvxBoxItem* pHdBorder;
55 long nFtLeft;
56 long nFtRight;
57 long nFtDist;
58 long nFtHeight;
59 Color aFtColor;
60 SvxBoxItem* pFtBorder;
62 bool bFooter :1;
63 bool bHeader :1;
64 bool bTable :1;
65 bool bHorz :1;
66 bool bVert :1;
68 sal_uInt16 eUsage;
70 OUString aLeftText;
71 OUString aRightText;
73 protected:
74 virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
76 virtual void DrawPage( const Point& rPoint,
77 const bool bSecond,
78 const bool bEnabled );
80 public:
81 SvxPageWindow( Window* pParent );
82 virtual ~SvxPageWindow();
84 void SetWidth( long nW ) { aSize.Width() = nW; }
85 void SetHeight( long nH ) { aSize.Height() = nH; }
87 void SetSize( const Size& rSz ) { aSize = rSz; }
88 const Size& GetSize() const { return aSize; }
90 void SetTop( long nNew ) { nTop = nNew; }
91 void SetBottom( long nNew ) { nBottom = nNew; }
92 void SetLeft( long nNew ) { nLeft = nNew; }
93 void SetRight( long nNew ) { nRight = nNew; }
94 void SetColor( const Color& rNew ) { aColor = rNew; }
95 void SetBorder( const SvxBoxItem& rNew );
96 void SetBitmap( Bitmap* pBmp );
98 long GetTop() const { return nTop; }
99 long GetBottom() const { return nBottom;}
100 long GetLeft() const { return nLeft; }
101 long GetRight() const { return nRight; }
103 const Color& GetColor() const { return aColor; }
104 const SvxBoxItem& GetBorder() const;
106 void SetHdLeft( long nNew ) { nHdLeft = nNew; }
107 void SetHdRight( long nNew ) { nHdRight = nNew; }
108 void SetHdDist( long nNew ) { nHdDist = nNew; }
109 void SetHdHeight( long nNew ) { nHdHeight = nNew; }
110 void SetHdColor( const Color& aNew ) { aHdColor = aNew; }
111 void SetHdBorder( const SvxBoxItem& rNew );
113 long GetHdLeft() const { return nHdLeft; }
114 long GetHdRight() const { return nHdRight; }
115 long GetHdDist() const { return nHdDist; }
116 long GetHdHeight() const { return nHdHeight;}
118 const Color& GetHdColor() const { return aHdColor; }
119 const SvxBoxItem& GetHdBorder() const { return *pHdBorder; }
121 void SetFtLeft( long nNew ) { nFtLeft = nNew; }
122 void SetFtRight( long nNew ) { nFtRight = nNew; }
123 void SetFtDist( long nNew ) { nFtDist = nNew; }
124 void SetFtHeight( long nNew ) { nFtHeight = nNew; }
125 void SetFtColor( const Color& aNew ) { aFtColor = aNew; }
126 void SetFtBorder( const SvxBoxItem& rNew );
128 long GetFtLeft() const { return nFtLeft; }
129 long GetFtRight() const { return nFtRight; }
130 long GetFtDist() const { return nFtDist; }
131 long GetFtHeight() const { return nFtHeight;}
133 const Color& GetFtColor() const { return aFtColor; }
134 const SvxBoxItem& GetFtBorder() const { return *pFtBorder; }
136 void SetUsage( sal_uInt16 eU ) { eUsage = eU; }
137 sal_uInt16 GetUsage() const { return eUsage;}
139 void SetHeader( bool bNew ) { bHeader = bNew; }
140 bool GetHeader() const { return bHeader;}
141 void SetFooter( bool bNew ) { bFooter = bNew; }
142 bool GetFooter() const { return bFooter;}
144 void SetTable( bool bNew ) { bTable = bNew; }
145 bool GetTable() const { return bTable;}
146 void SetHorz( bool bNew ) { bHorz = bNew; }
147 bool GetHorz() const { return bHorz;}
148 void SetVert( bool bNew ) { bVert = bNew; }
149 bool GetVert() const { return bVert;}
151 void EnableFrameDirection(bool bEnable);
152 //uses enum SvxFrameDirection
153 void SetFrameDirection(sal_Int32 nFrameDirection);
155 void ResetBackground();
157 virtual Size GetOptimalSize() const SAL_OVERRIDE;
160 #endif // INCLUDED_SVX_PAGECTRL_HXX
163 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */