LibreOffice Module slideshow (master) 1
|
Base class for all slide change effects. More...
#include <slidechangebase.hxx>
Classes | |
struct | ViewEntry |
Info on a per-view basis. More... | |
Public Member Functions | |
SlideChangeBase (const SlideChangeBase &)=delete | |
SlideChangeBase & | operator= (const SlideChangeBase &)=delete |
virtual bool | operator() (double x) override |
Set the animation to value x. More... | |
virtual double | getUnderlyingValue () const override |
Request the underlying value for this animation. More... | |
virtual void | prefetch () override |
Notify that the animation going active soon. More... | |
virtual void | start (const AnimatableShapeSharedPtr &, const ShapeAttributeLayerSharedPtr &) override |
Notify that the animation is about to begin. More... | |
virtual void | end () override |
Notify that the animation is about to end. More... | |
virtual void | viewAdded (const UnoViewSharedPtr &rView) override |
Notify new view. More... | |
virtual void | viewRemoved (const UnoViewSharedPtr &rView) override |
Notify removed view. More... | |
virtual void | viewChanged (const UnoViewSharedPtr &rView) override |
Notify changed view. More... | |
virtual void | viewsChanged () override |
Notify that all views changed. More... | |
virtual void | viewAdded (const UnoViewSharedPtr &rView)=0 |
Notify new view. More... | |
virtual void | viewRemoved (const UnoViewSharedPtr &rView)=0 |
Notify removed view. More... | |
virtual void | viewChanged (const UnoViewSharedPtr &rView)=0 |
Notify changed view. More... | |
virtual void | viewsChanged ()=0 |
Notify that all views changed. More... | |
Public Member Functions inherited from slideshow::internal::SharedPtrAble | |
virtual | ~SharedPtrAble () |
virtual bool | operator() (double x)=0 |
Set the animation to value x. More... | |
virtual double | getUnderlyingValue () const =0 |
Request the underlying value for this animation. More... | |
virtual void | prefetch ()=0 |
Notify that the animation going active soon. More... | |
virtual void | start (const AnimatableShapeSharedPtr &rShape, const ShapeAttributeLayerSharedPtr &rAttrLayer)=0 |
Notify that the animation is about to begin. More... | |
virtual void | end ()=0 |
Notify that the animation is about to end. More... | |
Protected Types | |
typedef ::std::vector< ViewEntry > | ViewsVecT |
Protected Member Functions | |
SlideChangeBase (::std::optional< SlideSharedPtr > leavingSlide, const SlideSharedPtr &pEnteringSlide, SoundPlayerSharedPtr pSoundPlayer, const UnoViewContainer &rViewContainer, ScreenUpdater &rScreenUpdater, EventMultiplexer &rEventMultiplexer, bool bCreateLeavingSprites=true, bool bCreateEnteringSprites=true) | |
Create a new SlideChanger, for the given leaving and entering slides. More... | |
ViewsVecT::const_iterator | beginViews () |
ViewsVecT::const_iterator | endViews () |
SlideBitmapSharedPtr | getLeavingBitmap (const ViewEntry &rViewEntry) const |
SlideBitmapSharedPtr | getEnteringBitmap (const ViewEntry &rViewEntry) const |
SlideBitmapSharedPtr | createBitmap (const UnoViewSharedPtr &pView, const std::optional< SlideSharedPtr > &rSlide_) const |
::basegfx::B2ISize | getEnteringSlideSizePixel (const UnoViewSharedPtr &pView) const |
virtual void | prepareForRun (const ViewEntry &rViewEntry, const cppcanvas::CanvasSharedPtr &rDestinationCanvas) |
Called on derived classes to perform actions before first run. More... | |
virtual void | performIn (const cppcanvas::CustomSpriteSharedPtr &rSprite, const ViewEntry &rViewEntry, const cppcanvas::CanvasSharedPtr &rDestinationCanvas, double t) |
Called on derived classes to implement actual slide change. More... | |
virtual void | performOut (const cppcanvas::CustomSpriteSharedPtr &rSprite, const ViewEntry &rViewEntry, const cppcanvas::CanvasSharedPtr &rDestinationCanvas, double t) |
Called on derived classes to implement actual slide change. More... | |
ScreenUpdater & | getScreenUpdater () const |
Static Protected Member Functions | |
static void | renderBitmap (SlideBitmapSharedPtr const &pSlideBitmap, cppcanvas::CanvasSharedPtr const &pCanvas) |
Private Member Functions | |
cppcanvas::CustomSpriteSharedPtr | createSprite (UnoViewSharedPtr const &pView, ::basegfx::B2DSize const &rSpriteSize, double nPrio) const |
void | addSprites (ViewEntry &rEntry) |
Static Private Member Functions | |
static void | clearViewEntry (ViewEntry &rEntry) |
Private Attributes | |
SoundPlayerSharedPtr | mpSoundPlayer |
EventMultiplexer & | mrEventMultiplexer |
ScreenUpdater & | mrScreenUpdater |
::std::optional< SlideSharedPtr > | maLeavingSlide |
SlideSharedPtr | mpEnteringSlide |
ViewsVecT | maViewData |
const UnoViewContainer & | mrViewContainer |
const bool | mbCreateLeavingSprites |
const bool | mbCreateEnteringSprites |
bool | mbSpritesVisible |
bool | mbFinished |
bool | mbPrefetched |
Additional Inherited Members | |
Public Types inherited from slideshow::internal::NumberAnimation | |
typedef double | ValueType |
Base class for all slide change effects.
This class provides the basic sprite and view handling functionality. Derived classes should normally only need to implement the perform() method.
Definition at line 48 of file slidechangebase.hxx.
|
protected |
Definition at line 108 of file slidechangebase.hxx.
|
delete |
|
protected |
Create a new SlideChanger, for the given leaving and entering slides.
|
private |
|
inlineprotected |
Definition at line 110 of file slidechangebase.hxx.
References maViewData.
Referenced by slideshow::internal::CombTransition::operator()().
|
staticprivate |
Definition at line 499 of file slidechangebase.cxx.
References slideshow::internal::SlideChangeBase::ViewEntry::mpEnteringBitmap, slideshow::internal::SlideChangeBase::ViewEntry::mpInSprite, slideshow::internal::SlideChangeBase::ViewEntry::mpLeavingBitmap, and slideshow::internal::SlideChangeBase::ViewEntry::mpOutSprite.
|
protected |
|
private |
Definition at line 455 of file slidechangebase.cxx.
|
overridevirtual |
Notify that the animation is about to end.
Implements slideshow::internal::Animation.
Definition at line 208 of file slidechangebase.cxx.
References mrEventMultiplexer.
|
inlineprotected |
Definition at line 111 of file slidechangebase.hxx.
References maViewData.
Referenced by slideshow::internal::CombTransition::operator()().
|
protected |
Definition at line 71 of file slidechangebase.cxx.
References slideshow::internal::SlideChangeBase::ViewEntry::mpEnteringBitmap, and slideshow::internal::SlideChangeBase::ViewEntry::mpView.
Referenced by slideshow::internal::CombTransition::renderComb().
|
protected |
Definition at line 138 of file slidechangebase.cxx.
References slideshow::internal::getSlideSizePixel().
Referenced by slideshow::internal::CombTransition::renderComb().
|
protected |
Definition at line 62 of file slidechangebase.cxx.
References slideshow::internal::SlideChangeBase::ViewEntry::mpLeavingBitmap, and slideshow::internal::SlideChangeBase::ViewEntry::mpView.
Referenced by slideshow::internal::CombTransition::renderComb().
|
inlineprotected |
Definition at line 170 of file slidechangebase.hxx.
References mrScreenUpdater.
Referenced by slideshow::internal::CombTransition::operator()().
|
overridevirtual |
Request the underlying value for this animation.
This is necessary for pure To or By animations, as the Activity cannot determine a sensible start value otherwise.
Implements slideshow::internal::NumberAnimation.
Definition at line 378 of file slidechangebase.cxx.
|
overridevirtual |
Set the animation to value x.
x | Current animation value (must be in an attribute-specific permissible range). Overflowing values will be clipped to the permissible range internally. |
Implements slideshow::internal::NumberAnimation.
Reimplemented in slideshow::internal::CombTransition.
Definition at line 254 of file slidechangebase.cxx.
References i, slideshow::internal::SlideChangeBase::ViewEntry::mpInSprite, slideshow::internal::SlideChangeBase::ViewEntry::mpOutSprite, slideshow::internal::SlideChangeBase::ViewEntry::mpView, and nValue.
|
delete |
|
protectedvirtual |
Called on derived classes to implement actual slide change.
This method is called with the sprite of the slide coming 'in'
rSprite | Current sprite to operate on. This is the sprite of the 'entering' slide |
t | Current parameter value |
Definition at line 362 of file slidechangebase.cxx.
|
protectedvirtual |
Called on derived classes to implement actual slide change.
This method is called with the sprite of the slide moving 'out'
rSprite | Current sprite to operate on. This is the sprite of the 'leaving' slide |
t | Current parameter value |
Definition at line 370 of file slidechangebase.cxx.
|
overridevirtual |
Notify that the animation going active soon.
Implementers should preload any buffers, and create any expensive objects at this time.
rShape | Shape to apply this animation to. |
rAttrLayer | Attribute layer to play the animation on. |
Implements slideshow::internal::Animation.
Definition at line 169 of file slidechangebase.cxx.
References mrEventMultiplexer.
|
protectedvirtual |
Called on derived classes to perform actions before first run.
This typically involves rendering of the initial slide content.
rViewEntry | the view entry |
rDestinationCanvas | the canvas to render on |
Definition at line 356 of file slidechangebase.cxx.
|
staticprotected |
Definition at line 145 of file slidechangebase.cxx.
References basegfx::utils::createTranslateB2DHomMatrix(), basegfx::Tuple2D< typename TYPE >::getX(), and basegfx::Tuple2D< typename TYPE >::getY().
|
overridevirtual |
Notify that the animation is about to begin.
Implementers are free to start accompanying effects, such as sounds, and the animation timer now.
rShape | Shape to apply this animation to. |
rAttrLayer | Attribute layer to play the animation on. |
Implements slideshow::internal::Animation.
Definition at line 185 of file slidechangebase.cxx.
|
overridevirtual |
Notify new view.
rView | The newly added view |
Implements slideshow::internal::ViewEventHandler.
Definition at line 386 of file slidechangebase.cxx.
|
overridevirtual |
Notify changed view.
Reasons for a viewChanged notification can be different view size, transformation, or other device properties (color resolution or profile, etc.)
rView | The changed view |
Implements slideshow::internal::ViewEventHandler.
Definition at line 416 of file slidechangebase.cxx.
|
overridevirtual |
Notify removed view.
rView | The removed view |
Implements slideshow::internal::ViewEventHandler.
Definition at line 400 of file slidechangebase.cxx.
|
overridevirtual |
Notify that all views changed.
Reasons for a viewChanged notification can be different view size, transformation, or other device properties (color resolution or profile, etc.)
Note that this method avoids hidden inefficiencies (O(n^2) behaviour when viewChanged() needs to perform linear searches)
Implements slideshow::internal::ViewEventHandler.
Definition at line 440 of file slidechangebase.cxx.
|
private |
Definition at line 187 of file slidechangebase.hxx.
|
private |
Definition at line 190 of file slidechangebase.hxx.
Referenced by beginViews(), and endViews().
|
private |
Definition at line 194 of file slidechangebase.hxx.
|
private |
Definition at line 193 of file slidechangebase.hxx.
|
private |
Definition at line 196 of file slidechangebase.hxx.
|
private |
Definition at line 197 of file slidechangebase.hxx.
|
private |
Definition at line 195 of file slidechangebase.hxx.
|
private |
Definition at line 188 of file slidechangebase.hxx.
|
private |
Definition at line 182 of file slidechangebase.hxx.
|
private |
Definition at line 184 of file slidechangebase.hxx.
|
private |
Definition at line 185 of file slidechangebase.hxx.
Referenced by getScreenUpdater().
|
private |
Definition at line 191 of file slidechangebase.hxx.