LibreOffice Module sd (master) 1
SlideSorter.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#include <sddllapi.h>
25#include <memory>
26
27namespace vcl { class Window; }
28namespace com::sun::star::frame { class XController; }
29namespace rtl { template <class reference_type> class Reference; }
30
31namespace sd {
32class ViewShell;
33class ViewShellBase;
34class Window;
35class FuPoor;
36}
37
39
41 class SlideSorterView;
42 class Theme;
43}
44
47 class SlotManager;
48 class Properties;
49}
50
51namespace sd::slidesorter {
52
61class SlideSorter final
62{
64public:
66
68 SlideSorter(const SlideSorter&) = delete;
70
82 static std::shared_ptr<SlideSorter> CreateSlideSorter (
83 ViewShell& rViewShell,
84 sd::Window* pContentWindow,
85 ScrollAdaptor* pHorizontalScrollBar,
86 ScrollAdaptor* pVerticalScrollBar);
87
91
95
100
102
104
105 // Exported for unit test
107
113
116 css::uno::Reference<css::frame::XController>
117 GetXController() const;
118
124
129 void ArrangeGUIElements (
130 const Point& rOffset,
131 const Size& rSize);
132
133 void RelocateToWindow (vcl::Window* pWindow);
134
139 void SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction);
140
144 std::shared_ptr<controller::Properties> const & GetProperties() const;
145
148 std::shared_ptr<view::Theme> const & GetTheme() const;
149
150private:
158
164
165 std::unique_ptr<controller::SlideSorterController> mpSlideSorterController;
166 std::unique_ptr<model::SlideSorterModel> mpSlideSorterModel;
167 std::unique_ptr<view::SlideSorterView> mpSlideSorterView;
168 css::uno::WeakReference<css::frame::XController> mxControllerWeak;
174
178 std::shared_ptr<controller::Properties> mpProperties;
179 std::shared_ptr<view::Theme> mpTheme;
180
182 ViewShell& rViewShell,
183 sd::Window* pContentWindow,
184 ScrollAdaptor* pHorizontalScrollBar,
185 ScrollAdaptor* pVerticalScrollBar);
186
187 void Init();
194 void SetupControls();
195
199 void SetupListeners();
200
203 void ReleaseListeners();
204};
205
206} // end of namespace ::sd::slidesorter
207
208/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
Show previews for all the slides in a document and allow the user to insert or delete slides and modi...
Definition: SlideSorter.hxx:62
static std::shared_ptr< SlideSorter > CreateSlideSorter(ViewShell &rViewShell, sd::Window *pContentWindow, ScrollAdaptor *pHorizontalScrollBar, ScrollAdaptor *pVerticalScrollBar)
Create a new slide sorter that is strongly coupled to the given view shell.
Definition: SlideSorter.cxx:48
model::SlideSorterModel * CreateModel()
Create the model for the view shell.
const VclPtr< ScrollAdaptor > & GetHorizontalScrollBar() const
Return the control of the horizontal scroll bar.
Definition: SlideSorter.hxx:94
void SetupListeners()
This method is usually called exactly one time from the constructor.
std::shared_ptr< controller::Properties > const & GetProperties() const
Return a collection of properties that are used throughout the slide sorter.
VclPtr< ScrollAdaptor > mpHorizontalScrollBar
VclPtr< sd::Window > mpContentWindow
std::unique_ptr< model::SlideSorterModel > mpSlideSorterModel
css::uno::WeakReference< css::frame::XController > mxControllerWeak
SlideSorter(const SlideSorter &)=delete
Forbid copy construction and copy assignment.
SlideSorter & operator=(const SlideSorter &)=delete
css::uno::Reference< css::frame::XController > GetXController() const
Return the XController object of the main view.
std::unique_ptr< view::SlideSorterView > mpSlideSorterView
std::shared_ptr< controller::Properties > mpProperties
Some slide sorter wide properties that are used in different classes.
void SetupControls()
Create the controls for the slide sorter.
ViewShellBase * mpViewShellBase
std::shared_ptr< view::Theme > const & GetTheme() const
Return the active theme which gives access to colors and fonts.
void ArrangeGUIElements(const Point &rOffset, const Size &rSize)
Place and size the controls and windows.
void ReleaseListeners()
Release the listeners that have been installed in SetupListeners().
SD_DLLPUBLIC controller::SlideSorterController & GetController() const
ViewShell * GetViewShell() const
Return the view shell that was given at construction.
std::unique_ptr< controller::SlideSorterController > mpSlideSorterController
void RelocateToWindow(vcl::Window *pWindow)
const VclPtr< ScrollAdaptor > & GetVerticalScrollBar() const
Return the control of the vertical scroll bar.
Definition: SlideSorter.hxx:90
void SetCurrentFunction(const rtl::Reference< FuPoor > &rpFunction)
Set the current function at the view shell or, when it is not present, set it at the content window.
ViewShellBase * GetViewShellBase() const
Return the ViewShellBase object.
const VclPtr< sd::Window > & GetContentWindow() const
Return the content window.
Definition: SlideSorter.hxx:99
model::SlideSorterModel & GetModel() const
std::shared_ptr< view::Theme > mpTheme
view::SlideSorterView & GetView() const
void CreateModelViewController()
This virtual method makes it possible to create a specialization of the slide sorter view shell that ...
VclPtr< ScrollAdaptor > mpVerticalScrollBar
An extensible set of properties used throughout the slide sorter.
This manager takes over the work of handling slot calls from the controller of the slide sorter.
The model of the slide sorter gives access to the slides that are to be displayed in the slide sorter...
Collection of colors and styles that are used to paint the slide sorter view.
Definition: SlsTheme.hxx:39
Reference
#define SD_DLLPUBLIC
Definition: sddllapi.h:27