LibreOffice Module sd (master) 1
|
#include <SlsPageObjectPainter.hxx>
Public Member Functions | |
PageObjectPainter (const SlideSorter &rSlideSorter) | |
~PageObjectPainter () | |
void | PaintPageObject (OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) |
void | SetTheme (const std::shared_ptr< view::Theme > &rpTheme) |
Called when the theme changes, either because it is replaced with another or because the system colors have changed. More... | |
BitmapEx | GetPreviewBitmap (const model::SharedPageDescriptor &rpDescriptor, const OutputDevice *pReferenceDevice) const |
Return a preview bitmap for the given page descriptor. More... | |
Private Member Functions | |
void | PaintBackground (PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) const |
void | PaintPreview (PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) const |
void | PaintPageNumber (PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) const |
void | PaintBorder (OutputDevice &rDevice, const Theme::GradientColorType eColorType, const ::tools::Rectangle &rBox) const |
void | PaintBackgroundDetail (PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) const |
bool | UpdatePageObjectLayouter () |
Update the local pointer to the page object layouter to the one owned by the general layouter. More... | |
Static Private Member Functions | |
static void | PaintTransitionEffect (PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) |
static void | PaintCustomAnimationEffect (PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) |
static BitmapEx | CreateMarkedPreview (const Size &rSize, const BitmapEx &rPreview, const BitmapEx &rOverlay, const OutputDevice *pReferenceDevice) |
Private Attributes | |
const Layouter & | mrLayouter |
std::shared_ptr< cache::PageCache > | mpCache |
std::shared_ptr< view::Theme > | mpTheme |
std::shared_ptr< vcl::Font > | mpPageNumberFont |
std::unique_ptr< FramePainter > | mpShadowPainter |
std::unique_ptr< FramePainter > | mpFocusBorderPainter |
Definition at line 35 of file SlsPageObjectPainter.hxx.
sd::slidesorter::view::PageObjectPainter::PageObjectPainter | ( | const SlideSorter & | rSlideSorter | ) |
Definition at line 43 of file SlsPageObjectPainter.cxx.
References sd::slidesorter::view::Theme::Color_Selection, GetFont(), Color::HSBtoRGB(), mpFocusBorderPainter, mpTheme, and Color::RGBtoHSB().
sd::slidesorter::view::PageObjectPainter::~PageObjectPainter | ( | ) |
Definition at line 61 of file SlsPageObjectPainter.cxx.
|
staticprivate |
Definition at line 154 of file SlsPageObjectPainter.cxx.
References ScopedVclPtr< class reference_type >::disposeAndReset(), BitmapEx::GetSizePixel(), Size::Height(), and Size::Width().
Referenced by GetPreviewBitmap().
BitmapEx sd::slidesorter::view::PageObjectPainter::GetPreviewBitmap | ( | const model::SharedPageDescriptor & | rpDescriptor, |
const OutputDevice * | pReferenceDevice | ||
) | const |
Return a preview bitmap for the given page descriptor.
When the page is excluded from the show then the preview is marked accordingly. @rpDescriptor Defines the page for which to return the preview. @pReferenceDevice When not <NULL> then this reference device is used to created a compatible bitmap.
Definition at line 181 of file SlsPageObjectPainter.cxx.
References CreateMarkedPreview(), sd::slidesorter::view::PageObjectLayouter::GetBoundingBox(), sd::slidesorter::view::Layouter::GetPageObjectLayouter(), BitmapEx::GetSizePixel(), sd::slidesorter::view::Theme::Icon_HideSlideOverlay, BitmapEx::IsEmpty(), sd::slidesorter::view::PageObjectLayouter::ModelCoordinateSystem, mpCache, mpTheme, mrLayouter, sd::slidesorter::view::PageObjectLayouter::Preview, and sd::slidesorter::model::PageDescriptor::ST_Excluded.
Referenced by PaintPreview().
|
private |
Definition at line 106 of file SlsPageObjectPainter.cxx.
References OutputDevice::DrawRect(), sd::slidesorter::view::PageObjectLayouter::GetBoundingBox(), SdrPage::GetPageBackgroundColor(), sd::slidesorter::view::PageObjectLayouter::ModelCoordinateSystem, PaintBackgroundDetail(), sd::slidesorter::view::PageObjectLayouter::Preview, OutputDevice::SetFillColor(), and OutputDevice::SetLineColor().
Referenced by PaintPageObject().
|
private |
Definition at line 307 of file SlsPageObjectPainter.cxx.
References sd::slidesorter::view::Theme::Color_Background, OutputDevice::DrawGradient(), OutputDevice::DrawRect(), sd::slidesorter::view::Theme::Fill1, sd::slidesorter::view::Theme::Fill2, Focused, sd::slidesorter::view::PageObjectLayouter::FocusIndicator, sd::slidesorter::view::PageObjectLayouter::GetBoundingBox(), sd::slidesorter::view::Theme::Gradient_FocusedPage, sd::slidesorter::view::Theme::Gradient_MouseOverPage, sd::slidesorter::view::Theme::Gradient_MouseOverSelected, sd::slidesorter::view::Theme::Gradient_MouseOverSelectedAndFocusedPage, sd::slidesorter::view::Theme::Gradient_NormalPage, sd::slidesorter::view::Theme::Gradient_SelectedAndFocusedPage, sd::slidesorter::view::Theme::Gradient_SelectedPage, sd::slidesorter::view::PageObjectLayouter::ModelCoordinateSystem, mpFocusBorderPainter, mpShadowPainter, mpTheme, None, sd::slidesorter::view::PageObjectLayouter::PageObject, PaintBorder(), sd::slidesorter::view::PageObjectLayouter::Preview, Selected, OutputDevice::SetFillColor(), OutputDevice::SetLineColor(), sd::slidesorter::model::PageDescriptor::ST_Focused, sd::slidesorter::model::PageDescriptor::ST_MouseOver, and sd::slidesorter::model::PageDescriptor::ST_Selected.
Referenced by PaintBackground().
|
private |
Definition at line 412 of file SlsPageObjectPainter.cxx.
References sd::slidesorter::view::Theme::Border1, sd::slidesorter::view::Theme::Border2, OutputDevice::DrawLine(), mpTheme, nBorderWidth, nIndex, OutputDevice::SetFillColor(), and OutputDevice::SetLineColor().
Referenced by PaintBackgroundDetail().
|
staticprivate |
Definition at line 286 of file SlsPageObjectPainter.cxx.
References sd::slidesorter::view::PageObjectLayouter::CustomAnimationEffectIndicator, OutputDevice::DrawBitmapEx(), Image::GetBitmapEx(), sd::slidesorter::view::PageObjectLayouter::GetBoundingBox(), sd::slidesorter::view::PageObjectLayouter::GetCustomAnimationEffectIcon(), SdPage::getMainSequence(), and sd::slidesorter::view::PageObjectLayouter::ModelCoordinateSystem.
Referenced by PaintPageObject().
|
private |
Definition at line 214 of file SlsPageObjectPainter.cxx.
References abs(), sd::slidesorter::view::Theme::Color_Background, sd::slidesorter::view::Theme::Color_PageNumberBrightBackground, sd::slidesorter::view::Theme::Color_PageNumberDarkBackground, sd::slidesorter::view::Theme::Color_PageNumberDefault, sd::slidesorter::view::Theme::Color_PageNumberHighContrast, sd::slidesorter::view::Theme::Color_PageNumberHover, OutputDevice::DrawText(), sd::slidesorter::view::PageObjectLayouter::GetBoundingBox(), Color::GetLuminance(), sd::slidesorter::view::PageObjectLayouter::ModelCoordinateSystem, mpPageNumberFont, mpTheme, sd::slidesorter::view::PageObjectLayouter::PageNumber, OutputDevice::SetFont(), OutputDevice::SetTextColor(), sd::slidesorter::model::PageDescriptor::ST_MouseOver, and sd::slidesorter::model::PageDescriptor::ST_Selected.
Referenced by PaintPageObject().
void sd::slidesorter::view::PageObjectPainter::PaintPageObject | ( | OutputDevice & | rDevice, |
const model::SharedPageDescriptor & | rpDescriptor | ||
) |
Definition at line 65 of file SlsPageObjectPainter.cxx.
References OutputDevice::GetAntialiasing(), sd::slidesorter::view::Layouter::GetPageObjectLayouter(), mrLayouter, PaintBackground(), PaintCustomAnimationEffect(), PaintPageNumber(), PaintPreview(), PaintTransitionEffect(), OutputDevice::SetAntialiasing(), and UpdatePageObjectLayouter().
|
private |
Definition at line 128 of file SlsPageObjectPainter.cxx.
References OutputDevice::DrawBitmapEx(), sd::slidesorter::view::PageObjectLayouter::GetBoundingBox(), GetPreviewBitmap(), BitmapEx::GetSizePixel(), BitmapEx::IsEmpty(), sd::slidesorter::view::PageObjectLayouter::ModelCoordinateSystem, mpCache, and sd::slidesorter::view::PageObjectLayouter::Preview.
Referenced by PaintPageObject().
|
staticprivate |
Definition at line 267 of file SlsPageObjectPainter.cxx.
References OutputDevice::DrawBitmapEx(), Image::GetBitmapEx(), sd::slidesorter::view::PageObjectLayouter::GetBoundingBox(), sd::slidesorter::view::PageObjectLayouter::GetTransitionEffectIcon(), SdPage::getTransitionType(), sd::slidesorter::view::PageObjectLayouter::ModelCoordinateSystem, and sd::slidesorter::view::PageObjectLayouter::TransitionEffectIndicator.
Referenced by PaintPageObject().
void sd::slidesorter::view::PageObjectPainter::SetTheme | ( | const std::shared_ptr< view::Theme > & | rpTheme | ) |
Called when the theme changes, either because it is replaced with another or because the system colors have changed.
So, even when the given theme is the same object as the one already in use by this painter everything that depends on the theme is updated.
Definition at line 101 of file SlsPageObjectPainter.cxx.
References mpTheme.
|
private |
Update the local pointer to the page object layouter to the one owned by the general layouter.
Return <TRUE> when after the call we have a valid page object layouter.
Definition at line 87 of file SlsPageObjectPainter.cxx.
References sd::slidesorter::view::Layouter::GetPageObjectLayouter(), and mrLayouter.
Referenced by PaintPageObject().
|
private |
Definition at line 69 of file SlsPageObjectPainter.hxx.
Referenced by GetPreviewBitmap(), and PaintPreview().
|
private |
Definition at line 73 of file SlsPageObjectPainter.hxx.
Referenced by PageObjectPainter(), and PaintBackgroundDetail().
|
private |
Definition at line 71 of file SlsPageObjectPainter.hxx.
Referenced by PaintPageNumber().
|
private |
Definition at line 72 of file SlsPageObjectPainter.hxx.
Referenced by PaintBackgroundDetail().
|
private |
Definition at line 70 of file SlsPageObjectPainter.hxx.
Referenced by GetPreviewBitmap(), PageObjectPainter(), PaintBackgroundDetail(), PaintBorder(), PaintPageNumber(), and SetTheme().
|
private |
Definition at line 68 of file SlsPageObjectPainter.hxx.
Referenced by GetPreviewBitmap(), PaintPageObject(), and UpdatePageObjectLayouter().