LibreOffice Module sd (master) 1
|
The insertion indicator is painted as a vertical or horizontal bar in the space between slides. More...
#include <SlsInsertionIndicatorOverlay.hxx>
Public Member Functions | |
InsertionIndicatorOverlay (SlideSorter &rSlideSorter) | |
virtual | ~InsertionIndicatorOverlay () override |
virtual void | SetLayerInvalidator (const SharedILayerInvalidator &rpInvalidator) override |
void | Create (const SdTransferable *pTransferable) |
void | SetLocation (const Point &rPosition) |
Given a position in model coordinates this method calculates the insertion marker both as an index in the document and as a location used for drawing the insertion indicator. More... | |
Size | GetSize () const |
virtual void | Paint (OutputDevice &rDevice, const ::tools::Rectangle &rRepaintArea) override |
bool | IsVisible () const |
void | Hide () |
void | Show () |
::tools::Rectangle | GetBoundingBox () const |
![]() | |
virtual | ~ILayerPainter () |
virtual void | SetLayerInvalidator (const SharedILayerInvalidator &rpInvalidator)=0 |
virtual void | Paint (OutputDevice &rDevice, const ::tools::Rectangle &rRepaintArea)=0 |
Private Member Functions | |
Point | PaintRepresentatives (OutputDevice &rContent, const Size &rPreviewSize, const sal_Int32 nOffset, const ::std::vector< controller::TransferableData::Representative > &rPages) const |
void | PaintPageCount (OutputDevice &rDevice, const sal_Int32 nSelectionCount, const Size &rPreviewSize, const Point &rFirstPageOffset) const |
void | Create (const ::std::vector< controller::TransferableData::Representative > &rPages, const sal_Int32 nSelectionCount) |
Setup the insertion indicator by creating the icon. More... | |
Private Attributes | |
SlideSorter & | mrSlideSorter |
bool | mbIsVisible |
SharedILayerInvalidator | mpLayerInvalidator |
Point | maLocation |
BitmapEx | maIcon |
std::unique_ptr< FramePainter > | mpShadowPainter |
The insertion indicator is painted as a vertical or horizontal bar in the space between slides.
Definition at line 42 of file SlsInsertionIndicatorOverlay.hxx.
sd::slidesorter::view::InsertionIndicatorOverlay::InsertionIndicatorOverlay | ( | SlideSorter & | rSlideSorter | ) |
Definition at line 64 of file SlsInsertionIndicatorOverlay.cxx.
|
overridevirtual |
Definition at line 72 of file SlsInsertionIndicatorOverlay.cxx.
References Hide(), and suppress_fun_call_w_exception.
|
private |
Setup the insertion indicator by creating the icon.
It consists of scaled down previews of some of the selected pages.
Definition at line 103 of file SlsInsertionIndicatorOverlay.cxx.
References sd::slidesorter::view::Theme::Color_PreviewBorder, sd::slidesorter::SlideSorter::GetContentWindow(), sd::slidesorter::view::SlideSorterView::GetLayouter(), sd::slidesorter::view::Layouter::GetPageObjectLayouter(), sd::slidesorter::SlideSorter::GetTheme(), sd::slidesorter::SlideSorter::GetView(), sd::slidesorter::view::gnShadowBorder, Size::Height(), maIcon, mrSlideSorter, nCount, PaintPageCount(), PaintRepresentatives(), BitmapEx::Scale(), and Size::Width().
void sd::slidesorter::view::InsertionIndicatorOverlay::Create | ( | const SdTransferable * | pTransferable | ) |
Definition at line 78 of file SlsInsertionIndicatorOverlay.cxx.
References Create(), tools::SvRef< typename T >::get(), sd::DrawDocShell::GetDoc(), SdTransferable::GetDocShell(), sd::slidesorter::controller::TransferableData::GetFromTransferable(), SdTransferable::GetPageBookmarks(), SdDrawDocument::GetSdPageCount(), SdTransferable::HasPageBookmarks(), pData, and Standard.
Referenced by Create().
tools::Rectangle sd::slidesorter::view::InsertionIndicatorOverlay::GetBoundingBox | ( | ) | const |
Definition at line 346 of file SlsInsertionIndicatorOverlay.cxx.
References BitmapEx::GetSizePixel(), maIcon, and maLocation.
Referenced by Hide(), SetLayerInvalidator(), SetLocation(), and Show().
Size sd::slidesorter::view::InsertionIndicatorOverlay::GetSize | ( | ) | const |
Definition at line 351 of file SlsInsertionIndicatorOverlay.cxx.
References BitmapEx::GetSizePixel(), Size::Height(), maIcon, and Size::Width().
void sd::slidesorter::view::InsertionIndicatorOverlay::Hide | ( | ) |
Definition at line 329 of file SlsInsertionIndicatorOverlay.cxx.
References GetBoundingBox(), sd::slidesorter::view::SlideSorterView::GetLayeredDevice(), sd::slidesorter::SlideSorter::GetView(), sd::slidesorter::view::gnLayerIndex, mbIsVisible, mpLayerInvalidator, and mrSlideSorter.
Referenced by ~InsertionIndicatorOverlay().
|
inline |
Definition at line 66 of file SlsInsertionIndicatorOverlay.hxx.
References mbIsVisible.
Referenced by Paint(), and SetLocation().
|
overridevirtual |
Implements sd::slidesorter::view::ILayerPainter.
Definition at line 294 of file SlsInsertionIndicatorOverlay.cxx.
References OutputDevice::DrawImage(), IsVisible(), maIcon, and maLocation.
|
private |
Definition at line 231 of file SlsInsertionIndicatorOverlay.cxx.
References sd::slidesorter::view::Theme::Color_PageCountFontColor, sd::slidesorter::view::Theme::Color_Selection, OutputDevice::DrawRect(), OutputDevice::DrawText(), sd::slidesorter::view::Theme::Font_PageCount, sd::slidesorter::view::Theme::GetFont(), tools::Rectangle::GetHeight(), tools::Rectangle::GetSize(), OutputDevice::GetTextBoundRect(), sd::slidesorter::SlideSorter::GetTheme(), tools::Rectangle::GetWidth(), Size::Height(), mrSlideSorter, nBorder, OutputDevice::SetFillColor(), OutputDevice::SetFont(), OutputDevice::SetLineColor(), OutputDevice::SetTextColor(), tools::Rectangle::TopLeft(), and Size::Width().
Referenced by Create().
|
private |
Definition at line 144 of file SlsInsertionIndicatorOverlay.cxx.
References Point::AdjustX(), Point::AdjustY(), tools::Rectangle::Bottom(), COL_BLACK(), COL_GRAY(), OutputDevice::DrawBitmapEx(), OutputDevice::DrawRect(), OutputDevice::DrawTransparent(), OutputDevice::GetClipRegion(), BitmapEx::GetSizePixel(), sd::slidesorter::SlideSorter::GetTheme(), sd::slidesorter::view::gnShadowBorder, Size::Height(), sd::slidesorter::view::Theme::Icon_HideSlideOverlay, OutputDevice::IntersectClipRegion(), tools::Rectangle::Left(), o3tl::make_unsigned(), mpShadowPainter, mrSlideSorter, nIndex, tools::Rectangle::Right(), BitmapEx::Scale(), OutputDevice::SetClipRegion(), OutputDevice::SetFillColor(), OutputDevice::SetLineColor(), tools::Rectangle::Top(), Size::Width(), Point::X(), and Point::Y().
Referenced by Create().
|
overridevirtual |
Implements sd::slidesorter::view::ILayerPainter.
Definition at line 304 of file SlsInsertionIndicatorOverlay.cxx.
References GetBoundingBox(), mbIsVisible, and mpLayerInvalidator.
void sd::slidesorter::view::InsertionIndicatorOverlay::SetLocation | ( | const Point & | rPosition | ) |
Given a position in model coordinates this method calculates the insertion marker both as an index in the document and as a location used for drawing the insertion indicator.
Definition at line 274 of file SlsInsertionIndicatorOverlay.cxx.
References GetBoundingBox(), BitmapEx::GetSizePixel(), Size::Height(), IsVisible(), maIcon, maLocation, mpLayerInvalidator, and Size::Width().
void sd::slidesorter::view::InsertionIndicatorOverlay::Show | ( | ) |
Definition at line 312 of file SlsInsertionIndicatorOverlay.cxx.
References GetBoundingBox(), sd::slidesorter::view::SlideSorterView::GetLayeredDevice(), sd::slidesorter::SlideSorter::GetView(), sd::slidesorter::view::gnLayerIndex, mbIsVisible, mpLayerInvalidator, and mrSlideSorter.
|
private |
Definition at line 78 of file SlsInsertionIndicatorOverlay.hxx.
Referenced by Create(), GetBoundingBox(), GetSize(), Paint(), and SetLocation().
|
private |
Definition at line 77 of file SlsInsertionIndicatorOverlay.hxx.
Referenced by GetBoundingBox(), Paint(), and SetLocation().
|
private |
Definition at line 74 of file SlsInsertionIndicatorOverlay.hxx.
Referenced by Hide(), IsVisible(), SetLayerInvalidator(), and Show().
|
private |
Definition at line 75 of file SlsInsertionIndicatorOverlay.hxx.
Referenced by Hide(), SetLayerInvalidator(), SetLocation(), and Show().
|
private |
Definition at line 79 of file SlsInsertionIndicatorOverlay.hxx.
Referenced by PaintRepresentatives().
|
private |
Definition at line 73 of file SlsInsertionIndicatorOverlay.hxx.
Referenced by Create(), Hide(), PaintPageCount(), PaintRepresentatives(), and Show().