Update ooo320-m1
[ooovba.git] / sd / source / ui / framework / factories / BasicPaneFactory.hxx
blob89d58a25279ee78d3a1d29dfabe381010c1c3421
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: BasicPaneFactory.hxx,v $
11 * $Revision: 1.3 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef SD_FRAMEWORK_BASIC_PANE_FACTORY_HXX
33 #define SD_FRAMEWORK_BASIC_PANE_FACTORY_HXX
35 #include "MutexOwner.hxx"
37 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
38 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
39 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
40 #include <com/sun/star/frame/XController.hpp>
41 #include <com/sun/star/lang/XInitialization.hpp>
42 #include <com/sun/star/uno/XComponentContext.hpp>
43 #include <osl/mutex.hxx>
44 #include <cppuhelper/basemutex.hxx>
45 #include <cppuhelper/compbase3.hxx>
46 #include "UpdateLockManager.hxx"
49 #include <boost/scoped_ptr.hpp>
50 #include <boost/shared_ptr.hpp>
52 namespace css = ::com::sun::star;
55 namespace {
57 typedef ::cppu::WeakComponentImplHelper3 <
58 css::lang::XInitialization,
59 css::drawing::framework::XResourceFactory,
60 css::drawing::framework::XConfigurationChangeListener
61 > BasicPaneFactoryInterfaceBase;
63 } // end of anonymous namespace.
66 namespace sd {
68 class ViewShellBase;
71 namespace sd { namespace framework {
73 /** This factory provides the frequently used standard panes
74 private:resource/pane/CenterPane
75 private:resource/pane/FullScreenPane
76 private:resource/pane/LeftImpressPane
77 private:resource/pane/LeftDrawPane
78 private:resource/pane/RightPane
79 There are two left panes because this is (seems to be) the only way to
80 show different titles for the left pane in Draw and Impress.
82 class BasicPaneFactory
83 : private ::cppu::BaseMutex,
84 public BasicPaneFactoryInterfaceBase
86 public:
87 BasicPaneFactory (
88 const css::uno::Reference<css::uno::XComponentContext>& rxContext);
89 virtual ~BasicPaneFactory (void);
91 virtual void SAL_CALL disposing (void);
94 // XInitialization
96 virtual void SAL_CALL initialize(
97 const css::uno::Sequence<css::uno::Any>& aArguments)
98 throw (css::uno::Exception, css::uno::RuntimeException);
101 // XResourceFactory
103 virtual css::uno::Reference<css::drawing::framework::XResource>
104 SAL_CALL createResource (
105 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId)
106 throw (css::uno::RuntimeException);
108 virtual void SAL_CALL
109 releaseResource (
110 const css::uno::Reference<css::drawing::framework::XResource>& rxPane)
111 throw (css::uno::RuntimeException);
114 // XConfigurationChangeListener
116 virtual void SAL_CALL notifyConfigurationChange (
117 const css::drawing::framework::ConfigurationChangeEvent& rEvent)
118 throw (css::uno::RuntimeException);
121 // lang::XEventListener
123 virtual void SAL_CALL disposing (
124 const css::lang::EventObject& rEventObject)
125 throw (css::uno::RuntimeException);
127 private:
128 css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
129 css::uno::WeakReference<css::drawing::framework::XConfigurationController>
130 mxConfigurationControllerWeak;
131 css::uno::WeakReference<css::frame::XController> mxControllerWeak;
132 ViewShellBase* mpViewShellBase;
133 class PaneDescriptor;
134 class PaneContainer;
135 ::boost::scoped_ptr<PaneContainer> mpPaneContainer;
136 bool mbFirstUpdateSeen;
137 ::boost::shared_ptr<UpdateLockManager> mpUpdateLockManager;
139 /** Create a new instance of FrameWindowPane.
140 @param rPaneId
141 There is only one frame window so this id is just checked to
142 have the correct value.
144 css::uno::Reference<css::drawing::framework::XResource>
145 CreateFrameWindowPane (
146 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
148 /** Create a new pane that represents the center pane in full screen
149 mode.
151 css::uno::Reference<css::drawing::framework::XResource>
152 CreateFullScreenPane (
153 const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
154 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
156 /** Create a new instance of ChildWindowPane.
157 @param rPaneId
158 The ResourceURL member defines which side pane to create.
160 css::uno::Reference<css::drawing::framework::XResource>
161 CreateChildWindowPane (
162 const css::uno::Reference<
163 css::drawing::framework::XResourceId>& rxPaneId,
164 const PaneDescriptor& rDescriptor);
166 /** Return <TRUE/> when the specified resource is bound to one of the
167 child windows.
169 bool IsBoundToChildWindow (
170 const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId) const;
172 void ThrowIfDisposed (void) const
173 throw (css::lang::DisposedException);
176 } } // end of namespace sd::framework
178 #endif