LibreOffice Module slideshow (master) 1
|
Listener class for shape events. More...
#include <shapemanagerimpl.hxx>
Public Member Functions | |
ShapeManagerImpl (EventMultiplexer &rMultiplexer, LayerManagerSharedPtr xLayerManager, CursorManager &rCursorManager, const ShapeEventListenerMap &rGlobalListenersMap, const ShapeCursorMap &rGlobalCursorMap, const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage) | |
Create a shape event broadcaster. More... | |
ShapeManagerImpl (const ShapeManagerImpl &)=delete | |
Forbid copy construction. More... | |
ShapeManagerImpl & | operator= (const ShapeManagerImpl &)=delete |
Forbid copy assignment. More... | |
void | activate () |
Enables event listening. More... | |
void | deactivate () |
Disables event listening. More... | |
virtual void | dispose () override |
Dispose all object references. More... | |
virtual AttributableShapeSharedPtr | getSubsetShape (const AttributableShapeSharedPtr &rOrigShape, const DocTreeNode &rTreeNode)=0 |
Query a subset of the given original shape. More... | |
virtual void | revokeSubset (const AttributableShapeSharedPtr &rOrigShape, const AttributableShapeSharedPtr &rSubsetShape)=0 |
Revoke a previously queried subset shape. More... | |
virtual void | addIntrinsicAnimationHandler (const IntrinsicAnimationEventHandlerSharedPtr &rHandler)=0 |
Register an event handler that will be called when user paint parameters change. More... | |
virtual void | removeIntrinsicAnimationHandler (const IntrinsicAnimationEventHandlerSharedPtr &rHandler)=0 |
virtual void | notifyIntrinsicAnimationsEnabled ()=0 |
Notify that shape-intrinsic animations are now enabled. More... | |
virtual void | notifyIntrinsicAnimationsDisabled ()=0 |
Notify that shape-intrinsic animations are now disabled. More... | |
virtual void | enterAnimationMode (const AnimatableShapeSharedPtr &rShape)=0 |
Notify the ShapeManager that the given Shape starts an animation now. More... | |
virtual void | leaveAnimationMode (const AnimatableShapeSharedPtr &rShape)=0 |
Notify the ShapeManager that the given Shape is no longer animated. More... | |
virtual void | notifyShapeUpdate (const ShapeSharedPtr &rShape)=0 |
Notify that a shape needs an update. More... | |
virtual ShapeSharedPtr | lookupShape (css::uno::Reference< css::drawing::XShape > const &xShape) const =0 |
Lookup a Shape from an XShape model object. More... | |
virtual const XShapeToShapeMap & | getXShapeToShapeMap () const =0 |
Get a map that maps all Shapes with their XShape reference as the key. More... | |
virtual void | addHyperlinkArea (const HyperlinkAreaSharedPtr &rArea)=0 |
Register given shape as a hyperlink target. More... | |
Public Member Functions inherited from slideshow::internal::Disposable | |
virtual | ~Disposable () |
virtual void | dispose ()=0 |
Dispose all object references. More... | |
Public Member Functions inherited from slideshow::internal::ShapeListenerEventHandler | |
virtual | ~ShapeListenerEventHandler () |
virtual bool | listenerAdded (const css::uno::Reference< css::drawing::XShape > &xShape)=0 |
virtual bool | listenerRemoved (const css::uno::Reference< css::drawing::XShape > &xShape)=0 |
Public Member Functions inherited from slideshow::internal::MouseEventHandler | |
virtual | ~MouseEventHandler () |
virtual bool | handleMousePressed (const css::awt::MouseEvent &e)=0 |
Handle a mouse button pressed event. More... | |
virtual bool | handleMouseReleased (const css::awt::MouseEvent &e)=0 |
Handle a mouse button released event. More... | |
virtual bool | handleMouseDragged (const css::awt::MouseEvent &e)=0 |
Handle a mouse was moved with a pressed button event. More... | |
virtual bool | handleMouseMoved (const css::awt::MouseEvent &e)=0 |
Handle a mouse was moved event. More... | |
virtual bool | update ()=0 |
Perform the update action on all views. More... | |
virtual bool | needsUpdate () const =0 |
Query whether updates are pending. More... | |
Private Types | |
typedef std::map< ShapeSharedPtr, std::shared_ptr< ::comphelper::OInterfaceContainerHelper3< css::presentation::XShapeEventListener > >, Shape::lessThanShape > | ShapeToListenersMap |
typedef std::map< ShapeSharedPtr, sal_Int16, Shape::lessThanShape > | ShapeToCursorMap |
typedef std::set< HyperlinkAreaSharedPtr, HyperlinkArea::lessThanArea > | AreaSet |
typedef ThreadUnsafeListenerContainer< IntrinsicAnimationEventHandlerSharedPtr, std::vector< IntrinsicAnimationEventHandlerSharedPtr > > | ImplIntrinsicAnimationEventHandlers |
Private Member Functions | |
virtual bool | handleMousePressed (css::awt::MouseEvent const &evt) override |
Handle a mouse button pressed event. More... | |
virtual bool | handleMouseReleased (css::awt::MouseEvent const &evt) override |
Handle a mouse button released event. More... | |
virtual bool | handleMouseDragged (css::awt::MouseEvent const &evt) override |
Handle a mouse was moved with a pressed button event. More... | |
virtual bool | handleMouseMoved (css::awt::MouseEvent const &evt) override |
Handle a mouse was moved event. More... | |
virtual bool | update () override |
Perform the update action on all views. More... | |
virtual bool | needsUpdate () const override |
Query whether updates are pending. More... | |
virtual void | enterAnimationMode (const AnimatableShapeSharedPtr &rShape) override |
Notify the ShapeManager that the given Shape starts an animation now. More... | |
virtual void | leaveAnimationMode (const AnimatableShapeSharedPtr &rShape) override |
Notify the ShapeManager that the given Shape is no longer animated. More... | |
virtual void | notifyShapeUpdate (const ShapeSharedPtr &rShape) override |
Notify that a shape needs an update. More... | |
virtual ShapeSharedPtr | lookupShape (css::uno::Reference< css::drawing::XShape > const &xShape) const override |
Lookup a Shape from an XShape model object. More... | |
virtual const XShapeToShapeMap & | getXShapeToShapeMap () const override |
Get a map that maps all Shapes with their XShape reference as the key. More... | |
virtual void | addHyperlinkArea (const HyperlinkAreaSharedPtr &rArea) override |
Register given shape as a hyperlink target. More... | |
virtual AttributableShapeSharedPtr | getSubsetShape (const AttributableShapeSharedPtr &rOrigShape, const DocTreeNode &rTreeNode) override |
Query a subset of the given original shape. More... | |
virtual void | revokeSubset (const AttributableShapeSharedPtr &rOrigShape, const AttributableShapeSharedPtr &rSubsetShape) override |
Revoke a previously queried subset shape. More... | |
virtual void | addIntrinsicAnimationHandler (const IntrinsicAnimationEventHandlerSharedPtr &rHandler) override |
Register an event handler that will be called when user paint parameters change. More... | |
virtual void | removeIntrinsicAnimationHandler (const IntrinsicAnimationEventHandlerSharedPtr &rHandler) override |
virtual void | notifyIntrinsicAnimationsEnabled () override |
Notify that shape-intrinsic animations are now enabled. More... | |
virtual void | notifyIntrinsicAnimationsDisabled () override |
Notify that shape-intrinsic animations are now disabled. More... | |
virtual bool | listenerAdded (const css::uno::Reference< css::drawing::XShape > &xShape) override |
virtual bool | listenerRemoved (const css::uno::Reference< css::drawing::XShape > &xShape) override |
void | cursorChanged (const css::uno::Reference< css::drawing::XShape > &xShape, sal_Int16 nCursor) |
OUString | checkForHyperlink (::basegfx::B2DPoint const &hitPos) const |
OUString | checkForImageMap (css::awt::MouseEvent const &evt) const |
Private Attributes | |
EventMultiplexer & | mrMultiplexer |
LayerManagerSharedPtr | mpLayerManager |
CursorManager & | mrCursorManager |
const ShapeEventListenerMap & | mrGlobalListenersMap |
const ShapeCursorMap & | mrGlobalCursorMap |
ShapeToListenersMap | maShapeListenerMap |
ShapeToCursorMap | maShapeCursorMap |
AreaSet | maHyperlinkShapes |
ImplIntrinsicAnimationEventHandlers | maIntrinsicAnimationEventHandlers |
bool | mbEnabled |
const css::uno::Reference< css::drawing::XDrawPage > | mxDrawPage |
Listener class for shape events.
This helper class registers itself on each view, and broadcasts the XShapeEventListener events. The mouse motion events are needed for setting the shape cursor.
Definition at line 50 of file shapemanagerimpl.hxx.
|
private |
Definition at line 166 of file shapemanagerimpl.hxx.
Definition at line 170 of file shapemanagerimpl.hxx.
|
private |
Definition at line 164 of file shapemanagerimpl.hxx.
|
private |
Definition at line 162 of file shapemanagerimpl.hxx.
slideshow::internal::ShapeManagerImpl::ShapeManagerImpl | ( | EventMultiplexer & | rMultiplexer, |
LayerManagerSharedPtr | xLayerManager, | ||
CursorManager & | rCursorManager, | ||
const ShapeEventListenerMap & | rGlobalListenersMap, | ||
const ShapeCursorMap & | rGlobalCursorMap, | ||
const css::uno::Reference< css::drawing::XDrawPage > & | xDrawPage | ||
) |
Create a shape event broadcaster.
rEventMultiplexer | The slideshow-global event source, where this class registers its event handlers. |
|
delete |
Forbid copy construction.
void slideshow::internal::ShapeManagerImpl::activate | ( | ) |
Enables event listening.
The initial slide content on the background layer is already rendered (e.g. from a previous slide transition).
Definition at line 60 of file shapemanagerimpl.cxx.
References mpLayerManager, and mrMultiplexer.
|
overrideprivatevirtual |
Register given shape as a hyperlink target.
rArea | Hyperlink sensitive area. Will participate in hyperlink region lookup. Must be in absolute user space coordinates. |
Implements slideshow::internal::ShapeManager.
Definition at line 274 of file shapemanagerimpl.cxx.
|
overrideprivatevirtual |
Register an event handler that will be called when user paint parameters change.
rHandler | Handler to call when a shape listener changes |
Implements slideshow::internal::SubsettableShapeManager.
Definition at line 402 of file shapemanagerimpl.cxx.
|
private |
Definition at line 361 of file shapemanagerimpl.cxx.
References i, and basegfx::Range2D< typename TYPE, typename TRAITS >::isInside().
|
private |
Definition at line 385 of file shapemanagerimpl.cxx.
References SvxIMapInfo::GetHitIMapObject(), SdrObject::getSdrObjectFromXShape(), IMapObject::GetURL(), i, and mxDrawPage.
|
private |
Definition at line 331 of file shapemanagerimpl.cxx.
void slideshow::internal::ShapeManagerImpl::deactivate | ( | ) |
Disables event listening.
Definition at line 85 of file shapemanagerimpl.cxx.
References mpLayerManager, and mrMultiplexer.
|
overridevirtual |
Dispose all object references.
An implementor of this method must first call dispose() on any of its external references, and release them after that.
Implements slideshow::internal::Disposable.
Definition at line 103 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
overrideprivatevirtual |
Notify the ShapeManager that the given Shape starts an animation now.
This method enters animation mode for the Shape. If the shape is already in animation mode, the call is counted, and the shape only leaves animation mode after a corresponding number of leaveAnimationMode() calls.
Implements slideshow::internal::ShapeManager.
Definition at line 242 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
overrideprivatevirtual |
Query a subset of the given original shape.
This method queries a new (but not necessarily unique) shape, which displays only the given subset of the original one. Calling this method multiple times with the same original shape and DocTreeNode content always returns the same shape.
Requesting a subset from an original shape leads to the original shape ceasing to display the subsetted content. In other words, shape content is always displayed in exactly one shape.
rOrigShape | The shape the subset is to be created for |
rSubsetShape | The subset to display in the generated shape. |
Implements slideshow::internal::SubsettableShapeManager.
Definition at line 279 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
overrideprivatevirtual |
Get a map that maps all Shapes with their XShape reference as the key.
Implements slideshow::internal::ShapeManager.
Definition at line 268 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
overrideprivatevirtual |
Handle a mouse was moved with a pressed button event.
e | The mouse event that occurred. The x,y coordinates of the event are already transformed back to user coordinate space, taking the inverse transform of the view in which the event occurred. |
Implements slideshow::internal::MouseEventHandler.
Definition at line 178 of file shapemanagerimpl.cxx.
|
overrideprivatevirtual |
Handle a mouse was moved event.
e | The mouse event that occurred. The x,y coordinates of the event are already transformed back to user coordinate space, taking the inverse transform of the view in which the event occurred. |
Implements slideshow::internal::MouseEventHandler.
Definition at line 184 of file shapemanagerimpl.cxx.
References mrCursorManager.
|
overrideprivatevirtual |
Handle a mouse button pressed event.
e | The mouse event that occurred. The x,y coordinates of the event are already transformed back to user coordinate space, taking the inverse transform of the view in which the event occurred. |
Implements slideshow::internal::MouseEventHandler.
Definition at line 114 of file shapemanagerimpl.cxx.
|
overrideprivatevirtual |
Handle a mouse button released event.
e | The mouse event that occurred. The x,y coordinates of the event are already transformed back to user coordinate space, taking the inverse transform of the view in which the event occurred. |
Implements slideshow::internal::MouseEventHandler.
Definition at line 120 of file shapemanagerimpl.cxx.
References comphelper::getProcessComponentContext(), and mrMultiplexer.
|
overrideprivatevirtual |
Notify the ShapeManager that the given Shape is no longer animated.
When called a corresponding number of times as enterAnimationMode() for a given shape, this methods ends animation mode for the given Shape. It is illegal to call this method more often than enterAnimationMode().
Implements slideshow::internal::ShapeManager.
Definition at line 248 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
overrideprivatevirtual |
Implements slideshow::internal::ShapeListenerEventHandler.
Definition at line 295 of file shapemanagerimpl.cxx.
References ENSURE_OR_RETURN_FALSE.
|
overrideprivatevirtual |
Implements slideshow::internal::ShapeListenerEventHandler.
Definition at line 316 of file shapemanagerimpl.cxx.
|
overrideprivatevirtual |
Lookup a Shape from an XShape model object.
This method looks up the internal shape map for one representing the given XShape.
xShape | The XShape object, for which the representing Shape should be looked up. |
Implements slideshow::internal::ShapeManager.
Definition at line 260 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
overrideprivatevirtual |
Query whether updates are pending.
Implements slideshow::internal::ViewUpdate.
Definition at line 234 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
overrideprivatevirtual |
Notify that shape-intrinsic animations are now disabled.
Implements slideshow::internal::SubsettableShapeManager.
Definition at line 418 of file shapemanagerimpl.cxx.
|
overrideprivatevirtual |
Notify that shape-intrinsic animations are now enabled.
Implements slideshow::internal::SubsettableShapeManager.
Definition at line 412 of file shapemanagerimpl.cxx.
|
overrideprivatevirtual |
Notify that a shape needs an update.
This method notifies the ShapeManager that a shape update is necessary. Use this if e.g. a running animation changed the shape appearance.
rShape | Shape which needs an update |
Implements slideshow::internal::ShapeManager.
Definition at line 254 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
delete |
Forbid copy assignment.
|
overrideprivatevirtual |
Implements slideshow::internal::SubsettableShapeManager.
Definition at line 407 of file shapemanagerimpl.cxx.
|
overrideprivatevirtual |
Revoke a previously queried subset shape.
With this method, a previously requested subset shape is revoked again. If the last client revokes a given subset, it will cease to be displayed, and the original shape will again show the subset data.
rOrigShape | The shape the subset was created from |
rSubsetShape | The subset created from rOrigShape |
Implements slideshow::internal::SubsettableShapeManager.
Definition at line 288 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
overrideprivatevirtual |
Perform the update action on all views.
Implements slideshow::internal::ViewUpdate.
Definition at line 226 of file shapemanagerimpl.cxx.
References mpLayerManager.
|
private |
Definition at line 179 of file shapemanagerimpl.hxx.
|
private |
Definition at line 180 of file shapemanagerimpl.hxx.
|
private |
Definition at line 178 of file shapemanagerimpl.hxx.
|
private |
Definition at line 177 of file shapemanagerimpl.hxx.
|
private |
Definition at line 181 of file shapemanagerimpl.hxx.
|
private |
Definition at line 173 of file shapemanagerimpl.hxx.
|
private |
Definition at line 174 of file shapemanagerimpl.hxx.
|
private |
Definition at line 176 of file shapemanagerimpl.hxx.
|
private |
Definition at line 175 of file shapemanagerimpl.hxx.
|
private |
Definition at line 172 of file shapemanagerimpl.hxx.
|
private |
Definition at line 182 of file shapemanagerimpl.hxx.