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_VIEWTABBARMODULE_HXX
21 #define INCLUDED_SD_SOURCE_UI_FRAMEWORK_MODULE_VIEWTABBARMODULE_HXX
23 #include "MutexOwner.hxx"
25 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
26 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
27 #include <com/sun/star/drawing/framework/XTabBar.hpp>
28 #include <com/sun/star/frame/XController.hpp>
29 #include <osl/mutex.hxx>
30 #include <cppuhelper/compbase1.hxx>
34 typedef ::cppu::WeakComponentImplHelper1
<
35 css::drawing::framework::XConfigurationChangeListener
36 > ViewTabBarModuleInterfaceBase
;
38 } // end of anonymous namespace.
40 namespace sd
{ namespace framework
{
42 /** This module is responsible for showing the ViewTabBar above the view in
45 class ViewTabBarModule
46 : private sd::MutexOwner
,
47 public ViewTabBarModuleInterfaceBase
50 /** Create a new module that controls the view tab bar above the view
51 in the specified pane.
53 This is the access point to the drawing framework.
55 This ResourceId specifies which tab bar is to be managed by the
59 const css::uno::Reference
<css::frame::XController
>& rxController
,
60 const css::uno::Reference
<
61 css::drawing::framework::XResourceId
>& rxViewTabBarId
);
62 virtual ~ViewTabBarModule();
64 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
66 // XConfigurationChangeListener
68 virtual void SAL_CALL
notifyConfigurationChange (
69 const css::drawing::framework::ConfigurationChangeEvent
& rEvent
)
70 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
74 virtual void SAL_CALL
disposing (
75 const css::lang::EventObject
& rEvent
)
76 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
80 css::drawing::framework::XConfigurationController
> mxConfigurationController
;
81 css::uno::Reference
<css::drawing::framework::XResourceId
> mxViewTabBarId
;
83 /** This is the place where the view tab bar is filled. Only missing
84 buttons are added, so it is safe to call this method multiple
87 void UpdateViewTabBar (
88 const css::uno::Reference
<css::drawing::framework::XTabBar
>& rxTabBar
);
91 } } // end of namespace sd::framework
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */