LibreOffice Module sd (master) 1
ToolBarModule.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 <ToolBarManager.hxx>
23#include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
25#include <o3tl/deleter.hxx>
26#include <rtl/ref.hxx>
27#include <memory>
28
29namespace com::sun::star::drawing::framework { class XConfigurationController; }
30namespace com::sun::star::frame { class XController; }
31
32namespace sd {
33class DrawController;
34class ViewShellBase;
35}
36
37namespace sd::framework {
38
40 css::drawing::framework::XConfigurationChangeListener
42
46class ToolBarModule final
48{
49public:
54 explicit ToolBarModule (
55 const rtl::Reference<sd::DrawController>& rxController);
56 virtual ~ToolBarModule() override;
57
58 virtual void disposing(std::unique_lock<std::mutex>&) override;
59
60 // XConfigurationChangeListener
61
62 virtual void SAL_CALL notifyConfigurationChange (
63 const css::drawing::framework::ConfigurationChangeEvent& rEvent) override;
64
65 // XEventListener
66
67 virtual void SAL_CALL disposing (
68 const css::lang::EventObject& rEvent) override;
69
70private:
71 css::uno::Reference<
72 css::drawing::framework::XConfigurationController> mxConfigurationController;
74 std::unique_ptr<ToolBarManager::UpdateLock, o3tl::default_delete<ToolBarManager::UpdateLock>> mpToolBarManagerLock;
76
77 void HandleUpdateStart();
78 void HandleUpdateEnd();
79};
80
81} // end of namespace sd::framework
82
83/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
This module is responsible for locking the ToolBarManager during configuration updates and for trigge...
virtual void disposing(std::unique_lock< std::mutex > &) override
virtual void SAL_CALL disposing(const css::lang::EventObject &rEvent) override
virtual ~ToolBarModule() override
std::unique_ptr< ToolBarManager::UpdateLock, o3tl::default_delete< ToolBarManager::UpdateLock > > mpToolBarManagerLock
ToolBarModule(const rtl::Reference< sd::DrawController > &rxController)
Create a new module.
virtual void SAL_CALL notifyConfigurationChange(const css::drawing::framework::ConfigurationChangeEvent &rEvent) override
css::uno::Reference< css::drawing::framework::XConfigurationController > mxConfigurationController
comphelper::WeakComponentImplHelper< css::drawing::framework::XConfigurationChangeListener > ToolBarModuleInterfaceBase