Bump version to 6.4-15
[LibreOffice.git] / include / svx / pagectrl.hxx
blobb5abe5c6aec6dcc21fff4a20ee2f115adf35ffad
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/customweld.hxx>
23 #include <svx/svxdllapi.h>
24 #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
26 enum class SvxPageUsage;
27 enum class SvxFrameDirection;
29 class SVX_DLLPUBLIC SvxPageWindow : public weld::CustomWidgetController
31 private:
32 Size aWinSize;
33 Size aSize;
35 long nTop;
36 long nBottom;
37 long nLeft;
38 long nRight;
40 bool bResetBackground;
41 bool bFrameDirection;
42 SvxFrameDirection nFrameDirection;
44 long nHdLeft;
45 long nHdRight;
46 long nHdDist;
47 long nHdHeight;
49 long nFtLeft;
50 long nFtRight;
51 long nFtDist;
52 long nFtHeight;
54 drawinglayer::attribute::SdrAllFillAttributesHelperPtr maHeaderFillAttributes;
55 drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFooterFillAttributes;
56 drawinglayer::attribute::SdrAllFillAttributesHelperPtr maPageFillAttributes;
58 bool bFooter : 1;
59 bool bHeader : 1;
60 bool bTable : 1;
61 bool bHorz : 1;
62 bool bVert : 1;
64 SvxPageUsage eUsage;
66 protected:
67 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
69 virtual void DrawPage(vcl::RenderContext& rRenderContext, const Point& rPoint,
70 const bool bSecond, const bool bEnabled);
72 static void drawFillAttributes(vcl::RenderContext& rRenderContext,
73 const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes,
74 const tools::Rectangle& rPaintRange, const tools::Rectangle& rDefineRange);
76 public:
77 SvxPageWindow();
78 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
79 virtual ~SvxPageWindow() override;
81 void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes)
83 maHeaderFillAttributes = rFillAttributes;
85 void setFooterFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes)
87 maFooterFillAttributes = rFillAttributes;
89 void setPageFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes)
91 maPageFillAttributes = rFillAttributes;
93 const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& getPageFillAttributes() const
95 return maPageFillAttributes;
97 void SetSize(const Size& rSize)
99 aSize = rSize;
101 const Size& GetSize() const
103 return aSize;
106 void SetTop(long nNew) { nTop = nNew; }
107 void SetBottom(long nNew) { nBottom = nNew; }
108 void SetLeft(long nNew) { nLeft = nNew; }
109 void SetRight(long nNew) { nRight = nNew; }
111 long GetTop() const { return nTop; }
112 long GetBottom() const { return nBottom; }
113 long GetLeft() const { return nLeft; }
114 long GetRight() const { return nRight; }
116 void SetHdLeft(long nNew) { nHdLeft = nNew; }
117 void SetHdRight(long nNew) { nHdRight = nNew; }
118 void SetHdDist(long nNew) { nHdDist = nNew; }
119 void SetHdHeight(long nNew) { nHdHeight = nNew; }
121 long GetHdLeft() const { return nHdLeft; }
122 long GetHdRight() const { return nHdRight; }
123 long GetHdDist() const { return nHdDist; }
124 long GetHdHeight() const { return nHdHeight; }
126 void SetFtLeft(long nNew) { nFtLeft = nNew; }
127 void SetFtRight(long nNew) { nFtRight = nNew; }
128 void SetFtDist(long nNew) { nFtDist = nNew; }
129 void SetFtHeight(long nNew) { nFtHeight = nNew; }
131 long GetFtLeft() const { return nFtLeft; }
132 long GetFtRight() const { return nFtRight; }
133 long GetFtDist() const { return nFtDist; }
134 long GetFtHeight() const { return nFtHeight; }
136 void SetUsage(SvxPageUsage eU) { eUsage = eU; }
137 SvxPageUsage GetUsage() const { return eUsage; }
139 void SetHeader( bool bNew ) { bHeader = bNew; }
140 void SetFooter( bool bNew ) { bFooter = bNew; }
141 void SetTable( bool bNew ) { bTable = bNew; }
142 void SetHorz( bool bNew ) { bHorz = bNew; }
143 void SetVert( bool bNew ) { bVert = bNew; }
145 void EnableFrameDirection(bool bEnable);
146 void SetFrameDirection(SvxFrameDirection nDirection);
148 void ResetBackground();
151 #endif // INCLUDED_SVX_PAGECTRL_HXX
153 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */