2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-09-24 18:14:43 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
2004-08-23 08:04:42 +00:00
|
|
|
*
|
2012-09-24 18:14:43 +01:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2004-08-23 08:04:42 +00:00
|
|
|
*
|
2012-09-24 18:14:43 +01:00
|
|
|
* This file incorporates work covered by the following license notice:
|
2004-08-23 08:04:42 +00:00
|
|
|
*
|
2012-09-24 18:14:43 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-08-23 08:04:42 +00:00
|
|
|
|
|
|
|
#include "mediawindow_impl.hxx"
|
|
|
|
#include "mediaevent_impl.hxx"
|
|
|
|
#include "mediamisc.hxx"
|
|
|
|
#include "mediawindow.hrc"
|
2004-11-03 14:54:55 +00:00
|
|
|
#include "helpids.hrc"
|
2004-08-23 08:04:42 +00:00
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include <cmath>
|
|
|
|
#include <osl/mutex.hxx>
|
|
|
|
#include <vcl/svapp.hxx>
|
2010-09-16 15:17:37 +02:00
|
|
|
#ifdef UNX
|
|
|
|
#include <vcl/sysdata.hxx>
|
|
|
|
#endif
|
2004-08-23 08:04:42 +00:00
|
|
|
|
2012-06-21 17:39:01 +01:00
|
|
|
#include <com/sun/star/awt/SystemPointer.hpp>
|
|
|
|
#include <com/sun/star/lang/XComponent.hpp>
|
2004-08-23 08:04:42 +00:00
|
|
|
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
|
|
|
namespace avmedia { namespace priv {
|
|
|
|
|
|
|
|
// ----------------------
|
|
|
|
// - MediaWindowControl -
|
|
|
|
// ----------------------
|
|
|
|
|
|
|
|
MediaWindowControl::MediaWindowControl( Window* pParent ) :
|
|
|
|
MediaControl( pParent, MEDIACONTROLSTYLE_MULTILINE )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
MediaWindowControl::~MediaWindowControl()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowControl::update()
|
|
|
|
{
|
|
|
|
MediaItem aItem;
|
|
|
|
|
|
|
|
static_cast< MediaWindowImpl* >( GetParent() )->updateMediaItem( aItem );
|
|
|
|
setState( aItem );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowControl::execute( const MediaItem& rItem )
|
|
|
|
{
|
|
|
|
static_cast< MediaWindowImpl* >( GetParent() )->executeMediaItem( rItem );
|
|
|
|
}
|
|
|
|
|
|
|
|
// --------------------
|
|
|
|
// - MediaChildWindow -
|
|
|
|
// --------------------
|
|
|
|
|
|
|
|
MediaChildWindow::MediaChildWindow( Window* pParent ) :
|
2010-09-16 15:17:37 +02:00
|
|
|
SystemChildWindow( pParent, WB_CLIPCHILDREN )
|
2004-08-23 08:04:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
MediaChildWindow::~MediaChildWindow()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaChildWindow::MouseMove( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
|
|
|
|
rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
|
|
|
|
|
2010-09-16 15:17:37 +02:00
|
|
|
SystemChildWindow::MouseMove( rMEvt );
|
2004-08-23 08:04:42 +00:00
|
|
|
GetParent()->MouseMove( aTransformedEvent );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaChildWindow::MouseButtonDown( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
|
|
|
|
rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
|
|
|
|
|
2010-09-16 15:17:37 +02:00
|
|
|
SystemChildWindow::MouseButtonDown( rMEvt );
|
2004-08-23 08:04:42 +00:00
|
|
|
GetParent()->MouseButtonDown( aTransformedEvent );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaChildWindow::MouseButtonUp( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
|
|
|
|
rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
|
|
|
|
|
2010-09-16 15:17:37 +02:00
|
|
|
SystemChildWindow::MouseButtonUp( rMEvt );
|
2004-08-23 08:04:42 +00:00
|
|
|
GetParent()->MouseButtonUp( aTransformedEvent );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaChildWindow::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
2010-09-16 15:17:37 +02:00
|
|
|
SystemChildWindow::KeyInput( rKEvt );
|
2004-08-23 08:04:42 +00:00
|
|
|
GetParent()->KeyInput( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaChildWindow::KeyUp( const KeyEvent& rKEvt )
|
|
|
|
{
|
2010-09-16 15:17:37 +02:00
|
|
|
SystemChildWindow::KeyUp( rKEvt );
|
2004-08-23 08:04:42 +00:00
|
|
|
GetParent()->KeyUp( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaChildWindow::Command( const CommandEvent& rCEvt )
|
|
|
|
{
|
|
|
|
const CommandEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rCEvt.GetMousePosPixel() ) ),
|
|
|
|
rCEvt.GetCommand(), rCEvt.IsMouseEvent(), rCEvt.GetData() );
|
|
|
|
|
2010-09-16 15:17:37 +02:00
|
|
|
SystemChildWindow::Command( rCEvt );
|
2004-08-23 08:04:42 +00:00
|
|
|
GetParent()->Command( aTransformedEvent );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------
|
|
|
|
// - MediaWindowImpl -
|
|
|
|
// ----------------------
|
|
|
|
|
|
|
|
MediaWindowImpl::MediaWindowImpl( Window* pParent, MediaWindow* pMediaWindow, bool bInternalMediaControl ) :
|
|
|
|
Control( pParent ),
|
|
|
|
MediaWindowBaseImpl( pMediaWindow ),
|
|
|
|
DropTargetHelper( this ),
|
|
|
|
DragSourceHelper( this ),
|
|
|
|
mxEventsIf( static_cast< ::cppu::OWeakObject* >( mpEvents = new MediaEventListenersImpl( maChildWindow ) ) ),
|
2006-06-19 12:59:09 +00:00
|
|
|
maChildWindow( this ),
|
2004-08-23 08:04:42 +00:00
|
|
|
mpMediaWindowControl( bInternalMediaControl ? new MediaWindowControl( this ) : NULL ),
|
|
|
|
mpEmptyBmpEx( NULL ),
|
|
|
|
mpAudioBmpEx( NULL )
|
|
|
|
{
|
2010-06-09 07:07:59 +02:00
|
|
|
maChildWindow.SetBackground( Color( COL_BLACK ) );
|
2004-11-03 14:54:55 +00:00
|
|
|
maChildWindow.SetHelpId( HID_AVMEDIA_PLAYERWINDOW );
|
2004-08-23 08:04:42 +00:00
|
|
|
maChildWindow.Hide();
|
|
|
|
|
|
|
|
if( mpMediaWindowControl )
|
|
|
|
{
|
|
|
|
mpMediaWindowControl->SetSizePixel( mpMediaWindowControl->getMinSizePixel() );
|
|
|
|
mpMediaWindowControl->Show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
MediaWindowImpl::~MediaWindowImpl()
|
|
|
|
{
|
|
|
|
delete mpEmptyBmpEx;
|
|
|
|
delete mpAudioBmpEx;
|
|
|
|
delete mpMediaWindowControl;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::cleanUp()
|
|
|
|
{
|
|
|
|
uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() );
|
|
|
|
|
|
|
|
mpEvents->cleanUp();
|
|
|
|
|
|
|
|
if( xPlayerWindow.is() )
|
|
|
|
{
|
|
|
|
xPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( mxEventsIf, uno::UNO_QUERY ) );
|
|
|
|
xPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( mxEventsIf, uno::UNO_QUERY ) );
|
|
|
|
xPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( mxEventsIf, uno::UNO_QUERY ) );
|
|
|
|
|
|
|
|
uno::Reference< lang::XComponent > xComponent( xPlayerWindow, uno::UNO_QUERY );
|
|
|
|
if( xComponent.is() )
|
|
|
|
xComponent->dispose();
|
2004-11-26 20:07:14 +00:00
|
|
|
|
|
|
|
setPlayerWindow( NULL );
|
2004-08-23 08:04:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MediaWindowBaseImpl::cleanUp();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::onURLChanged()
|
|
|
|
{
|
|
|
|
if( getPlayer().is() )
|
|
|
|
{
|
2010-09-16 15:17:37 +02:00
|
|
|
uno::Sequence< uno::Any > aArgs( 3 );
|
2004-11-03 14:54:55 +00:00
|
|
|
uno::Reference< media::XPlayerWindow > xPlayerWindow;
|
|
|
|
const Point aPoint;
|
|
|
|
const Size aSize( maChildWindow.GetSizePixel() );
|
2010-09-16 15:17:37 +02:00
|
|
|
const sal_Int32 nWndHandle = 0;
|
2004-08-23 08:04:42 +00:00
|
|
|
|
2004-11-03 14:54:55 +00:00
|
|
|
aArgs[ 0 ] = uno::makeAny( nWndHandle );
|
2004-08-23 08:04:42 +00:00
|
|
|
aArgs[ 1 ] = uno::makeAny( awt::Rectangle( aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height() ) );
|
2011-03-13 19:53:21 -05:00
|
|
|
aArgs[ 2 ] = uno::makeAny( reinterpret_cast< sal_IntPtr >( &maChildWindow ) );
|
2004-08-23 08:04:42 +00:00
|
|
|
|
2005-10-13 08:42:40 +00:00
|
|
|
try
|
|
|
|
{
|
2011-03-13 19:53:21 -05:00
|
|
|
xPlayerWindow = getPlayer()->createPlayerWindow( aArgs );
|
2005-10-13 08:42:40 +00:00
|
|
|
}
|
|
|
|
catch( uno::RuntimeException )
|
|
|
|
{
|
|
|
|
// happens eg, on MacOSX where Java frames cannot be created from X11 window handles
|
|
|
|
}
|
2004-11-03 14:54:55 +00:00
|
|
|
|
2004-08-23 08:04:42 +00:00
|
|
|
setPlayerWindow( xPlayerWindow );
|
|
|
|
|
|
|
|
if( xPlayerWindow.is() )
|
|
|
|
{
|
|
|
|
xPlayerWindow->addKeyListener( uno::Reference< awt::XKeyListener >( mxEventsIf, uno::UNO_QUERY ) );
|
|
|
|
xPlayerWindow->addMouseListener( uno::Reference< awt::XMouseListener >( mxEventsIf, uno::UNO_QUERY ) );
|
|
|
|
xPlayerWindow->addMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( mxEventsIf, uno::UNO_QUERY ) );
|
|
|
|
xPlayerWindow->addFocusListener( uno::Reference< awt::XFocusListener >( mxEventsIf, uno::UNO_QUERY ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
setPlayerWindow( NULL );
|
|
|
|
|
|
|
|
if( getPlayerWindow().is() )
|
|
|
|
maChildWindow.Show();
|
|
|
|
else
|
|
|
|
maChildWindow.Hide();
|
|
|
|
|
|
|
|
if( mpMediaWindowControl )
|
|
|
|
{
|
|
|
|
MediaItem aItem;
|
|
|
|
|
|
|
|
updateMediaItem( aItem );
|
|
|
|
mpMediaWindowControl->setState( aItem );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::setPosSize( const Rectangle& rRect )
|
|
|
|
{
|
2010-06-09 07:07:59 +02:00
|
|
|
SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() );
|
2004-08-23 08:04:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::setPointer( const Pointer& rPointer )
|
|
|
|
{
|
|
|
|
uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() );
|
|
|
|
|
|
|
|
SetPointer( rPointer );
|
|
|
|
maChildWindow.SetPointer( rPointer );
|
|
|
|
|
|
|
|
if( xPlayerWindow.is() )
|
|
|
|
{
|
|
|
|
long nPointer;
|
|
|
|
|
|
|
|
switch( rPointer.GetStyle() )
|
|
|
|
{
|
|
|
|
case( POINTER_CROSS ): nPointer = awt::SystemPointer::CROSS; break;
|
|
|
|
case( POINTER_HAND ): nPointer = awt::SystemPointer::HAND; break;
|
|
|
|
case( POINTER_MOVE ): nPointer = awt::SystemPointer::MOVE; break;
|
|
|
|
case( POINTER_WAIT ): nPointer = awt::SystemPointer::WAIT; break;
|
|
|
|
|
|
|
|
default: nPointer = awt::SystemPointer::ARROW; break;
|
|
|
|
}
|
|
|
|
|
|
|
|
xPlayerWindow->setPointerType( nPointer );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::Resize()
|
|
|
|
{
|
|
|
|
uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() );
|
|
|
|
const Size aCurSize( GetOutputSizePixel() );
|
|
|
|
const sal_Int32 nOffset( mpMediaWindowControl ? AVMEDIA_CONTROLOFFSET : 0 );
|
|
|
|
Size aPlayerWindowSize( aCurSize.Width() - ( nOffset << 1 ),
|
|
|
|
aCurSize.Height() - ( nOffset << 1 ) );
|
|
|
|
|
|
|
|
if( mpMediaWindowControl )
|
|
|
|
{
|
|
|
|
const sal_Int32 nControlHeight = mpMediaWindowControl->GetSizePixel().Height();
|
|
|
|
const sal_Int32 nControlY = ::std::max( aCurSize.Height() - nControlHeight - nOffset, 0L );
|
|
|
|
|
|
|
|
aPlayerWindowSize.Height() = ( nControlY - ( nOffset << 1 ) );
|
|
|
|
mpMediaWindowControl->SetPosSizePixel( Point( nOffset, nControlY ), Size( aCurSize.Width() - ( nOffset << 1 ), nControlHeight ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
if( xPlayerWindow.is() )
|
|
|
|
xPlayerWindow->setPosSize( 0, 0, aPlayerWindowSize.Width(), aPlayerWindowSize.Height(), 0 );
|
2010-06-09 07:07:59 +02:00
|
|
|
|
2013-09-20 20:14:11 +03:00
|
|
|
maChildWindow.SetPosSizePixel( Point( 0, 0 ), aPlayerWindowSize );
|
2004-08-23 08:04:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::StateChanged( StateChangedType eType )
|
|
|
|
{
|
|
|
|
uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() );
|
|
|
|
|
|
|
|
if( xPlayerWindow.is() )
|
|
|
|
{
|
|
|
|
// stop playing when going disabled or hidden
|
|
|
|
switch( eType )
|
|
|
|
{
|
|
|
|
case STATE_CHANGE_VISIBLE:
|
|
|
|
{
|
|
|
|
stopPlayingInternal( !IsVisible() );
|
|
|
|
xPlayerWindow->setVisible( IsVisible() );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case STATE_CHANGE_ENABLE:
|
|
|
|
{
|
|
|
|
stopPlayingInternal( !IsEnabled() );
|
|
|
|
xPlayerWindow->setEnable( IsEnabled() );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::Paint( const Rectangle& )
|
|
|
|
{
|
|
|
|
BitmapEx* pLogo = NULL;
|
|
|
|
|
|
|
|
if( !getPlayer().is() )
|
|
|
|
{
|
|
|
|
if( !mpEmptyBmpEx )
|
|
|
|
mpEmptyBmpEx = new BitmapEx( AVMEDIA_RESID( AVMEDIA_BMP_EMPTYLOGO ) );
|
|
|
|
|
|
|
|
pLogo = mpEmptyBmpEx;
|
|
|
|
}
|
2010-06-09 07:07:59 +02:00
|
|
|
else if( !getPlayerWindow().is() )
|
2004-08-23 08:04:42 +00:00
|
|
|
{
|
|
|
|
if( !mpAudioBmpEx )
|
|
|
|
mpAudioBmpEx = new BitmapEx( AVMEDIA_RESID( AVMEDIA_BMP_AUDIOLOGO ) );
|
|
|
|
|
|
|
|
pLogo = mpAudioBmpEx;
|
|
|
|
}
|
|
|
|
|
|
|
|
const Point aBasePos( maChildWindow.GetPosPixel() );
|
|
|
|
const Rectangle aVideoRect( aBasePos, maChildWindow.GetSizePixel() );
|
|
|
|
|
|
|
|
if( pLogo && !pLogo->IsEmpty() && ( aVideoRect.GetWidth() > 0 ) && ( aVideoRect.GetHeight() > 0 ) )
|
|
|
|
{
|
|
|
|
Size aLogoSize( pLogo->GetSizePixel() );
|
2013-09-20 20:14:11 +03:00
|
|
|
const Color aBackgroundColor( 67, 67, 67 );
|
2004-08-23 08:04:42 +00:00
|
|
|
|
|
|
|
SetLineColor( aBackgroundColor );
|
|
|
|
SetFillColor( aBackgroundColor );
|
|
|
|
DrawRect( aVideoRect );
|
|
|
|
|
|
|
|
if( ( aLogoSize.Width() > aVideoRect.GetWidth() || aLogoSize.Height() > aVideoRect.GetHeight() ) &&
|
|
|
|
( aLogoSize.Height() > 0 ) )
|
|
|
|
{
|
|
|
|
const double fLogoWH = (double) aLogoSize.Width() / aLogoSize.Height();
|
|
|
|
|
|
|
|
if( fLogoWH < ( (double) aVideoRect.GetWidth() / aVideoRect.GetHeight() ) )
|
|
|
|
{
|
|
|
|
aLogoSize.Width() = (long) ( aVideoRect.GetHeight() * fLogoWH );
|
|
|
|
aLogoSize.Height()= aVideoRect.GetHeight();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aLogoSize.Width() = aVideoRect.GetWidth();
|
|
|
|
aLogoSize.Height()= (long) ( aVideoRect.GetWidth() / fLogoWH );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DrawBitmapEx( Point( aBasePos.X() + ( ( aVideoRect.GetWidth() - aLogoSize.Width() ) >> 1 ),
|
|
|
|
aBasePos.Y() + ( ( aVideoRect.GetHeight() - aLogoSize.Height() ) >> 1 ) ),
|
|
|
|
aLogoSize, *pLogo );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::GetFocus()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::MouseMove( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
|
|
|
|
if( pMediaWindow )
|
|
|
|
pMediaWindow->MouseMove( rMEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::MouseButtonDown( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
|
|
|
|
if( pMediaWindow )
|
|
|
|
pMediaWindow->MouseButtonDown( rMEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::MouseButtonUp( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
|
|
|
|
if( pMediaWindow )
|
|
|
|
pMediaWindow->MouseButtonUp( rMEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
|
|
|
|
if( pMediaWindow )
|
|
|
|
pMediaWindow->KeyInput( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::KeyUp( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
|
|
|
|
if( pMediaWindow )
|
|
|
|
pMediaWindow->KeyUp( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::Command( const CommandEvent& rCEvt )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
|
|
|
|
if( pMediaWindow )
|
|
|
|
pMediaWindow->Command( rCEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
sal_Int8 MediaWindowImpl::AcceptDrop( const AcceptDropEvent& rEvt )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
return( pMediaWindow ? pMediaWindow->AcceptDrop( rEvt ) : 0 );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
sal_Int8 MediaWindowImpl::ExecuteDrop( const ExecuteDropEvent& rEvt )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
return( pMediaWindow ? pMediaWindow->ExecuteDrop( rEvt ) : 0 );
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void MediaWindowImpl::StartDrag( sal_Int8 nAction, const Point& rPosPixel )
|
|
|
|
{
|
|
|
|
MediaWindow* pMediaWindow = getMediaWindow();
|
|
|
|
|
|
|
|
if( pMediaWindow )
|
|
|
|
pMediaWindow->StartDrag( nAction, rPosPixel );
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace priv
|
|
|
|
} // namespace avmedia
|
2010-10-12 15:53:47 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|