LibreOffice Module sd (master) 1
SlsPageObjectPainter.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
23#include <view/SlsTheme.hxx>
24#include <memory>
25
26namespace sd::slidesorter::cache { class PageCache; }
27namespace sd::slidesorter { class SlideSorter; }
28
29namespace sd::slidesorter::view {
30
31class Layouter;
32class PageObjectLayouter;
33class FramePainter;
34
36{
37public:
38 PageObjectPainter (const SlideSorter& rSlideSorter);
40
41 void PaintPageObject (
42 OutputDevice& rDevice,
43 const model::SharedPageDescriptor& rpDescriptor);
44
50 void SetTheme (const std::shared_ptr<view::Theme>& rpTheme);
51
64 const model::SharedPageDescriptor& rpDescriptor,
65 const OutputDevice* pReferenceDevice) const;
66
67private:
69 std::shared_ptr<cache::PageCache> mpCache;
70 std::shared_ptr<view::Theme> mpTheme;
71 std::shared_ptr<vcl::Font> mpPageNumberFont;
72 std::unique_ptr<FramePainter> mpShadowPainter;
73 std::unique_ptr<FramePainter> mpFocusBorderPainter;
74
75 void PaintBackground (
76 PageObjectLayouter *pPageObjectLayouter,
77 OutputDevice& rDevice,
78 const model::SharedPageDescriptor& rpDescriptor) const;
79 void PaintPreview (
80 PageObjectLayouter *pPageObjectLayouter,
81 OutputDevice& rDevice,
82 const model::SharedPageDescriptor& rpDescriptor) const;
83 void PaintPageNumber (
84 PageObjectLayouter *pPageObjectLayouter,
85 OutputDevice& rDevice,
86 const model::SharedPageDescriptor& rpDescriptor) const;
87 static void PaintTransitionEffect (
88 PageObjectLayouter *pPageObjectLayouter,
89 OutputDevice& rDevice,
90 const model::SharedPageDescriptor& rpDescriptor);
91 static void PaintCustomAnimationEffect (
92 PageObjectLayouter *pPageObjectLayouter,
93 OutputDevice& rDevice,
94 const model::SharedPageDescriptor& rpDescriptor);
95 void PaintBorder (
96 OutputDevice& rDevice,
97 const Theme::GradientColorType eColorType,
98 const ::tools::Rectangle& rBox) const;
100 PageObjectLayouter *pPageObjectLayouter,
101 OutputDevice& rDevice,
102 const model::SharedPageDescriptor& rpDescriptor) const;
103
105 const Size& rSize,
106 const BitmapEx& rPreview,
107 const BitmapEx& rOverlay,
108 const OutputDevice* pReferenceDevice);
109
115};
116
117} // end of namespace sd::slidesorter::view
118
119/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Show previews for all the slides in a document and allow the user to insert or delete slides and modi...
Definition: SlideSorter.hxx:62
Calculate the size and position of page objects displayed by a slide sorter.
Definition: SlsLayouter.hxx:60
In contrast to the Layouter that places page objects in the view, the PageObjectLayouter places the p...
bool UpdatePageObjectLayouter()
Update the local pointer to the page object layouter to the one owned by the general layouter.
void PaintPageNumber(PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) const
std::shared_ptr< cache::PageCache > mpCache
void PaintPageObject(OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor)
static BitmapEx CreateMarkedPreview(const Size &rSize, const BitmapEx &rPreview, const BitmapEx &rOverlay, const OutputDevice *pReferenceDevice)
std::shared_ptr< vcl::Font > mpPageNumberFont
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 color...
BitmapEx GetPreviewBitmap(const model::SharedPageDescriptor &rpDescriptor, const OutputDevice *pReferenceDevice) const
Return a preview bitmap for the given page descriptor.
static void PaintTransitionEffect(PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor)
void PaintPreview(PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) const
PageObjectPainter(const SlideSorter &rSlideSorter)
static void PaintCustomAnimationEffect(PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor)
void PaintBackgroundDetail(PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) const
std::unique_ptr< FramePainter > mpFocusBorderPainter
std::unique_ptr< FramePainter > mpShadowPainter
void PaintBackground(PageObjectLayouter *pPageObjectLayouter, OutputDevice &rDevice, const model::SharedPageDescriptor &rpDescriptor) const
void PaintBorder(OutputDevice &rDevice, const Theme::GradientColorType eColorType, const ::tools::Rectangle &rBox) const
std::shared_ptr< PageDescriptor > SharedPageDescriptor