bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / framework / factories / BasicPaneFactory.hxx
blobf5700d706f249d30e80c11bce716aa5b785fb9b5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_FACTORIES_BASICPANEFACTORY_HXX
21 #define INCLUDED_SD_SOURCE_UI_FRAMEWORK_FACTORIES_BASICPANEFACTORY_HXX
23 #include "MutexOwner.hxx"
25 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
26 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
27 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
28 #include <com/sun/star/frame/XController.hpp>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <osl/mutex.hxx>
32 #include <cppuhelper/basemutex.hxx>
33 #include <cppuhelper/compbase3.hxx>
35 #include <boost/scoped_ptr.hpp>
36 #include <boost/shared_ptr.hpp>
38 namespace {
40 typedef ::cppu::WeakComponentImplHelper3 <
41 css::lang::XInitialization,
42 css::drawing::framework::XResourceFactory,
43 css::drawing::framework::XConfigurationChangeListener
44 > BasicPaneFactoryInterfaceBase;
46 } // end of anonymous namespace.
48 namespace sd {
50 class ViewShellBase;
53 namespace sd { namespace framework {
55 /** This factory provides the frequently used standard panes
56 private:resource/pane/CenterPane
57 private:resource/pane/FullScreenPane
58 private:resource/pane/LeftImpressPane
59 private:resource/pane/LeftDrawPane
60 There are two left panes because this is (seems to be) the only way to
61 show different titles for the left pane in Draw and Impress.
63 class BasicPaneFactory
64 : private ::cppu::BaseMutex,
65 public BasicPaneFactoryInterfaceBase
67 public:
68 BasicPaneFactory (
69 const css::uno::Reference<css::uno::XComponentContext>& rxContext);
70 virtual ~BasicPaneFactory();
72 virtual void SAL_CALL disposing() SAL_OVERRIDE;
74 // XInitialization
76 virtual void SAL_CALL initialize(
77 const css::uno::Sequence<css::uno::Any>& aArguments)
78 throw (css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 // XResourceFactory
82 virtual css::uno::Reference<css::drawing::framework::XResource>
83 SAL_CALL createResource (
84 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId)
85 throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, std::exception) SAL_OVERRIDE;
87 virtual void SAL_CALL
88 releaseResource (
89 const css::uno::Reference<css::drawing::framework::XResource>& rxPane)
90 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
92 // XConfigurationChangeListener
94 virtual void SAL_CALL notifyConfigurationChange (
95 const css::drawing::framework::ConfigurationChangeEvent& rEvent)
96 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
98 // lang::XEventListener
100 virtual void SAL_CALL disposing (
101 const css::lang::EventObject& rEventObject)
102 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 private:
105 css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
106 css::uno::WeakReference<css::drawing::framework::XConfigurationController>
107 mxConfigurationControllerWeak;
108 css::uno::WeakReference<css::frame::XController> mxControllerWeak;
109 ViewShellBase* mpViewShellBase;
110 class PaneDescriptor;
111 class PaneContainer;
112 ::boost::scoped_ptr<PaneContainer> mpPaneContainer;
114 /** Create a new instance of FrameWindowPane.
115 @param rPaneId
116 There is only one frame window so this id is just checked to
117 have the correct value.
119 css::uno::Reference<css::drawing::framework::XResource>
120 CreateFrameWindowPane (
121 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
123 /** Create a new pane that represents the center pane in full screen
124 mode.
126 css::uno::Reference<css::drawing::framework::XResource>
127 CreateFullScreenPane (
128 const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
129 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
131 /** Create a new instance of ChildWindowPane.
132 @param rPaneId
133 The ResourceURL member defines which side pane to create.
135 css::uno::Reference<css::drawing::framework::XResource>
136 CreateChildWindowPane (
137 const css::uno::Reference<
138 css::drawing::framework::XResourceId>& rxPaneId,
139 const PaneDescriptor& rDescriptor);
141 void ThrowIfDisposed() const
142 throw (css::lang::DisposedException);
145 } } // end of namespace sd::framework
147 #endif
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */