LibreOffice Module sd (master) 1
PresenterFrameworkObserver.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#ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERFRAMEWORKOBSERVER_HXX
21#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERFRAMEWORKOBSERVER_HXX
22
23#include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
24#include <com/sun/star/drawing/framework/XConfigurationController.hpp>
27
28#include <functional>
29
30namespace sdext::presenter {
31
32typedef ::cppu::WeakComponentImplHelper <
33 css::drawing::framework::XConfigurationChangeListener
35
40 : private ::cppu::BaseMutex,
42{
43public:
44 typedef ::std::function<void (bool)> Action;
45
48
49 static void RunOnUpdateEnd (
50 const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController,
51 const Action& rAction);
52
53 virtual void SAL_CALL disposing() override;
54 virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) override;
55 virtual void SAL_CALL notifyConfigurationChange (
56 const css::drawing::framework::ConfigurationChangeEvent& rEvent) override;
57
58private:
59 css::uno::Reference<css::drawing::framework::XConfigurationController> mxConfigurationController;
61
70 css::uno::Reference<css::drawing::framework::XConfigurationController> xController,
71 const Action& rAction);
72 virtual ~PresenterFrameworkObserver() override;
73
74 void Shutdown();
75};
76
77} // end of namespace ::sdext::presenter
78
79#endif
80
81/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Watch the drawing framework for changes and run callbacks when a certain change takes place.
virtual void SAL_CALL notifyConfigurationChange(const css::drawing::framework::ConfigurationChangeEvent &rEvent) override
static void RunOnUpdateEnd(const css::uno::Reference< css::drawing::framework::XConfigurationController > &rxController, const Action &rAction)
PresenterFrameworkObserver & operator=(const PresenterFrameworkObserver &)=delete
css::uno::Reference< css::drawing::framework::XConfigurationController > mxConfigurationController
virtual void SAL_CALL disposing(const css::lang::EventObject &rEvent) override
PresenterFrameworkObserver(const PresenterFrameworkObserver &)=delete
::cppu::WeakComponentImplHelper< css::drawing::framework::XConfigurationChangeListener > PresenterFrameworkObserverInterfaceBase