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 .
20 #ifndef INCLUDED_SD_SOURCE_UI_FRAMEWORK_MODULE_TOOLBARMODULE_HXX
21 #define INCLUDED_SD_SOURCE_UI_FRAMEWORK_MODULE_TOOLBARMODULE_HXX
23 #include "ToolBarManager.hxx"
24 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
25 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
26 #include <com/sun/star/drawing/framework/XTabBar.hpp>
27 #include <com/sun/star/frame/XController.hpp>
28 #include <osl/mutex.hxx>
29 #include <cppuhelper/basemutex.hxx>
30 #include <cppuhelper/compbase1.hxx>
31 #include <boost/scoped_ptr.hpp>
37 namespace sd
{ namespace framework
{
40 typedef ::cppu::WeakComponentImplHelper1
<
41 css::drawing::framework::XConfigurationChangeListener
42 > ToolBarModuleInterfaceBase
;
45 /** This module is responsible for locking the ToolBarManager during
46 configuration updates and for triggering ToolBarManager updates.
49 : private ::cppu::BaseMutex
,
50 public ToolBarModuleInterfaceBase
53 /** Create a new module.
55 This is the access point to the drawing framework.
58 const css::uno::Reference
<css::frame::XController
>& rxController
);
59 virtual ~ToolBarModule();
61 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
63 // XConfigurationChangeListener
65 virtual void SAL_CALL
notifyConfigurationChange (
66 const css::drawing::framework::ConfigurationChangeEvent
& rEvent
)
67 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
71 virtual void SAL_CALL
disposing (
72 const css::lang::EventObject
& rEvent
)
73 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 css::drawing::framework::XConfigurationController
> mxConfigurationController
;
78 ViewShellBase
* mpBase
;
79 ::boost::scoped_ptr
<ToolBarManager::UpdateLock
> mpToolBarManagerLock
;
80 bool mbMainViewSwitchUpdatePending
;
82 void HandleUpdateStart();
83 void HandleUpdateEnd();
86 } } // end of namespace sd::framework
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */