20#ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_LAYERMANAGER_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_LAYERMANAGER_HXX
30#include <unordered_map>
43 typedef std::unordered_map<
44 css::uno::Reference< css::drawing::XShape >,
46 hash< css::uno::Reference< css::drawing::XShape > >
77 bool bDisableAnimationZOrder );
234 bool renderTo( const ::cppcanvas::CanvasSharedPtr& rTargetCanvas )
const;
249 typedef ::std::map< ShapeSharedPtr, LayerWeakPtr, ShapeComparator >
LayerShapeMap;
274 LayerShapeMap::const_iterator aFirstLayerShape,
275 const LayerShapeMap::const_iterator& aEndLayerShapes );
305 template<
typename LayerFunc,
306 typename ShapeFunc>
void manageViews( LayerFunc layerFunc,
307 ShapeFunc shapeFunc );
315 ::std::vector< LayerSharedPtr >
338 ::std::set< ShapeSharedPtr >
This class represents kind of a DOM tree node for shape text.
bool operator()(const ShapeSharedPtr &rpS1, const ShapeSharedPtr &rpS2) const
This class manages all of a slide's layers (and shapes)
void implRemoveShape(const ShapeSharedPtr &rShape)
Common stuff when removing a shape.
LayerManager(const LayerManager &)=delete
Forbid copy construction.
bool mbDisableAnimationZOrder
When true, all sprite animations run in the foreground.
void viewAdded(const UnoViewSharedPtr &rView)
Notify new view added to UnoViewContainer.
bool renderTo(const ::cppcanvas::CanvasSharedPtr &rTargetCanvas) const
Render the content to given canvas.
void updateShapeLayers(bool bBackgroundLayerPainted)
Commits any pending layer reorg, due to shapes either entering or leaving animation mode.
::std::map< ShapeSharedPtr, LayerWeakPtr, ShapeComparator > LayerShapeMap
Set of all shapes.
void deactivate()
Deactivate the LayerManager.
void commitLayerChanges(std::size_t nCurrLayerIndex, LayerShapeMap::const_iterator aFirstLayerShape, const LayerShapeMap::const_iterator &aEndLayerShapes)
Push changes from updateShapeLayerAssociations() to current layer.
const UnoViewContainer & mrViews
Registered views.
ShapeSharedPtr lookupShape(const css::uno::Reference< css::drawing::XShape > &xShape) const
Lookup a Shape from an XShape model object.
LayerShapeMap maAllShapes
Set of shapes this LayerManager own.
AttributableShapeSharedPtr getSubsetShape(const AttributableShapeSharedPtr &rOrigShape, const DocTreeNode &rTreeNode)
Query a subset of the given original shape.
void notifyShapeUpdate(const ShapeSharedPtr &rShape)
Notify that a shape needs an update.
void revokeSubset(const AttributableShapeSharedPtr &rOrigShape, const AttributableShapeSharedPtr &rSubsetShape)
Revoke a previously queried subset shape.
void manageViews(LayerFunc layerFunc, ShapeFunc shapeFunc)
Add or remove views.
void activate()
Activate the LayerManager.
void leaveAnimationMode(const AnimatableShapeSharedPtr &rShape)
Notify the LayerManager that the given Shape is no longer animated.
void addUpdateArea(ShapeSharedPtr const &rShape)
Adds shape area to containing layer's damage area.
LayerManager & operator=(const LayerManager &)=delete
Forbid copy assignment.
void implAddShape(const ShapeSharedPtr &rShape)
Common stuff when adding a shape.
void enterAnimationMode(const AnimatableShapeSharedPtr &rShape)
Notify the LayerManager that the given Shape starts an animation now.
bool mbLayerAssociationDirty
sal_True, if shapes might need to move to different layer
LayerSharedPtr createForegroundLayer() const
::std::vector< LayerSharedPtr > maLayers
All layers of this object. Vector owns the layers.
const XShapeToShapeMap & getXShapeToShapeMap() const
Get a map that maps all Shapes with their XShape reference as the key.
bool update()
Update the content.
LayerManager(const UnoViewContainer &rViews, bool bDisableAnimationZOrder)
Create a new layer manager for the given page bounds.
bool isUpdatePending() const
Check whether any update operations are pending.
void addShape(const ShapeSharedPtr &rShape)
Add the shape to this object.
void viewRemoved(const UnoViewSharedPtr &rView)
Notify view removed from UnoViewContainer.
void putShape2BackgroundLayer(LayerShapeMap::value_type &rShapeEntry)
Init Shape layers with background layer.
XShapeToShapeMap maXShapeHash
Contains all shapes with their XShape reference as the key.
bool mbActive
sal_False when deactivated
::std::set< ShapeSharedPtr > maUpdateShapes
Set of shapes that have requested an update.
sal_Int32 mnActiveSprites
Number of shape sprites currently active on this LayerManager.
void viewChanged(const UnoViewSharedPtr &rView)
bool removeShape(const ShapeSharedPtr &rShape)
Remove shape from this object.
::std::shared_ptr< AnimatableShape > AnimatableShapeSharedPtr
::std::shared_ptr< LayerManager > LayerManagerSharedPtr
::std::shared_ptr< Layer > LayerSharedPtr
::std::shared_ptr< AttributableShape > AttributableShapeSharedPtr
std::unordered_map< css::uno::Reference< css::drawing::XShape >, ShapeSharedPtr, hash< css::uno::Reference< css::drawing::XShape > > > XShapeToShapeMap
A hash map which maps the XShape to the corresponding Shape object.
::std::shared_ptr< Shape > ShapeSharedPtr
std::shared_ptr< UnoView > UnoViewSharedPtr
static bool compare(const Shape *pLHS, const Shape *pRHS)