INTEGRATION: CWS presenterview (1.1.2); FILE ADDED

2008/02/26 15:05:44 af 1.1.2.6: #i18486# Added ProvideCanvas().
2008/01/23 11:49:33 af 1.1.2.5: #i18486# Code cleanup.
2007/12/12 15:39:42 af 1.1.2.4: #i18486# Removed support for background bitmap.
2007/12/12 15:08:19 af 1.1.2.3: #i18486# Changed the painting of the content window.
2007/11/19 09:31:45 af 1.1.2.2: #i18486# Added isAnchorOnly() method.  Added XComponentContext argument to constructor, storing it as member.
2007/10/24 11:50:48 af 1.1.2.1: #i18486# Initial revision.
This commit is contained in:
Kurt Zenker 2008-04-03 14:59:06 +00:00
parent f237718a6d
commit 0cf14d5f63

View file

@ -0,0 +1,135 @@
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: PresenterHelpView.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: kz $ $Date: 2008-04-03 15:59:06 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef SDEXT_PRESENTER_HELP_VIEW_HXX
#define SDEXT_PRESENTER_HELP_VIEW_HXX
#include "PresenterController.hxx"
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase3.hxx>
#include <com/sun/star/awt/XPaintListener.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/drawing/framework/XView.hpp>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
namespace css = ::com::sun::star;
namespace {
typedef cppu::WeakComponentImplHelper3<
css::drawing::framework::XView,
css::awt::XWindowListener,
css::awt::XPaintListener
> PresenterHelpViewInterfaceBase;
}
namespace sdext { namespace presenter {
/** Experimental. Do not use (yet).
*/
class PresenterHelpView
: private ::cppu::BaseMutex,
public PresenterHelpViewInterfaceBase
{
public:
explicit PresenterHelpView (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const css::uno::Reference<css::frame::XController>& rxController,
const ::rtl::Reference<PresenterController>& rpPresenterController);
virtual ~PresenterHelpView (void);
virtual void SAL_CALL disposing (void);
// lang::XEventListener
virtual void SAL_CALL
disposing (const css::lang::EventObject& rEventObject)
throw (css::uno::RuntimeException);
// XWindowListener
virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent)
throw (css::uno::RuntimeException);
virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent)
throw (css::uno::RuntimeException);
virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent)
throw (css::uno::RuntimeException);
virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent)
throw (css::uno::RuntimeException);
// XPaintListener
virtual void SAL_CALL windowPaint (const css::awt::PaintEvent& rEvent)
throw (css::uno::RuntimeException);
// XResourceId
virtual css::uno::Reference<css::drawing::framework::XResourceId> SAL_CALL getResourceId (void)
throw (css::uno::RuntimeException);
virtual sal_Bool SAL_CALL isAnchorOnly (void)
throw (com::sun::star::uno::RuntimeException);
private:
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
css::uno::Reference<css::drawing::framework::XPane> mxPane;
css::uno::Reference<css::awt::XWindow> mxWindow;
::rtl::Reference<PresenterController> mpPresenterController;
css::uno::Reference<css::rendering::XSpriteCanvas> mxCanvas;
css::uno::Reference<css::rendering::XCanvasFont> mxFont;
void ProvideCanvas (void);
void Resize (void);
void Paint (const css::awt::Rectangle& rRedrawArea);
/** This method throws a DisposedException when the object has already been
disposed.
*/
void ThrowIfDisposed (void)
throw (css::lang::DisposedException);
};
} } // end of namespace ::sdext::presenter
#endif