LibreOffice Module svx (master) 1
pagectrl.hxx
Go to the documentation of this file.
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/customweld.hxx>
23#include <svx/svxdllapi.h>
25
26enum class SvxPageUsage;
27enum class SvxFrameDirection;
28
30{
31private:
34
39
43
48
53
57
58 bool bFooter : 1;
59 bool bHeader : 1;
60 bool bTable : 1;
61 bool bHorz : 1;
62 bool bVert : 1;
63
65
66protected:
67 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
68
69 virtual void DrawPage(vcl::RenderContext& rRenderContext, const Point& rPoint,
70 const bool bSecond, const bool bEnabled);
71
72 static void drawFillAttributes(vcl::RenderContext& rRenderContext,
74 const tools::Rectangle& rPaintRange, const tools::Rectangle& rDefineRange);
75
76public:
78 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
79 virtual ~SvxPageWindow() override;
80
82 {
83 maHeaderFillAttributes = rFillAttributes;
84 }
86 {
87 maFooterFillAttributes = rFillAttributes;
88 }
90 {
91 maPageFillAttributes = rFillAttributes;
92 }
94 {
95 return maPageFillAttributes;
96 }
97 void SetSize(const Size& rSize)
98 {
99 aSize = rSize;
100 }
101 const Size& GetSize() const
102 {
103 return aSize;
104 }
105
106 void SetTop(tools::Long nNew) { nTop = nNew; }
107 void SetBottom(tools::Long nNew) { nBottom = nNew; }
108 void SetLeft(tools::Long nNew) { nLeft = nNew; }
109 void SetRight(tools::Long nNew) { nRight = nNew; }
110
111 tools::Long GetTop() const { return nTop; }
112 tools::Long GetBottom() const { return nBottom; }
113 tools::Long GetLeft() const { return nLeft; }
114 tools::Long GetRight() const { return nRight; }
115
116 void SetHdLeft(tools::Long nNew) { nHdLeft = nNew; }
117 void SetHdRight(tools::Long nNew) { nHdRight = nNew; }
118 void SetHdDist(tools::Long nNew) { nHdDist = nNew; }
119 void SetHdHeight(tools::Long nNew) { nHdHeight = nNew; }
120
121 tools::Long GetHdLeft() const { return nHdLeft; }
122 tools::Long GetHdRight() const { return nHdRight; }
123 tools::Long GetHdDist() const { return nHdDist; }
124 tools::Long GetHdHeight() const { return nHdHeight; }
125
126 void SetFtLeft(tools::Long nNew) { nFtLeft = nNew; }
127 void SetFtRight(tools::Long nNew) { nFtRight = nNew; }
128 void SetFtDist(tools::Long nNew) { nFtDist = nNew; }
129 void SetFtHeight(tools::Long nNew) { nFtHeight = nNew; }
130
131 tools::Long GetFtLeft() const { return nFtLeft; }
132 tools::Long GetFtRight() const { return nFtRight; }
133 tools::Long GetFtDist() const { return nFtDist; }
134 tools::Long GetFtHeight() const { return nFtHeight; }
135
136 void SetUsage(SvxPageUsage eU) { eUsage = eU; }
137 SvxPageUsage GetUsage() const { return eUsage; }
138
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; }
144
145 void EnableFrameDirection(bool bEnable);
146 void SetFrameDirection(SvxFrameDirection nDirection);
147
148 void ResetBackground();
149};
150
151#endif // INCLUDED_SVX_PAGECTRL_HXX
152
153/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tools::Long nHdLeft
Definition: pagectrl.hxx:44
tools::Long nFtRight
Definition: pagectrl.hxx:50
void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes)
Definition: pagectrl.hxx:81
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maPageFillAttributes
Definition: pagectrl.hxx:56
SvxPageUsage eUsage
Definition: pagectrl.hxx:64
void SetUsage(SvxPageUsage eU)
Definition: pagectrl.hxx:136
void SetBottom(tools::Long nNew)
Definition: pagectrl.hxx:107
tools::Long GetFtDist() const
Definition: pagectrl.hxx:133
void SetHdLeft(tools::Long nNew)
Definition: pagectrl.hxx:116
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFooterFillAttributes
Definition: pagectrl.hxx:55
const Size & GetSize() const
Definition: pagectrl.hxx:101
tools::Long GetBottom() const
Definition: pagectrl.hxx:112
SvxFrameDirection nFrameDirection
Definition: pagectrl.hxx:42
void SetHdHeight(tools::Long nNew)
Definition: pagectrl.hxx:119
void SetTable(bool bNew)
Definition: pagectrl.hxx:141
void SetHorz(bool bNew)
Definition: pagectrl.hxx:142
tools::Long GetTop() const
Definition: pagectrl.hxx:111
SvxPageUsage GetUsage() const
Definition: pagectrl.hxx:137
tools::Long GetHdLeft() const
Definition: pagectrl.hxx:121
void setPageFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes)
Definition: pagectrl.hxx:89
tools::Long nHdHeight
Definition: pagectrl.hxx:47
void SetFtDist(tools::Long nNew)
Definition: pagectrl.hxx:128
void SetSize(const Size &rSize)
Definition: pagectrl.hxx:97
tools::Long GetHdRight() const
Definition: pagectrl.hxx:122
void SetLeft(tools::Long nNew)
Definition: pagectrl.hxx:108
void SetHdDist(tools::Long nNew)
Definition: pagectrl.hxx:118
tools::Long nFtDist
Definition: pagectrl.hxx:51
void SetFtLeft(tools::Long nNew)
Definition: pagectrl.hxx:126
void SetFtRight(tools::Long nNew)
Definition: pagectrl.hxx:127
tools::Long GetFtRight() const
Definition: pagectrl.hxx:132
tools::Long nRight
Definition: pagectrl.hxx:38
void SetHdRight(tools::Long nNew)
Definition: pagectrl.hxx:117
tools::Long nFtHeight
Definition: pagectrl.hxx:52
void setFooterFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes)
Definition: pagectrl.hxx:85
tools::Long GetFtLeft() const
Definition: pagectrl.hxx:131
tools::Long nHdDist
Definition: pagectrl.hxx:46
tools::Long GetRight() const
Definition: pagectrl.hxx:114
void SetFooter(bool bNew)
Definition: pagectrl.hxx:140
tools::Long GetLeft() const
Definition: pagectrl.hxx:113
const drawinglayer::attribute::SdrAllFillAttributesHelperPtr & getPageFillAttributes() const
Definition: pagectrl.hxx:93
tools::Long GetHdHeight() const
Definition: pagectrl.hxx:124
tools::Long nLeft
Definition: pagectrl.hxx:37
void SetVert(bool bNew)
Definition: pagectrl.hxx:143
tools::Long nBottom
Definition: pagectrl.hxx:36
void SetFtHeight(tools::Long nNew)
Definition: pagectrl.hxx:129
tools::Long GetHdDist() const
Definition: pagectrl.hxx:123
tools::Long nTop
Definition: pagectrl.hxx:35
tools::Long nHdRight
Definition: pagectrl.hxx:45
bool bFrameDirection
Definition: pagectrl.hxx:41
bool bResetBackground
Definition: pagectrl.hxx:40
void SetHeader(bool bNew)
Definition: pagectrl.hxx:139
tools::Long GetFtHeight() const
Definition: pagectrl.hxx:134
void SetTop(tools::Long nNew)
Definition: pagectrl.hxx:106
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maHeaderFillAttributes
Definition: pagectrl.hxx:54
tools::Long nFtLeft
Definition: pagectrl.hxx:49
void SetRight(tools::Long nNew)
Definition: pagectrl.hxx:109
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0
SvxFrameDirection
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
long Long
SvxPageUsage
Definition: pageitem.hxx:33
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28