1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _SVX_PAGECTRL_HXX
20 #define _SVX_PAGECTRL_HXX
22 #include <vcl/window.hxx>
23 #include "svx/svxdllapi.h"
25 // forward ---------------------------------------------------------------
28 struct PageWindow_Impl
;
30 // class SvxPageWindow ---------------------------------------------------
32 class SVX_DLLPUBLIC SvxPageWindow
: public Window
34 using Window::GetBorder
;
46 PageWindow_Impl
* pImpl
;
53 SvxBoxItem
* pHdBorder
;
60 SvxBoxItem
* pFtBorder
;
74 virtual void Paint( const Rectangle
& rRect
);
76 virtual void DrawPage( const Point
& rPoint
,
77 const sal_Bool bSecond
,
78 const sal_Bool bEnabled
);
81 SvxPageWindow( Window
* pParent
, const ResId
& rId
);
82 SvxPageWindow( Window
* pParent
);
85 void SetWidth( long nW
) { aSize
.Width() = nW
; }
86 void SetHeight( long nH
) { aSize
.Height() = nH
; }
88 void SetSize( const Size
& rSz
) { aSize
= rSz
; }
89 const Size
& GetSize() const { return aSize
; }
91 void SetTop( long nNew
) { nTop
= nNew
; }
92 void SetBottom( long nNew
) { nBottom
= nNew
; }
93 void SetLeft( long nNew
) { nLeft
= nNew
; }
94 void SetRight( long nNew
) { nRight
= nNew
; }
95 void SetColor( const Color
& rNew
) { aColor
= rNew
; }
96 void SetBorder( const SvxBoxItem
& rNew
);
97 void SetBitmap( Bitmap
* pBmp
);
99 long GetTop() const { return nTop
; }
100 long GetBottom() const { return nBottom
;}
101 long GetLeft() const { return nLeft
; }
102 long GetRight() const { return nRight
; }
104 const Color
& GetColor() const { return aColor
; }
105 const SvxBoxItem
& GetBorder() const;
107 void SetHdLeft( long nNew
) { nHdLeft
= nNew
; }
108 void SetHdRight( long nNew
) { nHdRight
= nNew
; }
109 void SetHdDist( long nNew
) { nHdDist
= nNew
; }
110 void SetHdHeight( long nNew
) { nHdHeight
= nNew
; }
111 void SetHdColor( const Color
& aNew
) { aHdColor
= aNew
; }
112 void SetHdBorder( const SvxBoxItem
& rNew
);
114 long GetHdLeft() const { return nHdLeft
; }
115 long GetHdRight() const { return nHdRight
; }
116 long GetHdDist() const { return nHdDist
; }
117 long GetHdHeight() const { return nHdHeight
;}
119 const Color
& GetHdColor() const { return aHdColor
; }
120 const SvxBoxItem
& GetHdBorder() const { return *pHdBorder
; }
122 void SetFtLeft( long nNew
) { nFtLeft
= nNew
; }
123 void SetFtRight( long nNew
) { nFtRight
= nNew
; }
124 void SetFtDist( long nNew
) { nFtDist
= nNew
; }
125 void SetFtHeight( long nNew
) { nFtHeight
= nNew
; }
126 void SetFtColor( const Color
& aNew
) { aFtColor
= aNew
; }
127 void SetFtBorder( const SvxBoxItem
& rNew
);
129 long GetFtLeft() const { return nFtLeft
; }
130 long GetFtRight() const { return nFtRight
; }
131 long GetFtDist() const { return nFtDist
; }
132 long GetFtHeight() const { return nFtHeight
;}
134 const Color
& GetFtColor() const { return aFtColor
; }
135 const SvxBoxItem
& GetFtBorder() const { return *pFtBorder
; }
137 void SetUsage( sal_uInt16 eU
) { eUsage
= eU
; }
138 sal_uInt16
GetUsage() const { return eUsage
;}
140 void SetHeader( sal_Bool bNew
) { bHeader
= bNew
; }
141 sal_Bool
GetHeader() const { return bHeader
;}
142 void SetFooter( sal_Bool bNew
) { bFooter
= bNew
; }
143 sal_Bool
GetFooter() const { return bFooter
;}
145 void SetTable( sal_Bool bNew
) { bTable
= bNew
; }
146 sal_Bool
GetTable() const { return bTable
;}
147 void SetHorz( sal_Bool bNew
) { bHorz
= bNew
; }
148 sal_Bool
GetHorz() const { return bHorz
;}
149 void SetVert( sal_Bool bNew
) { bVert
= bNew
; }
150 sal_Bool
GetVert() const { return bVert
;}
152 void EnableFrameDirection(sal_Bool bEnable
);
153 //uses enum SvxFrameDirection
154 void SetFrameDirection(sal_Int32 nFrameDirection
);
156 void ResetBackground();
158 virtual Size
GetOptimalSize() const;
161 #endif // #ifndef _SVX_PAGECTRL_HXX
164 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */