LibreOffice Module sd (master) 1
SlsInsertionIndicatorOverlay.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
24
25#include <tools/gen.hxx>
26#include <vcl/bitmapex.hxx>
27#include <memory>
28#include <vector>
29
30class OutputDevice;
31class SdTransferable;
32
33namespace sd::slidesorter { class SlideSorter; }
34
35namespace sd::slidesorter::view {
36
37class FramePainter;
38
43 : public ILayerPainter,
44 public std::enable_shared_from_this<InsertionIndicatorOverlay>
45{
46public:
48 virtual ~InsertionIndicatorOverlay() override;
49
50 virtual void SetLayerInvalidator (const SharedILayerInvalidator& rpInvalidator) override;
51
52 void Create (const SdTransferable* pTransferable);
53
58 void SetLocation (const Point& rPosition);
59
60 Size GetSize() const;
61
62 virtual void Paint (
63 OutputDevice& rDevice,
64 const ::tools::Rectangle& rRepaintArea) override;
65
66 bool IsVisible() const { return mbIsVisible;}
67 void Hide();
68 void Show();
69
71
72private:
76 // Center of the insertion indicator.
79 std::unique_ptr<FramePainter> mpShadowPainter;
80
82 OutputDevice& rContent,
83 const Size& rPreviewSize,
84 const sal_Int32 nOffset,
85 const ::std::vector<controller::TransferableData::Representative>& rPages) const;
86 void PaintPageCount (
87 OutputDevice& rDevice,
88 const sal_Int32 nSelectionCount,
89 const Size& rPreviewSize,
90 const Point& rFirstPageOffset) const;
94 void Create (
95 const ::std::vector<controller::TransferableData::Representative>& rPages,
96 const sal_Int32 nSelectionCount);
97};
98
99} // end of namespace ::sd::slidesorter::view
100
101/* 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
The insertion indicator is painted as a vertical or horizontal bar in the space between slides.
Point PaintRepresentatives(OutputDevice &rContent, const Size &rPreviewSize, const sal_Int32 nOffset, const ::std::vector< controller::TransferableData::Representative > &rPages) const
virtual void SetLayerInvalidator(const SharedILayerInvalidator &rpInvalidator) override
void SetLocation(const Point &rPosition)
Given a position in model coordinates this method calculates the insertion marker both as an index in...
virtual void Paint(OutputDevice &rDevice, const ::tools::Rectangle &rRepaintArea) override
void PaintPageCount(OutputDevice &rDevice, const sal_Int32 nSelectionCount, const Size &rPreviewSize, const Point &rFirstPageOffset) const
std::shared_ptr< ILayerInvalidator > SharedILayerInvalidator