LibreOffice Module slideshow (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
slideshow::internal::ViewMediaShape Class Referencefinal

This class is the viewable representation of a draw document's media object, associated to a specific View. More...

#include <viewmediashape.hxx>

Collaboration diagram for slideshow::internal::ViewMediaShape:
[legend]

Public Member Functions

 ViewMediaShape (const ViewLayerSharedPtr &rViewLayer, css::uno::Reference< css::drawing::XShape > xShape, css::uno::Reference< css::uno::XComponentContext > xContext)
 Create a ViewMediaShape for the given View. More...
 
 ~ViewMediaShape ()
 destroy the object More...
 
 ViewMediaShape (const ViewMediaShape &)=delete
 Forbid copy construction. More...
 
ViewMediaShapeoperator= (const ViewMediaShape &)=delete
 Forbid copy assignment. More...
 
const ViewLayerSharedPtrgetViewLayer () const
 Query the associated view layer of this shape. More...
 
void startMedia ()
 Notify the ViewShape that an animation starts now. More...
 
void endMedia ()
 Notify the ViewShape that it is no longer animated. More...
 
void pauseMedia ()
 Notify the ViewShape that it should pause playback. More...
 
void setMediaTime (double fTime)
 Set current time of media. More...
 
void setLooping (bool bLooping)
 
bool render (const ::basegfx::B2DRectangle &rBounds) const
 Render the ViewShape. More...
 
bool resize (const ::basegfx::B2DRectangle &rNewBounds) const
 Resize the ViewShape. More...
 

Private Member Functions

bool implInitialize (const ::basegfx::B2DRectangle &rBounds)
 
void implSetMediaProperties (const css::uno::Reference< css::beans::XPropertySet > &rxProps)
 
void implInitializeMediaPlayer (const OUString &rMediaURL, const OUString &rMimeType)
 
void implInitializePlayerWindow (const ::basegfx::B2DRectangle &rBounds, const css::uno::Sequence< css::uno::Any > &rVCLDeviceParams)
 

Private Attributes

ViewLayerSharedPtr mpViewLayer
 
VclPtr< SystemChildWindowmpMediaWindow
 
css::awt::Point maWindowOffset
 
mutable::basegfx::B2DRectangle maBounds
 
css::uno::Reference< css::drawing::XShape > mxShape
 
css::uno::Reference< css::media::XPlayer > mxPlayer
 
css::uno::Reference< css::media::XPlayerWindow > mxPlayerWindow
 
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
 
bool mbIsSoundEnabled
 

Detailed Description

This class is the viewable representation of a draw document's media object, associated to a specific View.

The class is able to render the associated media shape on View implementations.

Definition at line 58 of file viewmediashape.hxx.

Constructor & Destructor Documentation

◆ ViewMediaShape() [1/2]

slideshow::internal::ViewMediaShape::ViewMediaShape ( const ViewLayerSharedPtr rViewLayer,
css::uno::Reference< css::drawing::XShape >  xShape,
css::uno::Reference< css::uno::XComponentContext >  xContext 
)

Create a ViewMediaShape for the given View.

Parameters
rViewThe associated View object.

◆ ~ViewMediaShape()

slideshow::internal::ViewMediaShape::~ViewMediaShape ( )

destroy the object

Definition at line 84 of file viewmediashape.cxx.

References TOOLS_WARN_EXCEPTION.

◆ ViewMediaShape() [2/2]

slideshow::internal::ViewMediaShape::ViewMediaShape ( const ViewMediaShape )
delete

Forbid copy construction.

Member Function Documentation

◆ endMedia()

void slideshow::internal::ViewMediaShape::endMedia ( )

Notify the ViewShape that it is no longer animated.

This methods ends animation mode on the associate target view

Definition at line 110 of file viewmediashape.cxx.

◆ getViewLayer()

const ViewLayerSharedPtr & slideshow::internal::ViewMediaShape::getViewLayer ( ) const

Query the associated view layer of this shape.

Definition at line 96 of file viewmediashape.cxx.

◆ implInitialize()

bool slideshow::internal::ViewMediaShape::implInitialize ( const ::basegfx::B2DRectangle rBounds)
private

◆ implInitializeMediaPlayer()

void slideshow::internal::ViewMediaShape::implInitializeMediaPlayer ( const OUString &  rMediaURL,
const OUString &  rMimeType 
)
private

Definition at line 366 of file viewmediashape.cxx.

References avmedia::MediaWindow::createPlayer().

◆ implInitializePlayerWindow()

void slideshow::internal::ViewMediaShape::implInitializePlayerWindow ( const ::basegfx::B2DRectangle rBounds,
const css::uno::Sequence< css::uno::Any > &  rVCLDeviceParams 
)
private

◆ implSetMediaProperties()

void slideshow::internal::ViewMediaShape::implSetMediaProperties ( const css::uno::Reference< css::beans::XPropertySet > &  rxProps)
private

◆ operator=()

ViewMediaShape & slideshow::internal::ViewMediaShape::operator= ( const ViewMediaShape )
delete

Forbid copy assignment.

◆ pauseMedia()

void slideshow::internal::ViewMediaShape::pauseMedia ( )

Notify the ViewShape that it should pause playback.

This methods pauses animation on the associate target view. The content stays visible (for video)

Definition at line 135 of file viewmediashape.cxx.

◆ render()

bool slideshow::internal::ViewMediaShape::render ( const ::basegfx::B2DRectangle rBounds) const

Render the ViewShape.

This method renders the ViewMediaShape on the associated view.

Parameters
rBoundsThe current media shape bounds
Returns
whether the rendering finished successfully.

Definition at line 155 of file viewmediashape.cxx.

References basegfx::utils::createScaleTranslateB2DHomMatrix(), Graphic::GetBitmapEx(), BitmapEx::GetSizePixel(), mxShape, and vcl::unotools::xBitmapFromBitmapEx().

◆ resize()

bool slideshow::internal::ViewMediaShape::resize ( const ::basegfx::B2DRectangle rNewBounds) const

Resize the ViewShape.

This method updates the ViewMediaShape size on the associated view. It does not render.

Parameters
rBoundsThe current media shape bounds
Returns
whether the resize finished successfully.

Definition at line 201 of file viewmediashape.cxx.

References slideshow::internal::getPropertyValue(), Size::Height(), maBounds, Size::Width(), Point::X(), and Point::Y().

◆ setLooping()

void slideshow::internal::ViewMediaShape::setLooping ( bool  bLooping)

Definition at line 147 of file viewmediashape.cxx.

◆ setMediaTime()

void slideshow::internal::ViewMediaShape::setMediaTime ( double  fTime)

Set current time of media.

Parameters
fTimeLocal media time that should now be presented, in seconds.

Definition at line 141 of file viewmediashape.cxx.

◆ startMedia()

void slideshow::internal::ViewMediaShape::startMedia ( )

Notify the ViewShape that an animation starts now.

This method enters animation mode on the associate target view. The shape can be animated in parallel on different views.

Definition at line 101 of file viewmediashape.cxx.

References maBounds.

Member Data Documentation

◆ maBounds

mutable::basegfx::B2DRectangle slideshow::internal::ViewMediaShape::maBounds
private

Definition at line 153 of file viewmediashape.hxx.

◆ maWindowOffset

css::awt::Point slideshow::internal::ViewMediaShape::maWindowOffset
mutableprivate

Definition at line 152 of file viewmediashape.hxx.

◆ mbIsSoundEnabled

bool slideshow::internal::ViewMediaShape::mbIsSoundEnabled
private

Definition at line 159 of file viewmediashape.hxx.

◆ mpMediaWindow

VclPtr< SystemChildWindow > slideshow::internal::ViewMediaShape::mpMediaWindow
private

Definition at line 151 of file viewmediashape.hxx.

◆ mpViewLayer

ViewLayerSharedPtr slideshow::internal::ViewMediaShape::mpViewLayer
private

Definition at line 150 of file viewmediashape.hxx.

◆ mxComponentContext

css::uno::Reference< css::uno::XComponentContext> slideshow::internal::ViewMediaShape::mxComponentContext
private

Definition at line 158 of file viewmediashape.hxx.

◆ mxPlayer

css::uno::Reference< css::media::XPlayer > slideshow::internal::ViewMediaShape::mxPlayer
private

Definition at line 156 of file viewmediashape.hxx.

◆ mxPlayerWindow

css::uno::Reference< css::media::XPlayerWindow > slideshow::internal::ViewMediaShape::mxPlayerWindow
private

Definition at line 157 of file viewmediashape.hxx.

◆ mxShape

css::uno::Reference< css::drawing::XShape > slideshow::internal::ViewMediaShape::mxShape
private

Definition at line 155 of file viewmediashape.hxx.


The documentation for this class was generated from the following files: