1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PresenterHelper.hxx,v $
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_PRESENTER_PRESENTER_HELPER_HXX
33 #define SD_PRESENTER_PRESENTER_HELPER_HXX
35 #include <com/sun/star/drawing/XPresenterHelper.hpp>
36 #include <com/sun/star/lang/XInitialization.hpp>
37 #include <com/sun/star/uno/XComponentContext.hpp>
38 #include <cppuhelper/basemutex.hxx>
39 #include <cppuhelper/compbase2.hxx>
40 #include <svtools/filter.hxx>
41 #include <boost/noncopyable.hpp>
42 #include <boost/scoped_ptr.hpp>
44 namespace css
= ::com::sun::star
;
46 namespace sd
{ namespace presenter
{
49 typedef ::cppu::WeakComponentImplHelper2
<
50 css::lang::XInitialization
,
51 css::drawing::XPresenterHelper
52 > PresenterHelperInterfaceBase
;
55 /** Implementation of the XPresenterHelper interface: functionality that can
56 not be implemented in an extension.
59 : private ::boost::noncopyable
,
60 private ::cppu::BaseMutex
,
61 public PresenterHelperInterfaceBase
64 PresenterHelper (const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
);
65 virtual ~PresenterHelper (void);
69 virtual void SAL_CALL
initialize (const css::uno::Sequence
<css::uno::Any
>& rArguments
)
70 throw(css::uno::Exception
,css::uno::RuntimeException
);
75 virtual css::uno::Reference
<css::awt::XWindow
> SAL_CALL
createWindow (
76 const css::uno::Reference
<css::awt::XWindow
>& rxParentWindow
,
77 sal_Bool bCreateSystemChildWindow
,
78 sal_Bool bInitiallyVisible
,
79 sal_Bool bEnableChildTransparentMode
,
80 sal_Bool bEnableParentClip
)
81 throw (css::uno::RuntimeException
);
83 virtual css::uno::Reference
<css::rendering::XCanvas
> SAL_CALL
createSharedCanvas (
84 const css::uno::Reference
<css::rendering::XSpriteCanvas
>& rxUpdateCanvas
,
85 const css::uno::Reference
<css::awt::XWindow
>& rxUpdateWindow
,
86 const css::uno::Reference
<css::rendering::XCanvas
>& rxSharedCanvas
,
87 const css::uno::Reference
<css::awt::XWindow
>& rxSharedWindow
,
88 const css::uno::Reference
<css::awt::XWindow
>& rxWindow
)
89 throw (css::uno::RuntimeException
);
91 virtual css::uno::Reference
<css::rendering::XCanvas
> SAL_CALL
createCanvas (
92 const css::uno::Reference
<css::awt::XWindow
>& rxWindow
,
93 sal_Int16 nRequestedCanvasFeatures
,
94 const ::rtl::OUString
& rsOptionalCanvasServiceName
)
95 throw (css::uno::RuntimeException
);
97 virtual void SAL_CALL
toTop (
98 const css::uno::Reference
<css::awt::XWindow
>& rxWindow
)
99 throw (css::uno::RuntimeException
);
101 virtual css::uno::Reference
<css::rendering::XBitmap
> SAL_CALL
loadBitmap (
102 const ::rtl::OUString
& rsURL
,
103 const css::uno::Reference
<css::rendering::XCanvas
>& rxCanvas
)
104 throw (css::uno::RuntimeException
);
106 virtual void SAL_CALL
captureMouse (const css::uno::Reference
<css::awt::XWindow
>& rxWindow
)
107 throw (css::uno::RuntimeException
);
109 virtual void SAL_CALL
releaseMouse (const css::uno::Reference
<css::awt::XWindow
>& rxWindow
)
110 throw (css::uno::RuntimeException
);
112 virtual css::awt::Rectangle SAL_CALL
getWindowExtentsRelative (
113 const css::uno::Reference
<css::awt::XWindow
>& rxChildWindow
,
114 const css::uno::Reference
<css::awt::XWindow
>& rxParentWindow
)
115 throw (css::uno::RuntimeException
);
118 css::uno::Reference
<css::uno::XComponentContext
> mxComponentContext
;
119 ::boost::scoped_ptr
<GraphicFilter
> mpGraphicFilter
;
122 } } // end of namespace ::sd::presenter