LibreOffice Module sd (master) 1
|
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 Implementation * | Create (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::Window > | mpWindow |
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< PageObjectLayouter > | mpPageObjectLayouter |
std::shared_ptr< view::Theme > | mpTheme |
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 |
Definition at line 31 of file SlsLayouter.cxx.
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.
|
virtual |
Definition at line 474 of file SlsLayouter.cxx.
|
protected |
Definition at line 430 of file SlsLayouter.cxx.
|
explicitprotected |
Definition at line 453 of file SlsLayouter.cxx.
tools::Rectangle sd::slidesorter::view::Layouter::Implementation::AddBorderAndGap | ( | const ::tools::Rectangle & | rBoundingBox, |
const sal_Int32 | nRow, | ||
const sal_Int32 | nColumn | ||
) | const |
Definition at line 926 of file SlsLayouter.cxx.
References tools::Rectangle::AdjustBottom(), tools::Rectangle::AdjustLeft(), tools::Rectangle::AdjustRight(), tools::Rectangle::AdjustTop(), tools::Rectangle::SetLeft(), and tools::Rectangle::SetTop().
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().
|
pure virtual |
Calculate the logical part of the insert position, i.e.
the page after which to insert.
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protected |
Definition at line 979 of file SlsLayouter.cxx.
References sd::slidesorter::view::InsertPosition::SetLogicalPosition(), and Point::Y().
|
static |
Definition at line 417 of file SlsLayouter.cxx.
References sd::slidesorter::view::Layouter::GRID, sd::slidesorter::view::Layouter::HORIZONTAL, and sd::slidesorter::view::Layouter::VERTICAL.
Referenced by sd::slidesorter::view::Layouter::Rearrange().
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.
nXPosition | Horizontal position in model coordinates. |
bIncludeBordersAndGaps | When this flag is <TRUE> then the area of borders and gaps are interpreted as belonging to one of the columns. |
eGapMembership | Specifies to what column the gap areas belong. |
Definition at line 569 of file SlsLayouter.cxx.
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.
tools::Rectangle sd::slidesorter::view::Layouter::Implementation::GetInnerBoundingBox | ( | model::SlideSorterModel const & | rModel, |
const sal_Int32 | nIndex | ||
) | const |
Return the bounding box of the preview or, when selected, of the page object.
Thus, it returns something like a visual bounding box.
Definition at line 784 of file SlsLayouter.cxx.
References sd::slidesorter::model::SlideSorterModel::GetPageDescriptor(), sd::slidesorter::view::PageObjectLayouter::ModelCoordinateSystem, nIndex, sd::slidesorter::view::PageObjectLayouter::PageObject, sd::slidesorter::view::PageObjectLayouter::Preview, and sd::slidesorter::model::PageDescriptor::ST_Selected.
|
pure virtual |
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.
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.
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().
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.
nYPosition | Vertical position in model coordinates. |
bIncludeBordersAndGaps | When this flag is <TRUE> then the area of borders and gaps are interpreted as belonging to one of the rows. |
eGapMembership | Specifies 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.
|
protected |
Definition at line 832 of file SlsLayouter.cxx.
References Size::Height(), Size::setHeight(), Size::setWidth(), and Size::Width().
tools::Rectangle sd::slidesorter::view::Layouter::Implementation::GetTotalBoundingBox | ( | ) | const |
Definition at line 952 of file SlsLayouter.cxx.
Range sd::slidesorter::view::Layouter::Implementation::GetValidHorizontalSizeRange | ( | ) | const |
Definition at line 802 of file SlsLayouter.cxx.
Range sd::slidesorter::view::Layouter::Implementation::GetValidVerticalSizeRange | ( | ) | const |
Definition at line 809 of file SlsLayouter.cxx.
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.
|
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.
nDistanceIntoGap | Vertical distance from the bottom of the upper row down into the gap or horizontal distance from the right edge right into the gap. |
eGapMemberhship | This value decides what areas in the gap belong to which (or no) row or column. |
nIndex | The row index of the upper row or the column index of the left column. |
nGap | Width or height of the gap in model coordinates between the page borders. |
Definition at line 613 of file SlsLayouter.cxx.
References nIndex.
|
static |
Definition at line 44 of file SlsLayouter.cxx.
|
static |
Definition at line 43 of file SlsLayouter.cxx.
Size sd::slidesorter::view::Layouter::Implementation::maMaximalSize |
Definition at line 47 of file SlsLayouter.cxx.
Size sd::slidesorter::view::Layouter::Implementation::maMinimalSize |
Definition at line 45 of file SlsLayouter.cxx.
Size sd::slidesorter::view::Layouter::Implementation::maPageObjectSize |
Definition at line 61 of file SlsLayouter.cxx.
Size sd::slidesorter::view::Layouter::Implementation::maPreferredSize |
Definition at line 46 of file SlsLayouter.cxx.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnBottomBorder |
Definition at line 42 of file SlsLayouter.cxx.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnColumnCount |
Definition at line 51 of file SlsLayouter.cxx.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnLeftBorder |
Definition at line 39 of file SlsLayouter.cxx.
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.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnMaximalColumnCount |
Definition at line 49 of file SlsLayouter.cxx.
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.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnMinimalColumnCount |
Definition at line 48 of file SlsLayouter.cxx.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnPageCount |
Definition at line 50 of file SlsLayouter.cxx.
|
static |
Definition at line 38 of file SlsLayouter.cxx.
|
static |
Definition at line 35 of file SlsLayouter.cxx.
|
static |
Definition at line 36 of file SlsLayouter.cxx.
|
static |
Definition at line 37 of file SlsLayouter.cxx.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnRightBorder |
Definition at line 40 of file SlsLayouter.cxx.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnRowCount |
Definition at line 52 of file SlsLayouter.cxx.
sal_Int32 sd::slidesorter::view::Layouter::Implementation::mnTopBorder |
Definition at line 41 of file SlsLayouter.cxx.
std::shared_ptr<PageObjectLayouter> sd::slidesorter::view::Layouter::Implementation::mpPageObjectLayouter |
Definition at line 62 of file SlsLayouter.cxx.
std::shared_ptr<view::Theme> sd::slidesorter::view::Layouter::Implementation::mpTheme |
Definition at line 63 of file SlsLayouter.cxx.
VclPtr<sd::Window> sd::slidesorter::view::Layouter::Implementation::mpWindow |
Definition at line 34 of file SlsLayouter.cxx.