LibreOffice Module sd (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sd::slidesorter::view::PageObjectLayouter Class Reference

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>

Collaboration diagram for sd::slidesorter::view::PageObjectLayouter:
[legend]

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 ImageGetTransitionEffectIcon () const
 
const ImageGetCustomAnimationEffectIcon () 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)
 

Private Attributes

VclPtr< sd::WindowmpWindow
 
::tools::Rectangle maFocusIndicatorBoundingBox
 
::tools::Rectangle maPageObjectBoundingBox
 
::tools::Rectangle maPageNumberAreaBoundingBox
 
::tools::Rectangle maPreviewBoundingBox
 
::tools::Rectangle maTransitionEffectBoundingBox
 
::tools::Rectangle maCustomAnimationEffectBoundingBox
 
const Image maTransitionEffectIcon
 
const Image maCustomAnimationEffectIcon
 
const std::shared_ptr< vcl::FontmpPageNumberFont
 

Detailed Description

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.

Member Enumeration Documentation

◆ CoordinateSystem

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.

◆ Part

Enumerator
FocusIndicator 
PageObject 
Preview 
PageNumber 
TransitionEffectIndicator 
CustomAnimationEffectIndicator 

Definition at line 54 of file SlsPageObjectLayouter.hxx.

Constructor & Destructor Documentation

◆ PageObjectLayouter()

sd::slidesorter::view::PageObjectLayouter::PageObjectLayouter ( const Size rPageObjectWindowSize,
const Size rPreviewModelSize,
sd::Window pWindow,
const sal_Int32  nPageCount 
)

Create a new PageObjectLayouter object.

Parameters
rPageObjectSizeIn 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.
nPageCountThe 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().

◆ ~PageObjectLayouter()

sd::slidesorter::view::PageObjectLayouter::~PageObjectLayouter ( )

Definition at line 91 of file SlsPageObjectLayouter.cxx.

Member Function Documentation

◆ CalculatePreviewBoundingBox()

tools::Rectangle sd::slidesorter::view::PageObjectLayouter::CalculatePreviewBoundingBox ( Size rPageObjectSize,
const Size rPreviewModelSize,
const sal_Int32  nPageNumberAreaWidth,
const sal_Int32  nFocusIndicatorWidth 
)
private

◆ GetBoundingBox() [1/2]

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.

Parameters
rWindowThis device is used to translate between model and window coordinates.
rpPageDescriptorThe 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).
ePartThe part of the page object for which to return the bounding box.
eCoordinateSystemThe bounding box can be returned in model and in pixel (window) coordinates.
bIgnoreLocationReturn 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().

◆ GetBoundingBox() [2/2]

tools::Rectangle sd::slidesorter::view::PageObjectLayouter::GetBoundingBox ( const Point rPageObjectLocation,
const Part  ePart,
const CoordinateSystem  eCoordinateSystem 
)
private

◆ GetCustomAnimationEffectIcon()

const Image & sd::slidesorter::view::PageObjectLayouter::GetCustomAnimationEffectIcon ( ) const
inline

◆ GetGridMaxSize()

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.

◆ GetPageNumberAreaSize()

Size sd::slidesorter::view::PageObjectLayouter::GetPageNumberAreaSize ( const int  nPageCount)
private

Definition at line 225 of file SlsPageObjectLayouter.cxx.

References mpPageNumberFont, and mpWindow.

Referenced by PageObjectLayouter().

◆ GetPreviewSize()

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.

◆ GetTransitionEffectIcon()

const Image & sd::slidesorter::view::PageObjectLayouter::GetTransitionEffectIcon ( ) const
inline

Member Data Documentation

◆ maCustomAnimationEffectBoundingBox

::tools::Rectangle sd::slidesorter::view::PageObjectLayouter::maCustomAnimationEffectBoundingBox
private

Definition at line 129 of file SlsPageObjectLayouter.hxx.

Referenced by GetBoundingBox(), and PageObjectLayouter().

◆ maCustomAnimationEffectIcon

const Image sd::slidesorter::view::PageObjectLayouter::maCustomAnimationEffectIcon
private

Definition at line 131 of file SlsPageObjectLayouter.hxx.

Referenced by GetCustomAnimationEffectIcon().

◆ maFocusIndicatorBoundingBox

::tools::Rectangle sd::slidesorter::view::PageObjectLayouter::maFocusIndicatorBoundingBox
private

Definition at line 124 of file SlsPageObjectLayouter.hxx.

Referenced by GetBoundingBox(), and PageObjectLayouter().

◆ maPageNumberAreaBoundingBox

::tools::Rectangle sd::slidesorter::view::PageObjectLayouter::maPageNumberAreaBoundingBox
private

Definition at line 126 of file SlsPageObjectLayouter.hxx.

Referenced by GetBoundingBox(), and PageObjectLayouter().

◆ maPageObjectBoundingBox

::tools::Rectangle sd::slidesorter::view::PageObjectLayouter::maPageObjectBoundingBox
private

Definition at line 125 of file SlsPageObjectLayouter.hxx.

Referenced by GetBoundingBox(), and PageObjectLayouter().

◆ maPreviewBoundingBox

::tools::Rectangle sd::slidesorter::view::PageObjectLayouter::maPreviewBoundingBox
private

Definition at line 127 of file SlsPageObjectLayouter.hxx.

Referenced by GetBoundingBox(), and PageObjectLayouter().

◆ maTransitionEffectBoundingBox

::tools::Rectangle sd::slidesorter::view::PageObjectLayouter::maTransitionEffectBoundingBox
private

Definition at line 128 of file SlsPageObjectLayouter.hxx.

Referenced by GetBoundingBox(), and PageObjectLayouter().

◆ maTransitionEffectIcon

const Image sd::slidesorter::view::PageObjectLayouter::maTransitionEffectIcon
private

◆ mpPageNumberFont

const std::shared_ptr<vcl::Font> sd::slidesorter::view::PageObjectLayouter::mpPageNumberFont
private

Definition at line 132 of file SlsPageObjectLayouter.hxx.

Referenced by GetPageNumberAreaSize().

◆ mpWindow

VclPtr<sd::Window> sd::slidesorter::view::PageObjectLayouter::mpWindow
private

Definition at line 123 of file SlsPageObjectLayouter.hxx.

Referenced by GetBoundingBox(), and GetPageNumberAreaSize().


The documentation for this class was generated from the following files: