LibreOffice Module sd (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
sd::slidesorter::view::Layouter::Implementation Class Referenceabstract
Collaboration diagram for sd::slidesorter::view::Layouter::Implementation:
[legend]

Public Types

enum  GapMembership {
  GM_NONE ,
  GM_PREVIOUS ,
  GM_BOTH ,
  GM_NEXT ,
  GM_PAGE_BORDER
}
 Specify how the gap between two page objects is associated with the page objects. More...
 

Public Member Functions

virtual Layouter::Orientation GetOrientation () const =0
 
bool Rearrange (const Size &rWindowSize, const Size &rPreviewModelSize, const sal_uInt32 nPageCount)
 
sal_Int32 GetRowAtPosition (sal_Int32 nYPosition, bool bIncludeBordersAndGaps, GapMembership eGapMembership) const
 Calculate the row that the point with the given vertical coordinate is over. More...
 
sal_Int32 GetColumnAtPosition (sal_Int32 nXPosition, bool bIncludeBordersAndGaps, GapMembership eGapMembership) const
 Calculate the column that the point with the given horizontal coordinate is over. More...
 
virtual void CalculateLogicalInsertPosition (const Point &rModelPosition, InsertPosition &rPosition) const =0
 Calculate the logical part of the insert position, i.e. More...
 
void CalculateGeometricPosition (InsertPosition &rPosition, const Size &rIndicatorSize, const bool bIsVertical, model::SlideSorterModel const &rModel) const
 Calculate the geometrical part of the insert position, i.e. More...
 
::tools::Rectangle GetInnerBoundingBox (model::SlideSorterModel const &rModel, const sal_Int32 nIndex) const
 Return the bounding box of the preview or, when selected, of the page object. More...
 
Range GetValidHorizontalSizeRange () const
 
Range GetValidVerticalSizeRange () const
 
Range GetRangeOfVisiblePageObjects (const ::tools::Rectangle &aVisibleArea) const
 
sal_Int32 GetIndex (const sal_Int32 nRow, const sal_Int32 nColumn, const bool bClampToValidRange) const
 
::tools::Rectangle GetPageObjectBox (const sal_Int32 nIndex, const bool bIncludeBorderAndGap=false) const
 
::tools::Rectangle GetPageObjectBox (const sal_Int32 nRow, const sal_Int32 nColumn) const
 
::tools::Rectangle AddBorderAndGap (const ::tools::Rectangle &rBoundingBox, const sal_Int32 nRow, const sal_Int32 nColumn) const
 
::tools::Rectangle GetTotalBoundingBox () const
 
virtual ~Implementation ()
 

Static Public Member Functions

static ImplementationCreate (const Implementation &rImplementation, const Layouter::Orientation eOrientation)
 
static sal_Int32 ResolvePositionInGap (sal_Int32 nDistanceIntoGap, GapMembership eGapMembership, sal_Int32 nIndex, sal_Int32 nGap)
 This method is typically called from GetRowAtPosition() and GetColumnAtPosition() to handle a position that lies inside the gap between two adjacent rows or columns. More...
 

Public Attributes

VclPtr< sd::WindowmpWindow
 
sal_Int32 mnLeftBorder
 
sal_Int32 mnRightBorder
 
sal_Int32 mnTopBorder
 
sal_Int32 mnBottomBorder
 
Size maMinimalSize
 
Size maPreferredSize
 
Size maMaximalSize
 
sal_Int32 mnMinimalColumnCount
 
sal_Int32 mnMaximalColumnCount
 
sal_Int32 mnPageCount
 
sal_Int32 mnColumnCount
 
sal_Int32 mnRowCount
 
sal_Int32 mnMaxColumnCount
 The maximum number of columns. More...
 
sal_Int32 mnMaxRowCount
 The maximum number of rows. More...
 
Size maPageObjectSize
 
std::shared_ptr< PageObjectLayoutermpPageObjectLayouter
 
std::shared_ptr< view::ThemempTheme
 

Static Public Attributes

static const sal_Int32 mnRequestedLeftBorder = 5
 
static const sal_Int32 mnRequestedRightBorder = 5
 
static const sal_Int32 mnRequestedTopBorder = 5
 
static const sal_Int32 mnRequestedBottomBorder = 5
 
static const sal_Int32 gnVerticalGap = 10 - 2*Theme_FocusIndicatorWidth
 
static const sal_Int32 gnHorizontalGap = 10 - 2*Theme_FocusIndicatorWidth
 

Protected Member Functions

 Implementation (sd::Window *pWindow, std::shared_ptr< view::Theme > pTheme)
 
 Implementation (const Implementation &rImplementation)
 
virtual void CalculateRowAndColumnCount (const Size &rWindowSize)=0
 
virtual void CalculateMaxRowAndColumnCount (const Size &rWindowSize)=0
 
virtual Size CalculateTargetSize (const Size &rWindowSize) const =0
 
Size GetTargetSize (const Size &rWindowSize, const bool bCalculateWidth, const bool bCalculateHeight) const
 
void CalculateVerticalLogicalInsertPosition (const Point &rModelPosition, InsertPosition &rPosition) const
 

Detailed Description

Definition at line 31 of file SlsLayouter.cxx.

Member Enumeration Documentation

◆ GapMembership

Specify how the gap between two page objects is associated with the page objects.

Enumerator
GM_NONE 
GM_PREVIOUS 
GM_BOTH 
GM_NEXT 
GM_PAGE_BORDER 

Definition at line 68 of file SlsLayouter.cxx.

Constructor & Destructor Documentation

◆ ~Implementation()

sd::slidesorter::view::Layouter::Implementation::~Implementation ( )
virtual

Definition at line 474 of file SlsLayouter.cxx.

◆ Implementation() [1/2]

sd::slidesorter::view::Layouter::Implementation::Implementation ( sd::Window pWindow,
std::shared_ptr< view::Theme pTheme 
)
protected

Definition at line 430 of file SlsLayouter.cxx.

◆ Implementation() [2/2]

sd::slidesorter::view::Layouter::Implementation::Implementation ( const Implementation rImplementation)
explicitprotected

Definition at line 453 of file SlsLayouter.cxx.

Member Function Documentation

◆ AddBorderAndGap()

tools::Rectangle sd::slidesorter::view::Layouter::Implementation::AddBorderAndGap ( const ::tools::Rectangle rBoundingBox,
const sal_Int32  nRow,
const sal_Int32  nColumn 
) const

◆ CalculateGeometricPosition()

void sd::slidesorter::view::Layouter::Implementation::CalculateGeometricPosition ( InsertPosition rPosition,
const Size rIndicatorSize,
const bool  bIsVertical,
model::SlideSorterModel const &  rModel 
) const

Calculate the geometrical part of the insert position, i.e.

the location of where to display the insertion indicator and the distances about which the leading and trailing pages have to be moved to make room for the indicator.

Definition at line 667 of file SlsLayouter.cxx.

References sd::slidesorter::view::InsertPosition::GetIndex(), sd::slidesorter::view::Layouter::GetPageObjectBox(), Size::Height(), sd::slidesorter::view::InsertPosition::IsAtRunEnd(), sd::slidesorter::view::InsertPosition::IsAtRunStart(), sd::slidesorter::view::InsertPosition::IsExtraSpaceNeeded(), nIndex, sd::slidesorter::view::InsertPosition::SetGeometricalPosition(), and Size::Width().

◆ CalculateLogicalInsertPosition()

virtual void sd::slidesorter::view::Layouter::Implementation::CalculateLogicalInsertPosition ( const Point rModelPosition,
InsertPosition rPosition 
) const
pure virtual

Calculate the logical part of the insert position, i.e.

the page after which to insert.

◆ CalculateMaxRowAndColumnCount()

virtual void sd::slidesorter::view::Layouter::Implementation::CalculateMaxRowAndColumnCount ( const Size rWindowSize)
protectedpure virtual

◆ CalculateRowAndColumnCount()

virtual void sd::slidesorter::view::Layouter::Implementation::CalculateRowAndColumnCount ( const Size rWindowSize)
protectedpure virtual

◆ CalculateTargetSize()

virtual Size sd::slidesorter::view::Layouter::Implementation::CalculateTargetSize ( const Size rWindowSize) const
protectedpure virtual

◆ CalculateVerticalLogicalInsertPosition()

void sd::slidesorter::view::Layouter::Implementation::CalculateVerticalLogicalInsertPosition ( const Point rModelPosition,
InsertPosition rPosition 
) const
protected

◆ Create()

Layouter::Implementation * sd::slidesorter::view::Layouter::Implementation::Create ( const Implementation rImplementation,
const Layouter::Orientation  eOrientation 
)
static

◆ GetColumnAtPosition()

sal_Int32 sd::slidesorter::view::Layouter::Implementation::GetColumnAtPosition ( sal_Int32  nXPosition,
bool  bIncludeBordersAndGaps,
GapMembership  eGapMembership 
) const

Calculate the column that the point with the given horizontal coordinate is over.

The vertical component is ignored.

Parameters
nXPositionHorizontal position in model coordinates.
bIncludeBordersAndGapsWhen this flag is <TRUE> then the area of borders and gaps are interpreted as belonging to one of the columns.
eGapMembershipSpecifies to what column the gap areas belong.

Definition at line 569 of file SlsLayouter.cxx.

◆ GetIndex()

sal_Int32 sd::slidesorter::view::Layouter::Implementation::GetIndex ( const sal_Int32  nRow,
const sal_Int32  nColumn,
const bool  bClampToValidRange 
) const

Definition at line 876 of file SlsLayouter.cxx.

References nIndex.

◆ GetInnerBoundingBox()

tools::Rectangle sd::slidesorter::view::Layouter::Implementation::GetInnerBoundingBox ( model::SlideSorterModel const &  rModel,
const sal_Int32  nIndex 
) const

◆ GetOrientation()

virtual Layouter::Orientation sd::slidesorter::view::Layouter::Implementation::GetOrientation ( ) const
pure virtual

◆ GetPageObjectBox() [1/2]

tools::Rectangle sd::slidesorter::view::Layouter::Implementation::GetPageObjectBox ( const sal_Int32  nIndex,
const bool  bIncludeBorderAndGap = false 
) const

Definition at line 898 of file SlsLayouter.cxx.

References sd::slidesorter::view::Layouter::GetPageObjectBox(), and nIndex.

◆ GetPageObjectBox() [2/2]

tools::Rectangle sd::slidesorter::view::Layouter::Implementation::GetPageObjectBox ( const sal_Int32  nRow,
const sal_Int32  nColumn 
) const

Definition at line 912 of file SlsLayouter.cxx.

◆ GetRangeOfVisiblePageObjects()

Range sd::slidesorter::view::Layouter::Implementation::GetRangeOfVisiblePageObjects ( const ::tools::Rectangle aVisibleArea) const

Definition at line 816 of file SlsLayouter.cxx.

References sd::slidesorter::view::Layouter::GetIndex().

◆ GetRowAtPosition()

sal_Int32 sd::slidesorter::view::Layouter::Implementation::GetRowAtPosition ( sal_Int32  nYPosition,
bool  bIncludeBordersAndGaps,
GapMembership  eGapMembership 
) const

Calculate the row that the point with the given vertical coordinate is over.

The horizontal component is ignored.

Parameters
nYPositionVertical position in model coordinates.
bIncludeBordersAndGapsWhen this flag is <TRUE> then the area of borders and gaps are interpreted as belonging to one of the rows.
eGapMembershipSpecifies to what row the gap areas belong. Here GM_NONE corresponds to bIncludeBordersAndGaps being <FALSE>. When GM_BOTH is given then the upper half is associated to the row above and the lower half to the row below. Values of GM_PREVIOUS and GM_NEXT associate the whole gap area with the row above or below respectively.

Definition at line 529 of file SlsLayouter.cxx.

◆ GetTargetSize()

Size sd::slidesorter::view::Layouter::Implementation::GetTargetSize ( const Size rWindowSize,
const bool  bCalculateWidth,
const bool  bCalculateHeight 
) const
protected

Definition at line 832 of file SlsLayouter.cxx.

References Size::Height(), Size::setHeight(), Size::setWidth(), and Size::Width().

◆ GetTotalBoundingBox()

tools::Rectangle sd::slidesorter::view::Layouter::Implementation::GetTotalBoundingBox ( ) const

Definition at line 952 of file SlsLayouter.cxx.

◆ GetValidHorizontalSizeRange()

Range sd::slidesorter::view::Layouter::Implementation::GetValidHorizontalSizeRange ( ) const

Definition at line 802 of file SlsLayouter.cxx.

◆ GetValidVerticalSizeRange()

Range sd::slidesorter::view::Layouter::Implementation::GetValidVerticalSizeRange ( ) const

Definition at line 809 of file SlsLayouter.cxx.

◆ Rearrange()

bool sd::slidesorter::view::Layouter::Implementation::Rearrange ( const Size rWindowSize,
const Size rPreviewModelSize,
const sal_uInt32  nPageCount 
)

Definition at line 478 of file SlsLayouter.cxx.

References Size::IsEmpty(), and sd::slidesorter::view::Layouter::mpWindow.

◆ ResolvePositionInGap()

sal_Int32 sd::slidesorter::view::Layouter::Implementation::ResolvePositionInGap ( sal_Int32  nDistanceIntoGap,
GapMembership  eGapMembership,
sal_Int32  nIndex,
sal_Int32  nGap 
)
static

This method is typically called from GetRowAtPosition() and GetColumnAtPosition() to handle a position that lies inside the gap between two adjacent rows or columns.

Parameters
nDistanceIntoGapVertical distance from the bottom of the upper row down into the gap or horizontal distance from the right edge right into the gap.
eGapMemberhshipThis value decides what areas in the gap belong to which (or no) row or column.
nIndexThe row index of the upper row or the column index of the left column.
nGapWidth or height of the gap in model coordinates between the page borders.
Returns
Returns either the index of the upper row (as given as nRow), the index of the lower row (nRow+1) or -1 to indicate that the position belongs to no row.

Definition at line 613 of file SlsLayouter.cxx.

References nIndex.

Member Data Documentation

◆ gnHorizontalGap

const sal_Int32 sd::slidesorter::view::Layouter::Implementation::gnHorizontalGap = 10 - 2*Theme_FocusIndicatorWidth
static

Definition at line 44 of file SlsLayouter.cxx.

◆ gnVerticalGap

const sal_Int32 sd::slidesorter::view::Layouter::Implementation::gnVerticalGap = 10 - 2*Theme_FocusIndicatorWidth
static

Definition at line 43 of file SlsLayouter.cxx.

◆ maMaximalSize

Size sd::slidesorter::view::Layouter::Implementation::maMaximalSize

Definition at line 47 of file SlsLayouter.cxx.

◆ maMinimalSize

Size sd::slidesorter::view::Layouter::Implementation::maMinimalSize

Definition at line 45 of file SlsLayouter.cxx.

◆ maPageObjectSize

Size sd::slidesorter::view::Layouter::Implementation::maPageObjectSize

Definition at line 61 of file SlsLayouter.cxx.

◆ maPreferredSize

Size sd::slidesorter::view::Layouter::Implementation::maPreferredSize

Definition at line 46 of file SlsLayouter.cxx.

◆ mnBottomBorder

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnBottomBorder

Definition at line 42 of file SlsLayouter.cxx.

◆ mnColumnCount

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnColumnCount

Definition at line 51 of file SlsLayouter.cxx.

◆ mnLeftBorder

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnLeftBorder

Definition at line 39 of file SlsLayouter.cxx.

◆ mnMaxColumnCount

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnMaxColumnCount

The maximum number of columns.

Can only be larger than the current number of columns when there are not enough pages to fill all available columns.

Definition at line 56 of file SlsLayouter.cxx.

◆ mnMaximalColumnCount

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnMaximalColumnCount

Definition at line 49 of file SlsLayouter.cxx.

◆ mnMaxRowCount

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnMaxRowCount

The maximum number of rows.

Can only be larger than the current number of rows when there are not enough pages to fill all available rows.

Definition at line 60 of file SlsLayouter.cxx.

◆ mnMinimalColumnCount

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnMinimalColumnCount

Definition at line 48 of file SlsLayouter.cxx.

◆ mnPageCount

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnPageCount

Definition at line 50 of file SlsLayouter.cxx.

◆ mnRequestedBottomBorder

const sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnRequestedBottomBorder = 5
static

Definition at line 38 of file SlsLayouter.cxx.

◆ mnRequestedLeftBorder

const sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnRequestedLeftBorder = 5
static

Definition at line 35 of file SlsLayouter.cxx.

◆ mnRequestedRightBorder

const sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnRequestedRightBorder = 5
static

Definition at line 36 of file SlsLayouter.cxx.

◆ mnRequestedTopBorder

const sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnRequestedTopBorder = 5
static

Definition at line 37 of file SlsLayouter.cxx.

◆ mnRightBorder

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnRightBorder

Definition at line 40 of file SlsLayouter.cxx.

◆ mnRowCount

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnRowCount

Definition at line 52 of file SlsLayouter.cxx.

◆ mnTopBorder

sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnTopBorder

Definition at line 41 of file SlsLayouter.cxx.

◆ mpPageObjectLayouter

std::shared_ptr<PageObjectLayouter> sd::slidesorter::view::Layouter::Implementation::mpPageObjectLayouter

Definition at line 62 of file SlsLayouter.cxx.

◆ mpTheme

std::shared_ptr<view::Theme> sd::slidesorter::view::Layouter::Implementation::mpTheme

Definition at line 63 of file SlsLayouter.cxx.

◆ mpWindow

VclPtr<sd::Window> sd::slidesorter::view::Layouter::Implementation::mpWindow

Definition at line 34 of file SlsLayouter.cxx.


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