LibreOffice Module sd (master) 1
|
In contrast to the Layouter that places page objects in the view, the PageObjectLayouter places the parts of individual page objects like page number area, borders, preview. More...
#include <SlsPageObjectLayouter.hxx>
Public Types | |
enum class | Part { FocusIndicator , PageObject , Preview , PageNumber , TransitionEffectIndicator , CustomAnimationEffectIndicator } |
enum | CoordinateSystem { WindowCoordinateSystem , ModelCoordinateSystem } |
Two coordinate systems are supported. More... | |
Public Member Functions | |
PageObjectLayouter (const Size &rPageObjectWindowSize, const Size &rPreviewModelSize, sd::Window *pWindow, const sal_Int32 nPageCount) | |
Create a new PageObjectLayouter object. More... | |
~PageObjectLayouter () | |
::tools::Rectangle | GetBoundingBox (const model::SharedPageDescriptor &rpPageDescriptor, const Part ePart, const CoordinateSystem eCoordinateSystem, bool bIgnoreLocation=false) |
Return the bounding box of the page object or one of its graphical parts. More... | |
Size | GetPreviewSize () |
the size of the embedded preview: position independent, in window coordinate system More... | |
Size | GetGridMaxSize () |
the maximum size of each tile, also position independent, in window coordinate system More... | |
const Image & | GetTransitionEffectIcon () const |
const Image & | GetCustomAnimationEffectIcon () const |
Private Member Functions | |
::tools::Rectangle | GetBoundingBox (const Point &rPageObjectLocation, const Part ePart, const CoordinateSystem eCoordinateSystem) |
Size | GetPageNumberAreaSize (const int nPageCount) |
::tools::Rectangle | CalculatePreviewBoundingBox (Size &rPageObjectSize, const Size &rPreviewModelSize, const sal_Int32 nPageNumberAreaWidth, const sal_Int32 nFocusIndicatorWidth) |
In contrast to the Layouter that places page objects in the view, the PageObjectLayouter places the parts of individual page objects like page number area, borders, preview.
Definition at line 35 of file SlsPageObjectLayouter.hxx.
Two coordinate systems are supported.
They differ only in translation not in scale. Both relate to pixel values in the window. A position in the model coordinate system does not change when the window content is scrolled up or down. In the window coordinate system (relative to the top left point of the window)scrolling leads to different values.
Enumerator | |
---|---|
WindowCoordinateSystem | |
ModelCoordinateSystem |
Definition at line 77 of file SlsPageObjectLayouter.hxx.
|
strong |
Enumerator | |
---|---|
FocusIndicator | |
PageObject | |
Preview | |
PageNumber | |
TransitionEffectIndicator | |
CustomAnimationEffectIndicator |
Definition at line 54 of file SlsPageObjectLayouter.hxx.
sd::slidesorter::view::PageObjectLayouter::PageObjectLayouter | ( | const Size & | rPageObjectWindowSize, |
const Size & | rPreviewModelSize, | ||
sd::Window * | pWindow, | ||
const sal_Int32 | nPageCount | ||
) |
Create a new PageObjectLayouter object.
rPageObjectSize | In general either the width or the height will be 0 in order to signal that this size component has to be calculated from the other. This calculation will make the preview as large as possible. |
nPageCount | The page count is used to determine how wide the page number area has to be, how many digits to except for the largest page number. |
Definition at line 39 of file SlsPageObjectLayouter.cxx.
References tools::Rectangle::Bottom(), CalculatePreviewBoundingBox(), GetFont(), GetPageNumberAreaSize(), Image::GetSizePixel(), Size::Height(), tools::Rectangle::Left(), maCustomAnimationEffectBoundingBox, maFocusIndicatorBoundingBox, maPageNumberAreaBoundingBox, maPageObjectBoundingBox, maPreviewBoundingBox, maTransitionEffectBoundingBox, maTransitionEffectIcon, mpWindow, sd::slidesorter::view::Theme_FocusIndicatorWidth, and Size::Width().
sd::slidesorter::view::PageObjectLayouter::~PageObjectLayouter | ( | ) |
Definition at line 91 of file SlsPageObjectLayouter.cxx.
|
private |
Definition at line 95 of file SlsPageObjectLayouter.cxx.
References Image::GetSizePixel(), Size::Height(), maTransitionEffectIcon, Size::setHeight(), Size::setWidth(), and Size::Width().
Referenced by PageObjectLayouter().
tools::Rectangle sd::slidesorter::view::PageObjectLayouter::GetBoundingBox | ( | const model::SharedPageDescriptor & | rpPageDescriptor, |
const Part | ePart, | ||
const CoordinateSystem | eCoordinateSystem, | ||
bool | bIgnoreLocation = false |
||
) |
Return the bounding box of the page object or one of its graphical parts.
rWindow | This device is used to translate between model and window coordinates. |
rpPageDescriptor | The page for which to calculate the bounding box. This may be NULL. When it is NULL then a generic bounding box is calculated for the location (0,0). |
ePart | The part of the page object for which to return the bounding box. |
eCoordinateSystem | The bounding box can be returned in model and in pixel (window) coordinates. |
bIgnoreLocation | Return a position ignoring the slides' location, ie. as if we were the first slide. |
Definition at line 158 of file SlsPageObjectLayouter.cxx.
References GetBoundingBox().
Referenced by GetBoundingBox(), GetGridMaxSize(), sd::slidesorter::view::PageObjectPainter::GetPreviewBitmap(), GetPreviewSize(), sd::slidesorter::view::PageObjectPainter::PaintBackground(), sd::slidesorter::view::PageObjectPainter::PaintBackgroundDetail(), sd::slidesorter::view::PageObjectPainter::PaintCustomAnimationEffect(), sd::slidesorter::view::PageObjectPainter::PaintPageNumber(), sd::slidesorter::view::PageObjectPainter::PaintPreview(), and sd::slidesorter::view::PageObjectPainter::PaintTransitionEffect().
|
private |
Definition at line 171 of file SlsPageObjectLayouter.cxx.
References tools::Rectangle::BottomRight(), CustomAnimationEffectIndicator, FocusIndicator, maCustomAnimationEffectBoundingBox, maFocusIndicatorBoundingBox, maPageNumberAreaBoundingBox, maPageObjectBoundingBox, maPreviewBoundingBox, maTransitionEffectBoundingBox, mpWindow, PageNumber, PageObject, Preview, tools::Rectangle::TopLeft(), TransitionEffectIndicator, and WindowCoordinateSystem.
|
inline |
Definition at line 114 of file SlsPageObjectLayouter.hxx.
References maCustomAnimationEffectIcon.
Referenced by sd::slidesorter::view::PageObjectPainter::PaintCustomAnimationEffect().
Size sd::slidesorter::view::PageObjectLayouter::GetGridMaxSize | ( | ) |
the maximum size of each tile, also position independent, in window coordinate system
Definition at line 219 of file SlsPageObjectLayouter.cxx.
References FocusIndicator, GetBoundingBox(), tools::Rectangle::GetSize(), and WindowCoordinateSystem.
|
private |
Definition at line 225 of file SlsPageObjectLayouter.cxx.
References mpPageNumberFont, and mpWindow.
Referenced by PageObjectLayouter().
Size sd::slidesorter::view::PageObjectLayouter::GetPreviewSize | ( | ) |
the size of the embedded preview: position independent, in window coordinate system
Definition at line 213 of file SlsPageObjectLayouter.cxx.
References GetBoundingBox(), tools::Rectangle::GetSize(), Preview, and WindowCoordinateSystem.
|
inline |
Definition at line 113 of file SlsPageObjectLayouter.hxx.
References maTransitionEffectIcon.
Referenced by sd::slidesorter::view::PageObjectPainter::PaintTransitionEffect().
|
private |
Definition at line 129 of file SlsPageObjectLayouter.hxx.
Referenced by GetBoundingBox(), and PageObjectLayouter().
|
private |
Definition at line 131 of file SlsPageObjectLayouter.hxx.
Referenced by GetCustomAnimationEffectIcon().
|
private |
Definition at line 124 of file SlsPageObjectLayouter.hxx.
Referenced by GetBoundingBox(), and PageObjectLayouter().
|
private |
Definition at line 126 of file SlsPageObjectLayouter.hxx.
Referenced by GetBoundingBox(), and PageObjectLayouter().
|
private |
Definition at line 125 of file SlsPageObjectLayouter.hxx.
Referenced by GetBoundingBox(), and PageObjectLayouter().
|
private |
Definition at line 127 of file SlsPageObjectLayouter.hxx.
Referenced by GetBoundingBox(), and PageObjectLayouter().
|
private |
Definition at line 128 of file SlsPageObjectLayouter.hxx.
Referenced by GetBoundingBox(), and PageObjectLayouter().
|
private |
Definition at line 130 of file SlsPageObjectLayouter.hxx.
Referenced by CalculatePreviewBoundingBox(), GetTransitionEffectIcon(), and PageObjectLayouter().
|
private |
Definition at line 132 of file SlsPageObjectLayouter.hxx.
Referenced by GetPageNumberAreaSize().
|
private |
Definition at line 123 of file SlsPageObjectLayouter.hxx.
Referenced by GetBoundingBox(), and GetPageNumberAreaSize().