1*3334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*3334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3334a7e6SAndrew Rist * distributed with this work for additional information 6*3334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 9*3334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 10*3334a7e6SAndrew Rist * 11*3334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*3334a7e6SAndrew Rist * 13*3334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3334a7e6SAndrew Rist * software distributed under the License is distributed on an 15*3334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 17*3334a7e6SAndrew Rist * specific language governing permissions and limitations 18*3334a7e6SAndrew Rist * under the License. 19*3334a7e6SAndrew Rist * 20*3334a7e6SAndrew Rist *************************************************************/ 21*3334a7e6SAndrew Rist 22*3334a7e6SAndrew Rist 23cdf0e10cSrcweir #ifndef _SVX_PAGECTRL_HXX 24cdf0e10cSrcweir #define _SVX_PAGECTRL_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir // include --------------------------------------------------------------- 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include <vcl/window.hxx> 29cdf0e10cSrcweir #include "svx/svxdllapi.h" 30cdf0e10cSrcweir 31cdf0e10cSrcweir // forward --------------------------------------------------------------- 32cdf0e10cSrcweir 33cdf0e10cSrcweir class SvxBoxItem; 34cdf0e10cSrcweir struct PageWindow_Impl; 35cdf0e10cSrcweir 36cdf0e10cSrcweir // class SvxPageWindow --------------------------------------------------- 37cdf0e10cSrcweir 38cdf0e10cSrcweir class SVX_DLLPUBLIC SvxPageWindow : public Window 39cdf0e10cSrcweir { 40cdf0e10cSrcweir using Window::GetBorder; 41cdf0e10cSrcweir 42cdf0e10cSrcweir private: 43cdf0e10cSrcweir Size aWinSize; 44cdf0e10cSrcweir Size aSize; 45cdf0e10cSrcweir 46cdf0e10cSrcweir long nTop; 47cdf0e10cSrcweir long nBottom; 48cdf0e10cSrcweir long nLeft; 49cdf0e10cSrcweir long nRight; 50cdf0e10cSrcweir Color aColor; 51cdf0e10cSrcweir 52cdf0e10cSrcweir PageWindow_Impl* pImpl; 53cdf0e10cSrcweir 54cdf0e10cSrcweir long nHdLeft; 55cdf0e10cSrcweir long nHdRight; 56cdf0e10cSrcweir long nHdDist; 57cdf0e10cSrcweir long nHdHeight; 58cdf0e10cSrcweir Color aHdColor; 59cdf0e10cSrcweir SvxBoxItem* pHdBorder; 60cdf0e10cSrcweir 61cdf0e10cSrcweir long nFtLeft; 62cdf0e10cSrcweir long nFtRight; 63cdf0e10cSrcweir long nFtDist; 64cdf0e10cSrcweir long nFtHeight; 65cdf0e10cSrcweir Color aFtColor; 66cdf0e10cSrcweir SvxBoxItem* pFtBorder; 67cdf0e10cSrcweir 68cdf0e10cSrcweir sal_Bool bFooter :1; 69cdf0e10cSrcweir sal_Bool bHeader :1; 70cdf0e10cSrcweir sal_Bool bTable :1; 71cdf0e10cSrcweir sal_Bool bHorz :1; 72cdf0e10cSrcweir sal_Bool bVert :1; 73cdf0e10cSrcweir 74cdf0e10cSrcweir sal_uInt16 eUsage; 75cdf0e10cSrcweir 76cdf0e10cSrcweir String aLeftText; 77cdf0e10cSrcweir String aRightText; 78cdf0e10cSrcweir 79cdf0e10cSrcweir protected: 80cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 81cdf0e10cSrcweir 82cdf0e10cSrcweir virtual void DrawPage( const Point& rPoint, 83cdf0e10cSrcweir const sal_Bool bSecond, 84cdf0e10cSrcweir const sal_Bool bEnabled ); 85cdf0e10cSrcweir 86cdf0e10cSrcweir public: 87cdf0e10cSrcweir SvxPageWindow( Window* pParent, const ResId& rId ); 88cdf0e10cSrcweir ~SvxPageWindow(); 89cdf0e10cSrcweir SetWidth(long nW)90cdf0e10cSrcweir void SetWidth( long nW ) { aSize.Width() = nW; } SetHeight(long nH)91cdf0e10cSrcweir void SetHeight( long nH ) { aSize.Height() = nH; } 92cdf0e10cSrcweir SetSize(const Size & rSz)93cdf0e10cSrcweir void SetSize( const Size& rSz ) { aSize = rSz; } GetSize() const94cdf0e10cSrcweir const Size& GetSize() const { return aSize; } 95cdf0e10cSrcweir SetTop(long nNew)96cdf0e10cSrcweir void SetTop( long nNew ) { nTop = nNew; } SetBottom(long nNew)97cdf0e10cSrcweir void SetBottom( long nNew ) { nBottom = nNew; } SetLeft(long nNew)98cdf0e10cSrcweir void SetLeft( long nNew ) { nLeft = nNew; } SetRight(long nNew)99cdf0e10cSrcweir void SetRight( long nNew ) { nRight = nNew; } SetColor(const Color & rNew)100cdf0e10cSrcweir void SetColor( const Color& rNew ) { aColor = rNew; } 101cdf0e10cSrcweir void SetBorder( const SvxBoxItem& rNew ); 102cdf0e10cSrcweir void SetBitmap( Bitmap* pBmp ); 103cdf0e10cSrcweir GetTop() const104cdf0e10cSrcweir long GetTop() const { return nTop; } GetBottom() const105cdf0e10cSrcweir long GetBottom() const { return nBottom;} GetLeft() const106cdf0e10cSrcweir long GetLeft() const { return nLeft; } GetRight() const107cdf0e10cSrcweir long GetRight() const { return nRight; } 108cdf0e10cSrcweir GetColor() const109cdf0e10cSrcweir const Color& GetColor() const { return aColor; } 110cdf0e10cSrcweir const SvxBoxItem& GetBorder() const; 111cdf0e10cSrcweir SetHdLeft(long nNew)112cdf0e10cSrcweir void SetHdLeft( long nNew ) { nHdLeft = nNew; } SetHdRight(long nNew)113cdf0e10cSrcweir void SetHdRight( long nNew ) { nHdRight = nNew; } SetHdDist(long nNew)114cdf0e10cSrcweir void SetHdDist( long nNew ) { nHdDist = nNew; } SetHdHeight(long nNew)115cdf0e10cSrcweir void SetHdHeight( long nNew ) { nHdHeight = nNew; } SetHdColor(const Color & aNew)116cdf0e10cSrcweir void SetHdColor( const Color& aNew ) { aHdColor = aNew; } 117cdf0e10cSrcweir void SetHdBorder( const SvxBoxItem& rNew ); 118cdf0e10cSrcweir GetHdLeft() const119cdf0e10cSrcweir long GetHdLeft() const { return nHdLeft; } GetHdRight() const120cdf0e10cSrcweir long GetHdRight() const { return nHdRight; } GetHdDist() const121cdf0e10cSrcweir long GetHdDist() const { return nHdDist; } GetHdHeight() const122cdf0e10cSrcweir long GetHdHeight() const { return nHdHeight;} 123cdf0e10cSrcweir GetHdColor() const124cdf0e10cSrcweir const Color& GetHdColor() const { return aHdColor; } GetHdBorder() const125cdf0e10cSrcweir const SvxBoxItem& GetHdBorder() const { return *pHdBorder; } 126cdf0e10cSrcweir SetFtLeft(long nNew)127cdf0e10cSrcweir void SetFtLeft( long nNew ) { nFtLeft = nNew; } SetFtRight(long nNew)128cdf0e10cSrcweir void SetFtRight( long nNew ) { nFtRight = nNew; } SetFtDist(long nNew)129cdf0e10cSrcweir void SetFtDist( long nNew ) { nFtDist = nNew; } SetFtHeight(long nNew)130cdf0e10cSrcweir void SetFtHeight( long nNew ) { nFtHeight = nNew; } SetFtColor(const Color & aNew)131cdf0e10cSrcweir void SetFtColor( const Color& aNew ) { aFtColor = aNew; } 132cdf0e10cSrcweir void SetFtBorder( const SvxBoxItem& rNew ); 133cdf0e10cSrcweir GetFtLeft() const134cdf0e10cSrcweir long GetFtLeft() const { return nFtLeft; } GetFtRight() const135cdf0e10cSrcweir long GetFtRight() const { return nFtRight; } GetFtDist() const136cdf0e10cSrcweir long GetFtDist() const { return nFtDist; } GetFtHeight() const137cdf0e10cSrcweir long GetFtHeight() const { return nFtHeight;} 138cdf0e10cSrcweir GetFtColor() const139cdf0e10cSrcweir const Color& GetFtColor() const { return aFtColor; } GetFtBorder() const140cdf0e10cSrcweir const SvxBoxItem& GetFtBorder() const { return *pFtBorder; } 141cdf0e10cSrcweir SetUsage(sal_uInt16 eU)142cdf0e10cSrcweir void SetUsage( sal_uInt16 eU ) { eUsage = eU; } GetUsage() const143cdf0e10cSrcweir sal_uInt16 GetUsage() const { return eUsage;} 144cdf0e10cSrcweir SetHeader(sal_Bool bNew)145cdf0e10cSrcweir void SetHeader( sal_Bool bNew ) { bHeader = bNew; } GetHeader() const146cdf0e10cSrcweir sal_Bool GetHeader() const { return bHeader;} SetFooter(sal_Bool bNew)147cdf0e10cSrcweir void SetFooter( sal_Bool bNew ) { bFooter = bNew; } GetFooter() const148cdf0e10cSrcweir sal_Bool GetFooter() const { return bFooter;} 149cdf0e10cSrcweir SetTable(sal_Bool bNew)150cdf0e10cSrcweir void SetTable( sal_Bool bNew ) { bTable = bNew; } GetTable() const151cdf0e10cSrcweir sal_Bool GetTable() const { return bTable;} SetHorz(sal_Bool bNew)152cdf0e10cSrcweir void SetHorz( sal_Bool bNew ) { bHorz = bNew; } GetHorz() const153cdf0e10cSrcweir sal_Bool GetHorz() const { return bHorz;} SetVert(sal_Bool bNew)154cdf0e10cSrcweir void SetVert( sal_Bool bNew ) { bVert = bNew; } GetVert() const155cdf0e10cSrcweir sal_Bool GetVert() const { return bVert;} 156cdf0e10cSrcweir 157cdf0e10cSrcweir void EnableFrameDirection(sal_Bool bEnable); 158cdf0e10cSrcweir //uses enum SvxFrameDirection 159cdf0e10cSrcweir void SetFrameDirection(sal_Int32 nFrameDirection); 160cdf0e10cSrcweir 161cdf0e10cSrcweir void ResetBackground(); 162cdf0e10cSrcweir }; 163cdf0e10cSrcweir 164cdf0e10cSrcweir #endif // #ifndef _SVX_PAGECTRL_HXX 165cdf0e10cSrcweir 166cdf0e10cSrcweir 167