LibreOffice Module sd (master) 1
ViewShellImplementation.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
22#include "ViewShell.hxx"
23#include "ViewShellManager.hxx"
24#include "ToolBarManager.hxx"
25#include <o3tl/deleter.hxx>
26#include <memory>
27
28class SvxIMapDlg;
29
30namespace sd
31{
36{
37public:
45
50
58 {
59 public:
63 static std::shared_ptr<ToolBarManagerLock>
64 Create(const std::shared_ptr<ToolBarManager>& rpManager);
72 void Release(bool bForce = false);
73 DECL_DLLPRIVATE_LINK(TimeoutCallback, Timer*, void);
74
75 private:
76 ::std::unique_ptr<ToolBarManager::UpdateLock,
89 std::shared_ptr<ToolBarManagerLock> mpSelf;
90 ToolBarManagerLock(const std::shared_ptr<sd::ToolBarManager>& rpManager);
92
93 class Deleter;
94 friend class Deleter;
95 };
96 // The member is not a unique_ptr because it takes over its own life time
97 // control.
98 std::weak_ptr<ToolBarManagerLock> mpUpdateLockForMouse;
99
100 Implementation(ViewShell& rViewShell);
101 ~Implementation() COVERITY_NOEXCEPT_FALSE;
102
105 void ProcessModifyPageSlot(SfxRequest& rRequest, SdPage* pCurrentPage, PageKind ePageKind);
106
112 void AssignLayout(SfxRequest const& rRequest, PageKind ePageKind);
113
136
143
144private:
146};
147
148} // end of namespace sd
149
150/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
friend class UpdateLock
std::shared_ptr< ShellFactory< SfxShell > > SharedShellFactory
This update lock for the ToolBarManager exists in order to avoid problems with tool bars being displa...
static std::shared_ptr< ToolBarManagerLock > Create(const std::shared_ptr< ToolBarManager > &rpManager)
Create a new instance.
std::shared_ptr< ToolBarManagerLock > mpSelf
The shared_ptr to this allows the ToolBarManagerLock to control its own lifetime.
Timer maTimer
The timer is used both as a safe guard to unlock the update lock when Release() is not called explici...
void Release(bool bForce=false)
Release the lock.
ToolBarManagerLock(const std::shared_ptr< sd::ToolBarManager > &rpManager)
::std::unique_ptr< ToolBarManager::UpdateLock, o3tl::default_delete< ToolBarManager::UpdateLock > > mpLock
DECL_DLLPRIVATE_LINK(TimeoutCallback, Timer *, void)
This class contains (will contain) the implementation of methods that have not be accessible from the...
bool mbArrangeActive
Set to true while ViewShell::ArrangeGUIElements() is being executed.
ViewShellManager::SharedShellFactory mpSubShellFactory
Remember a link to the sub shell factory, so that it can be unregistered at the ViewShellManager when...
std::weak_ptr< ToolBarManagerLock > mpUpdateLockForMouse
SfxInterfaceId GetViewId() const
Determine the view id of the view shell.
void AssignLayout(SfxRequest const &rRequest, PageKind ePageKind)
Assign the given layout to the given page.
bool mbIsInitialized
Set to true when the ViewShell::Init() method has been called.
void ProcessModifyPageSlot(SfxRequest &rRequest, SdPage *pCurrentPage, PageKind ePageKind)
Process the SID_MODIFY slot.
static SvxIMapDlg * GetImageMapDialog()
Return a pointer to the image map dialog that is displayed in some child window.
~Implementation() COVERITY_NOEXCEPT_FALSE
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
PageKind
Definition: pres.hxx:45