1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
23 #include <comphelper/compbase.hxx>
24 #include <rtl/ref.hxx>
26 namespace com::sun::star::drawing::framework
28 class XConfigurationController
;
30 namespace com::sun::star::frame
41 namespace sd::framework
43 typedef comphelper::WeakComponentImplHelper
<css::drawing::framework::XConfigurationChangeListener
>
44 CenterViewFocusModuleInterfaceBase
;
46 /** This module waits for new views to be created for the center pane and
47 then moves the center view to the top most place on the shell stack. As
48 we are moving away from the shell stack this module may become obsolete
49 or has to be modified.
51 class CenterViewFocusModule final
: public CenterViewFocusModuleInterfaceBase
54 explicit CenterViewFocusModule(rtl::Reference
<sd::DrawController
> const& rxController
);
55 virtual ~CenterViewFocusModule() override
;
57 virtual void disposing(std::unique_lock
<std::mutex
>&) override
;
59 // XConfigurationChangeListener
61 virtual void SAL_CALL
notifyConfigurationChange(
62 const css::drawing::framework::ConfigurationChangeEvent
& rEvent
) override
;
66 virtual void SAL_CALL
disposing(const css::lang::EventObject
& rEvent
) override
;
69 class ViewShellContainer
;
72 css::uno::Reference
<css::drawing::framework::XConfigurationController
>
73 mxConfigurationController
;
74 ViewShellBase
* mpBase
;
75 /** This flag indicates whether in the last configuration change cycle a
76 new view has been created and thus the center view has to be moved
77 to the top of the shell stack.
79 bool mbNewViewCreated
;
81 /** At the end of an update of the current configuration this method
82 handles a new view in the center pane by moving the associated view
83 shell to the top of the shell stack.
86 const css::uno::Reference
<css::drawing::framework::XConfiguration
>& rxConfiguration
);
89 } // end of namespace sd::framework
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */