1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef SD_PRESENTER_PRESENTER_HELPER_HXX 25 #define SD_PRESENTER_PRESENTER_HELPER_HXX 26 27 #include <com/sun/star/drawing/XPresenterHelper.hpp> 28 #include <com/sun/star/lang/XInitialization.hpp> 29 #include <com/sun/star/uno/XComponentContext.hpp> 30 #include <cppuhelper/basemutex.hxx> 31 #include <cppuhelper/compbase2.hxx> 32 #include <svtools/filter.hxx> 33 #include <boost/noncopyable.hpp> 34 #include <boost/scoped_ptr.hpp> 35 36 namespace css = ::com::sun::star; 37 38 namespace sd { namespace presenter { 39 40 namespace { 41 typedef ::cppu::WeakComponentImplHelper2< 42 css::lang::XInitialization, 43 css::drawing::XPresenterHelper 44 > PresenterHelperInterfaceBase; 45 } 46 47 /** Implementation of the XPresenterHelper interface: functionality that can 48 not be implemented in an extension. 49 */ 50 class PresenterHelper 51 : private ::boost::noncopyable, 52 private ::cppu::BaseMutex, 53 public PresenterHelperInterfaceBase 54 { 55 public: 56 PresenterHelper (const css::uno::Reference<css::uno::XComponentContext>& rxContext); 57 virtual ~PresenterHelper (void); 58 59 // XInitialize 60 61 virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments); 62 63 64 // XPresenterHelper 65 66 virtual css::uno::Reference<css::awt::XWindow> SAL_CALL createWindow ( 67 const css::uno::Reference<css::awt::XWindow>& rxParentWindow, 68 sal_Bool bCreateSystemChildWindow, 69 sal_Bool bInitiallyVisible, 70 sal_Bool bEnableChildTransparentMode, 71 sal_Bool bEnableParentClip); 72 73 virtual css::uno::Reference<css::rendering::XCanvas> SAL_CALL createSharedCanvas ( 74 const css::uno::Reference<css::rendering::XSpriteCanvas>& rxUpdateCanvas, 75 const css::uno::Reference<css::awt::XWindow>& rxUpdateWindow, 76 const css::uno::Reference<css::rendering::XCanvas>& rxSharedCanvas, 77 const css::uno::Reference<css::awt::XWindow>& rxSharedWindow, 78 const css::uno::Reference<css::awt::XWindow>& rxWindow); 79 80 virtual css::uno::Reference<css::rendering::XCanvas> SAL_CALL createCanvas ( 81 const css::uno::Reference<css::awt::XWindow>& rxWindow, 82 sal_Int16 nRequestedCanvasFeatures, 83 const ::rtl::OUString& rsOptionalCanvasServiceName); 84 85 virtual void SAL_CALL toTop ( 86 const css::uno::Reference<css::awt::XWindow>& rxWindow); 87 88 virtual css::uno::Reference<css::rendering::XBitmap> SAL_CALL loadBitmap ( 89 const ::rtl::OUString& rsURL, 90 const css::uno::Reference<css::rendering::XCanvas>& rxCanvas); 91 92 virtual void SAL_CALL captureMouse (const css::uno::Reference<css::awt::XWindow>& rxWindow); 93 94 virtual void SAL_CALL releaseMouse (const css::uno::Reference<css::awt::XWindow>& rxWindow); 95 96 virtual css::awt::Rectangle SAL_CALL getWindowExtentsRelative ( 97 const css::uno::Reference<css::awt::XWindow>& rxChildWindow, 98 const css::uno::Reference<css::awt::XWindow>& rxParentWindow); 99 100 private: 101 css::uno::Reference<css::uno::XComponentContext> mxComponentContext; 102 ::boost::scoped_ptr<GraphicFilter> mpGraphicFilter; 103 }; 104 105 } } // end of namespace ::sd::presenter 106 107 #endif 108