LibreOffice Module slideshow (master) 1
|
This class is the viewable representation of a draw document's media object, associated to a specific View. More...
#include <viewmediashape.hxx>
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... | |
ViewMediaShape & | operator= (const ViewMediaShape &)=delete |
Forbid copy assignment. More... | |
const ViewLayerSharedPtr & | getViewLayer () 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< SystemChildWindow > | mpMediaWindow |
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 |
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.
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.
rView | The associated View object. |
slideshow::internal::ViewMediaShape::~ViewMediaShape | ( | ) |
destroy the object
Definition at line 84 of file viewmediashape.cxx.
References TOOLS_WARN_EXCEPTION.
|
delete |
Forbid copy construction.
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.
const ViewLayerSharedPtr & slideshow::internal::ViewMediaShape::getViewLayer | ( | ) | const |
Query the associated view layer of this shape.
Definition at line 96 of file viewmediashape.cxx.
|
private |
Definition at line 268 of file viewmediashape.cxx.
References aURL, ENSURE_OR_RETURN_FALSE, getLength(), mxShape, and TOOLS_WARN_EXCEPTION.
|
private |
Definition at line 366 of file viewmediashape.cxx.
References avmedia::MediaWindow::createPlayer().
|
private |
Definition at line 394 of file viewmediashape.cxx.
References COL_BLACK(), VclPtr< class reference_type >::Create(), OutputDevice::GetOwnerWindow(), SdrObject::getSdrObjectFromXShape(), SystemEnvData::Gtk, mxShape, SAL_INFO, SystemEnvData::toolkit, TOOLS_WARN_EXCEPTION, and WB_CLIPCHILDREN.
|
private |
Definition at line 327 of file viewmediashape.cxx.
References slideshow::internal::getPropertyValue(), and mbIsSoundEnabled.
|
delete |
Forbid copy assignment.
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.
bool slideshow::internal::ViewMediaShape::render | ( | const ::basegfx::B2DRectangle & | rBounds | ) | const |
Render the ViewShape.
This method renders the ViewMediaShape on the associated view.
rBounds | The current media shape bounds |
Definition at line 155 of file viewmediashape.cxx.
References basegfx::utils::createScaleTranslateB2DHomMatrix(), Graphic::GetBitmapEx(), BitmapEx::GetSizePixel(), mxShape, and vcl::unotools::xBitmapFromBitmapEx().
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.
rBounds | The current media shape bounds |
Definition at line 201 of file viewmediashape.cxx.
References slideshow::internal::getPropertyValue(), Size::Height(), maBounds, Size::Width(), Point::X(), and Point::Y().
void slideshow::internal::ViewMediaShape::setLooping | ( | bool | bLooping | ) |
Definition at line 147 of file viewmediashape.cxx.
void slideshow::internal::ViewMediaShape::setMediaTime | ( | double | fTime | ) |
Set current time of media.
fTime | Local media time that should now be presented, in seconds. |
Definition at line 141 of file viewmediashape.cxx.
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.
|
private |
Definition at line 153 of file viewmediashape.hxx.
|
mutableprivate |
Definition at line 152 of file viewmediashape.hxx.
|
private |
Definition at line 159 of file viewmediashape.hxx.
|
private |
Definition at line 151 of file viewmediashape.hxx.
|
private |
Definition at line 150 of file viewmediashape.hxx.
|
private |
Definition at line 158 of file viewmediashape.hxx.
|
private |
Definition at line 156 of file viewmediashape.hxx.
|
private |
Definition at line 157 of file viewmediashape.hxx.
|
private |
Definition at line 155 of file viewmediashape.hxx.