20#include "KoZoomHandler.h"
27 m_pageLayout.ptWidth = -1.0;
28 m_pageLayout.ptHeight = -1.0;
29 m_pageLayout.ptLeft = -1.0;
30 m_pageLayout.ptRight = -1.0;
31 m_pageLayout.ptBottom = -1.0;
32 m_pageLayout.ptTop = -1.0;
33 m_pageLayout.ptPageEdge = -1.0;
34 m_pageLayout.ptBindingSide = -1.0;
35 m_pageSide = pageNum%2==0 ? Left : Right;
39 if(m_pageLayout.ptWidth != -1)
40 return m_pageLayout.ptWidth;
41 return m_parent->m_defaultPageLayout.ptWidth;
45 if(m_pageLayout.ptHeight != -1)
46 return m_pageLayout.ptHeight;
47 return m_parent->m_defaultPageLayout.ptHeight;
51 m_pageLayout.ptWidth = x == m_parent->m_defaultPageLayout.ptWidth ? -1 : x;
54 m_pageLayout.ptHeight = y == m_parent->m_defaultPageLayout.ptHeight ? -1 : y;
57 m_pageLayout.ptTop = t == m_parent->m_defaultPageLayout.ptTop ? -1 : t;
60 m_pageLayout.ptBottom = b == m_parent->m_defaultPageLayout.ptBottom ? -1 : b;
63 m_pageLayout.ptPageEdge = m == m_parent->m_defaultPageLayout.ptPageEdge ? -1 : m;
64 m_pageLayout.ptLeft = -1;
65 m_pageLayout.ptRight = -1;
68 m_pageLayout.ptBindingSide = m == m_parent->m_defaultPageLayout.ptBindingSide ? -1 : m;
69 m_pageLayout.ptLeft = -1;
70 m_pageLayout.ptRight = -1;
73 m_pageLayout.ptLeft = l == m_parent->m_defaultPageLayout.ptLeft ? -1 : l;
74 m_pageLayout.ptBindingSide = -1;
75 m_pageLayout.ptPageEdge = -1;
77 m_pageLayout.ptRight = 0;
80 m_pageLayout.ptRight = r == m_parent->m_defaultPageLayout.ptRight ? -1 : r;
81 m_pageLayout.ptBindingSide = -1;
82 m_pageLayout.ptPageEdge = -1;
84 m_pageLayout.ptLeft = 0;
88 if(m_pageLayout.ptTop != -1)
89 return m_pageLayout.ptTop;
90 return m_parent->m_defaultPageLayout.ptTop;
93 if(m_pageLayout.ptBottom != -1)
94 return m_pageLayout.ptBottom;
95 return m_parent->m_defaultPageLayout.ptBottom;
99 if(m_pageLayout.ptLeft != -1)
100 return m_pageLayout.ptLeft;
106 return m_parent->m_defaultPageLayout.ptLeft;
109 if(m_pageLayout.ptRight != -1)
110 return m_pageLayout.ptRight;
115 return m_parent->m_defaultPageLayout.ptRight;
118 if(m_pageLayout.ptPageEdge != -1)
119 return m_pageLayout.ptPageEdge;
120 return m_parent->m_defaultPageLayout.ptPageEdge;
123 if(m_pageLayout.ptBindingSide != -1)
124 return m_pageLayout.ptBindingSide;
125 return m_parent->m_defaultPageLayout.ptBindingSide;
134 zoomHandler->zoomItX(
width()), zoomHandler->zoomItY(
height()));
The Page Manager manages all the pages a document contains and separates all the frames the document ...
double topOfPage(int pageNumber) const
Return the y-offset in this document of the top of page with pageNumber Note that pageNumber is NOT a...
void setMarginClosestBinding(const double &y)
set width of the margin that is the closest to the binding, i.e.
void setRightMargin(const double &r)
set width of the right margin.
void setTopMargin(const double &x)
set height of the top margin in pt
void setBottomMargin(const double &y)
set height of the bottom margin in pt
double height() const
return the height of this page (in pt)
void setLeftMargin(const double &l)
set width of the left margin.
double leftMargin() const
return the width of the margin at left (in pt);
void setHeight(const double &y)
set the height of the page in pt
void setWidth(const double &x)
set the width of the page in pt
double topMargin() const
return the height of the margin at top (in pt);
double bottomMargin() const
return the height of the margin at bottom (in pt);
void setPageEdgeMargin(const double &x)
set width of the margin that is the closest to the page edge, i.e.
double pageEdgeMargin() const
return width of the margin that is the closest to the page edge, i.e. left for even pages
double marginClosestBinding() const
return width of the margin that is the closest to the binding, i.e. right for even pages
double width() const
return the width of this page (in pt)
double rightMargin() const
return the width of the margin at left (in pt);
double offsetInDocument() const
All Pages are in a document-wide coordinate system that simply puts every page under the next page an...
TQRect zoomedRect(KoZoomHandler *zoomHandler)
return a TQRect with the size of this page in pixels.
const KoRect rect() const
return a KoRect with the (pt) sizes of this page. Margins are ignored for this function.