LibreOffice Module sd (master) 1
SlsPageObjectLayouter.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 <tools/gen.hxx>
24#include <vcl/image.hxx>
25
26namespace vcl { class Font; }
27namespace sd { class Window; }
28
29namespace sd::slidesorter::view {
30
36{
37public:
48 const Size& rPageObjectWindowSize,
49 const Size& rPreviewModelSize,
50 sd::Window *pWindow,
51 const sal_Int32 nPageCount);
53
54 enum class Part {
55 // The focus indicator is painted outside the actual page object.
56 FocusIndicator,
57 // This is the outer bounding box that includes the preview, page
58 // number, title.
59 PageObject,
60 // Bounding box of the actual preview.
61 Preview,
62 // Bounding box of the page number.
64 // Indicator whether or not there is a slide transition associated
65 // with this slide.
66 TransitionEffectIndicator,
67 // Indicator whether or not there is a custom animation associated
68 // with this slide.
69 CustomAnimationEffectIndicator
70 };
80 };
81
102 const model::SharedPageDescriptor& rpPageDescriptor,
103 const Part ePart,
104 const CoordinateSystem eCoordinateSystem,
105 bool bIgnoreLocation = false);
106
109
112
115
116private:
118 const Point& rPageObjectLocation,
119 const Part ePart,
120 const CoordinateSystem eCoordinateSystem);
121
122private:
132 const std::shared_ptr<vcl::Font> mpPageNumberFont;
133
134 Size GetPageNumberAreaSize (const int nPageCount);
136 Size& rPageObjectSize,
137 const Size& rPreviewModelSize,
138 const sal_Int32 nPageNumberAreaWidth,
139 const sal_Int32 nFocusIndicatorWidth);
140};
141
142} // end of namespace ::sd::slidesorter::view
143
144/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
In contrast to the Layouter that places page objects in the view, the PageObjectLayouter places the p...
Size GetPreviewSize()
the size of the embedded preview: position independent, in window coordinate system
PageObjectLayouter(const Size &rPageObjectWindowSize, const Size &rPreviewModelSize, sd::Window *pWindow, const sal_Int32 nPageCount)
Create a new PageObjectLayouter object.
::tools::Rectangle CalculatePreviewBoundingBox(Size &rPageObjectSize, const Size &rPreviewModelSize, const sal_Int32 nPageNumberAreaWidth, const sal_Int32 nFocusIndicatorWidth)
::tools::Rectangle GetBoundingBox(const model::SharedPageDescriptor &rpPageDescriptor, const Part ePart, const CoordinateSystem eCoordinateSystem, bool bIgnoreLocation=false)
Return the bounding box of the page object or one of its graphical parts.
CoordinateSystem
Two coordinate systems are supported.
const std::shared_ptr< vcl::Font > mpPageNumberFont
Size GetGridMaxSize()
the maximum size of each tile, also position independent, in window coordinate system
std::shared_ptr< PageDescriptor > SharedPageDescriptor