LibreOffice Module sd (master) 1
SlsCurrentSlideManager.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 <vcl/timer.hxx>
24#include <tools/link.hxx>
25
26class SdPage;
27
28namespace sd::slidesorter
29{
30class SlideSorter;
31}
32
34{
44{
45public:
49 CurrentSlideManager(SlideSorter& rSlideSorter);
50
52
56 void NotifyCurrentSlideChange(const sal_Int32 nSlideIndex);
57 void NotifyCurrentSlideChange(const SdPage* pPage);
58
67 void SwitchCurrentSlide(const sal_Int32 nSlideIndex);
69 const bool bUpdateSelection = false);
70
75
78 void PrepareModelChange();
79
82 void HandleModelChange();
83
84private:
92
96
100 void ReleaseCurrentSlide();
101
105 void AcquireCurrentSlide(const sal_Int32 nSlideIndex);
106
107 DECL_LINK(SwitchPageCallback, Timer*, void);
108};
109
110} // end of namespace ::sd::slidesorter::controller
111
112/* 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
void ReleaseCurrentSlide()
When switching from one slide to a new current slide then this method releases all ties to the old sl...
void AcquireCurrentSlide(const sal_Int32 nSlideIndex)
When switching from one slide to a new current slide then this method connects to the new current sli...
const model::SharedPageDescriptor & GetCurrentSlide() const
Return the page descriptor for the current slide.
void NotifyCurrentSlideChange(const sal_Int32 nSlideIndex)
Call this when the current page of the main view shell has been switched.
void HandleModelChange()
Modify inner state in reaction to a change of the SlideSorterModel.
void SetCurrentSlideAtXController(const model::SharedPageDescriptor &rpSlide)
void SwitchCurrentSlide(const model::SharedPageDescriptor &rpSlide, const bool bUpdateSelection=false)
void SetCurrentSlideAtTabControl(const model::SharedPageDescriptor &rpSlide)
void SetCurrentSlideAtViewShellBase(const model::SharedPageDescriptor &rpSlide)
Timer maSwitchPageDelayTimer
Timer to control the delay after which to ask XController/ViewShellBase to switch to another slide.
CurrentSlideManager(SlideSorter &rSlideSorter)
Create a new CurrentSlideManager object that manages the current slide for the given SlideSorter.
void PrepareModelChange()
Release all references to model data.
void SwitchCurrentSlide(const sal_Int32 nSlideIndex)
Call this method to switch the current page of the main view shell to the given slide.
DECL_LINK(SwitchPageCallback, Timer *, void)
std::shared_ptr< PageDescriptor > SharedPageDescriptor