merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / framework / module / ViewTabBarModule.hxx
blob9e03b21a6f3568f520b320690c468b20c54158d2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ViewTabBarModule.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SD_FRAMEWORK_VIEW_TAB_BAR_MODULE_HXX
32 #define SD_FRAMEWORK_VIEW_TAB_BAR_MODULE_HXX
34 #include "MutexOwner.hxx"
36 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
37 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
38 #include <com/sun/star/drawing/framework/XTabBar.hpp>
39 #include <com/sun/star/frame/XController.hpp>
40 #include <osl/mutex.hxx>
41 #include <cppuhelper/compbase1.hxx>
43 namespace css = ::com::sun::star;
45 namespace {
47 typedef ::cppu::WeakComponentImplHelper1 <
48 ::css::drawing::framework::XConfigurationChangeListener
49 > ViewTabBarModuleInterfaceBase;
51 } // end of anonymous namespace.
56 namespace sd { namespace framework {
58 /** This module is responsible for showing the ViewTabBar above the view in
59 the center pane.
61 class ViewTabBarModule
62 : private sd::MutexOwner,
63 public ViewTabBarModuleInterfaceBase
65 public:
66 /** Create a new module that controlls the view tab bar above the view
67 in the specified pane.
68 @param rxController
69 This is the access point to the drawing framework.
70 @param rxViewTabBarId
71 This ResourceId specifies which tab bar is to be managed by the
72 new module.
74 ViewTabBarModule (
75 const css::uno::Reference<css::frame::XController>& rxController,
76 const css::uno::Reference<
77 css::drawing::framework::XResourceId>& rxViewTabBarId);
78 virtual ~ViewTabBarModule (void);
80 virtual void SAL_CALL disposing (void);
83 // XConfigurationChangeListener
85 virtual void SAL_CALL notifyConfigurationChange (
86 const css::drawing::framework::ConfigurationChangeEvent& rEvent)
87 throw (css::uno::RuntimeException);
89 // XEventListener
91 virtual void SAL_CALL disposing (
92 const css::lang::EventObject& rEvent)
93 throw (css::uno::RuntimeException);
95 private:
96 css::uno::Reference<
97 css::drawing::framework::XConfigurationController> mxConfigurationController;
98 css::uno::Reference<css::drawing::framework::XResourceId> mxViewTabBarId;
100 /** This is the place where the view tab bar is filled. Only missing
101 buttons are added, so it is safe to call this method multiple
102 times.
104 void UpdateViewTabBar (
105 const css::uno::Reference<css::drawing::framework::XTabBar>& rxTabBar);
108 } } // end of namespace sd::framework
110 #endif