LibreOffice Module slideshow (master) 1
|
Base class for shapes rendered by external engines. More...
#include <externalshapebase.hxx>
Classes | |
class | ExternalShapeBaseListener |
Public Member Functions | |
ExternalShapeBase (const css::uno::Reference< css::drawing::XShape > &xShape, double nPrio, const SlideShowContext &rContext) | |
Create a shape for the given XShape for an external shape. More... | |
virtual | ~ExternalShapeBase () override |
virtual css::uno::Reference< css::drawing::XShape > | getXShape () const override |
Get the associated XShape of this shape. More... | |
virtual void | play () override |
Notify the Shape that it should start with playback. More... | |
virtual void | stop () override |
Notify the Shape that it should stop playback. More... | |
virtual void | pause () override |
Notify the Shape that it should pause playback. More... | |
virtual bool | isPlaying () const override |
Query whether the media is currently playing. More... | |
virtual void | setMediaTime (double) override |
Set media time in seconds. More... | |
void | setLooping (bool bLooping) override |
virtual bool | update () const override |
Update the shape. More... | |
virtual bool | render () const override |
Render the shape. More... | |
virtual bool | isContentChanged () const override |
Query whether shape content changed. More... | |
virtual ::basegfx::B2DRectangle | getBounds () const override |
Get the current shape position and size. More... | |
virtual ::basegfx::B2DRectangle | getDomBounds () const override |
Get the DOM position and size of the shape. More... | |
virtual ::basegfx::B2DRectangle | getUpdateArea () const override |
Get the current shape update area. More... | |
virtual bool | isVisible () const override |
Query whether the shape is visible at all. More... | |
virtual double | getPriority () const override |
Get the shape priority. More... | |
virtual bool | isBackgroundDetached () const override |
Query whether the Shape is currently detached from the background. More... | |
virtual void | play ()=0 |
Notify the Shape that it should start with playback. More... | |
virtual void | stop ()=0 |
Notify the Shape that it should stop playback. More... | |
virtual void | pause ()=0 |
Notify the Shape that it should pause playback. More... | |
virtual bool | isPlaying () const =0 |
Query whether the media is currently playing. More... | |
virtual void | setMediaTime (double fTime)=0 |
Set media time in seconds. More... | |
virtual void | setLooping (bool) |
Public Member Functions inherited from slideshow::internal::Shape | |
Shape () | |
virtual | ~Shape () |
Shape (const Shape &)=delete | |
Shape & | operator= (const Shape &)=delete |
virtual css::uno::Reference< css::drawing::XShape > | getXShape () const =0 |
Get the associated XShape of this shape. More... | |
virtual void | addViewLayer (const ViewLayerSharedPtr &rNewLayer, bool bRedrawLayer)=0 |
Add a new view layer. More... | |
virtual bool | removeViewLayer (const ViewLayerSharedPtr &rNewLayer)=0 |
Withdraw the shape from a view layer. More... | |
virtual void | clearAllViewLayers ()=0 |
Withdraw all view layers at once. More... | |
virtual bool | update () const =0 |
Update the shape. More... | |
virtual bool | render () const =0 |
Render the shape. More... | |
virtual bool | isContentChanged () const =0 |
Query whether shape content changed. More... | |
virtual ::basegfx::B2DRectangle | getBounds () const =0 |
Get the current shape position and size. More... | |
virtual ::basegfx::B2DRectangle | getDomBounds () const =0 |
Get the DOM position and size of the shape. More... | |
virtual ::basegfx::B2DRectangle | getUpdateArea () const =0 |
Get the current shape update area. More... | |
virtual bool | isVisible () const =0 |
Query whether the shape is visible at all. More... | |
virtual double | getPriority () const =0 |
Get the shape priority. More... | |
virtual bool | isBackgroundDetached () const =0 |
Query whether the Shape is currently detached from the background. More... | |
virtual bool | isForeground () const |
Check whether the shape belongs to the foreground. More... | |
virtual void | setIsForeground (const bool bIsForeground) |
Set the flag that holds whether the shape is in the foreground or not. More... | |
Protected Attributes | |
const css::uno::Reference< css::uno::XComponentContext > | mxComponentContext |
Private Member Functions | |
virtual bool | implRender (const ::basegfx::B2DRange &rCurrBounds) const =0 |
override in derived class to render preview More... | |
virtual void | implViewChanged (const UnoViewSharedPtr &rView)=0 |
override in derived class to resize More... | |
virtual void | implViewsChanged ()=0 |
override in derived class to resize More... | |
virtual bool | implStartIntrinsicAnimation ()=0 |
override in derived class to start external viewer More... | |
virtual bool | implEndIntrinsicAnimation ()=0 |
override in derived class to stop external viewer More... | |
virtual void | implPauseIntrinsicAnimation ()=0 |
override in derived class to pause external viewer More... | |
virtual bool | implIsIntrinsicAnimationPlaying () const =0 |
override in derived class to return status of animation More... | |
virtual void | implSetIntrinsicAnimationTime (double)=0 |
override in derived class to set media time More... | |
virtual void | implSetLooping (bool) |
Private Attributes | |
css::uno::Reference< css::drawing::XShape > | mxShape |
The associated XShape. More... | |
std::shared_ptr< ExternalShapeBaseListener > | mpListener |
SubsettableShapeManagerSharedPtr | mpShapeManager |
EventMultiplexer & | mrEventMultiplexer |
const double | mnPriority |
::basegfx::B2DRectangle | maBounds |
Friends | |
class | ExternalShapeBaseListener |
Base class for shapes rendered by external engines.
Used as the common base for e.g. MediaShape or AppletShape, all of which are rendered by external components (and all employ distinct windows).
Please note that this base class indeed assumes the shape does not interfere with the internal shapes in any way (including mutual overdraw). It therefore reports yes for the isBackgroundDetached() question.
Definition at line 41 of file externalshapebase.hxx.
slideshow::internal::ExternalShapeBase::ExternalShapeBase | ( | const css::uno::Reference< css::drawing::XShape > & | xShape, |
double | nPrio, | ||
const SlideShowContext & | rContext | ||
) |
Create a shape for the given XShape for an external shape.
xShape | The XShape to represent. |
nPrio | Externally-determined shape priority (used e.g. for paint ordering). This number must be unique! |
Definition at line 79 of file externalshapebase.cxx.
References slideshow::internal::EventMultiplexer::addViewHandler(), ENSURE_OR_THROW, make_shared(), mpListener, mpShapeManager, mrEventMultiplexer, mxComponentContext, and mxShape.
|
overridevirtual |
Definition at line 97 of file externalshapebase.cxx.
References mpListener, mpShapeManager, mrEventMultiplexer, slideshow::internal::EventMultiplexer::removeViewHandler(), and TOOLS_WARN_EXCEPTION.
|
overridevirtual |
Get the current shape position and size.
This method yields the currently effective shape bounds (which might change over time, for animated shapes). Please note that possibly shape rotations from its original document state must not be taken into account here: if you need the screen bounding box, use getUpdateArea() instead. Note further that shape rotations, which are already contained in the shape as displayed in the original document are included herein (we currently take the shape as-is from the document, assuming a rotation angle of 0).
Implements slideshow::internal::Shape.
Definition at line 173 of file externalshapebase.cxx.
References maBounds.
|
overridevirtual |
Get the DOM position and size of the shape.
This method yields the underlying DOM shape bounds, i.e. the original shape bounds from the document model. This value is always unaffected by any animation activity. Note that shape rotations, which are already contained in the shape as displayed in the original document are already included herein (we currently take the shape as-is from the document, assuming a rotation angle of 0).
Implements slideshow::internal::Shape.
Definition at line 179 of file externalshapebase.cxx.
References maBounds.
|
overridevirtual |
Get the shape priority.
The shape priority defines the relative order of the shapes on the slide.
Implements slideshow::internal::Shape.
Definition at line 197 of file externalshapebase.cxx.
References mnPriority.
|
overridevirtual |
Get the current shape update area.
This method yields the currently effective update area for the shape, i.e. the area that needs to be updated, should the shape be painted. Normally, this will be the (possibly rotated and sheared) area returned by getBounds().
Implements slideshow::internal::Shape.
Definition at line 185 of file externalshapebase.cxx.
References maBounds.
|
overridevirtual |
Get the associated XShape of this shape.
Implements slideshow::internal::Shape.
Definition at line 111 of file externalshapebase.cxx.
References mxShape.
|
privatepure virtual |
override in derived class to stop external viewer
Referenced by slideshow::internal::ExternalShapeBase::ExternalShapeBaseListener::disableAnimations(), and stop().
|
privatepure virtual |
override in derived class to return status of animation
Referenced by isPlaying().
|
privatepure virtual |
override in derived class to pause external viewer
Referenced by pause().
|
privatepure virtual |
override in derived class to render preview
Referenced by render().
|
privatepure virtual |
override in derived class to set media time
Referenced by setMediaTime().
|
inlineprivatevirtual |
Definition at line 112 of file externalshapebase.hxx.
Referenced by setLooping().
|
privatepure virtual |
override in derived class to start external viewer
Referenced by slideshow::internal::ExternalShapeBase::ExternalShapeBaseListener::enableAnimations(), and play().
|
privatepure virtual |
override in derived class to resize
Referenced by slideshow::internal::ExternalShapeBase::ExternalShapeBaseListener::viewChanged().
|
privatepure virtual |
override in derived class to resize
Referenced by slideshow::internal::ExternalShapeBase::ExternalShapeBaseListener::viewsChanged().
|
overridevirtual |
Query whether the Shape is currently detached from the background.
This method checks whether the Shape is currently detached from the slide background, i.e. whether shape updates affect the underlying slide background or not. A shape that returns true here must not alter slide content in any way when called render() or update() (this is normally achieved by making this shape a sprite).
Implements slideshow::internal::Shape.
Definition at line 203 of file externalshapebase.cxx.
|
overridevirtual |
Query whether shape content changed.
This method returns true, if shape content changed since the last rendering (i.e. the shape needs an update to reflect that changed content on the views).
Implements slideshow::internal::Shape.
Definition at line 167 of file externalshapebase.cxx.
|
overridevirtual |
Query whether the media is currently playing.
Implements slideshow::internal::IExternalMediaShapeBase.
Definition at line 135 of file externalshapebase.cxx.
References implIsIntrinsicAnimationPlaying().
|
overridevirtual |
Query whether the shape is visible at all.
Implements slideshow::internal::Shape.
Definition at line 191 of file externalshapebase.cxx.
|
overridevirtual |
Notify the Shape that it should pause playback.
This method stops playback on all registered views. The media stays visible (for videos)
Implements slideshow::internal::IExternalMediaShapeBase.
Definition at line 129 of file externalshapebase.cxx.
References implPauseIntrinsicAnimation().
|
overridevirtual |
Notify the Shape that it should start with playback.
This method enters playback mode on all registered views. It makes the media initially visible (for videos).
Implements slideshow::internal::IExternalMediaShapeBase.
Definition at line 117 of file externalshapebase.cxx.
References implStartIntrinsicAnimation().
|
overridevirtual |
Render the shape.
This method renders the shape on all registered view layers, regardless of whether shape content has changed or not.
Implements slideshow::internal::Shape.
Definition at line 154 of file externalshapebase.cxx.
References basegfx::Tuple2D< typename TYPE >::equalZero(), basegfx::B2DRange::getRange(), implRender(), and maBounds.
Referenced by update().
|
overridevirtual |
Reimplemented from slideshow::internal::IExternalMediaShapeBase.
Definition at line 146 of file externalshapebase.cxx.
References implSetLooping().
|
overridevirtual |
Set media time in seconds.
fTime | Time in seconds of the media time line, that should now be presented |
Implements slideshow::internal::IExternalMediaShapeBase.
Definition at line 141 of file externalshapebase.cxx.
References implSetIntrinsicAnimationTime().
|
overridevirtual |
Notify the Shape that it should stop playback.
This method leaves playback mode on all registered views. The media is then rewound to the start, and removed from screen (for videos)
Implements slideshow::internal::IExternalMediaShapeBase.
Definition at line 123 of file externalshapebase.cxx.
References implEndIntrinsicAnimation().
|
overridevirtual |
Update the shape.
This method updates the Shape on all registered view layers, but only if shape content has actually changed.
Implements slideshow::internal::Shape.
Definition at line 148 of file externalshapebase.cxx.
References render().
|
friend |
Definition at line 92 of file externalshapebase.hxx.
|
private |
Definition at line 125 of file externalshapebase.hxx.
Referenced by getBounds(), getDomBounds(), getUpdateArea(), and render().
|
private |
Definition at line 124 of file externalshapebase.hxx.
Referenced by getPriority().
|
private |
Definition at line 118 of file externalshapebase.hxx.
Referenced by ExternalShapeBase(), and ~ExternalShapeBase().
|
private |
Definition at line 120 of file externalshapebase.hxx.
Referenced by ExternalShapeBase(), and ~ExternalShapeBase().
|
private |
Definition at line 121 of file externalshapebase.hxx.
Referenced by ExternalShapeBase(), and ~ExternalShapeBase().
|
protected |
Definition at line 89 of file externalshapebase.hxx.
|
private |
The associated XShape.
Definition at line 116 of file externalshapebase.hxx.
Referenced by ExternalShapeBase(), and getXShape().