LibreOffice Module slideshow (master) 1
Classes | Public Member Functions | Private Attributes | List of all members
slideshow::internal::Shape Class Referenceabstract

Represents a slide's shape object. More...

#include <shape.hxx>

Inheritance diagram for slideshow::internal::Shape:
[legend]

Classes

struct  lessThanShape
 Functor struct, for shape ordering. More...
 

Public Member Functions

 Shape ()
 
virtual ~Shape ()
 
 Shape (const Shape &)=delete
 
Shapeoperator= (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...
 

Private Attributes

bool mbIsForeground
 Flag to check whether the shape belongs to the foreground. More...
 

Detailed Description

Represents a slide's shape object.

This interface represents the view-independent aspects of a slide's shape, providing bound rect, underlying XShape and basic paint methods.

Definition at line 50 of file shape.hxx.

Constructor & Destructor Documentation

◆ Shape() [1/2]

slideshow::internal::Shape::Shape ( )
inline

Definition at line 53 of file shape.hxx.

◆ ~Shape()

virtual slideshow::internal::Shape::~Shape ( )
inlinevirtual

Definition at line 54 of file shape.hxx.

◆ Shape() [2/2]

slideshow::internal::Shape::Shape ( const Shape )
delete

Member Function Documentation

◆ addViewLayer()

virtual void slideshow::internal::Shape::addViewLayer ( const ViewLayerSharedPtr rNewLayer,
bool  bRedrawLayer 
)
pure virtual

Add a new view layer.

This method adds a new view layer, this shape shall show itself on.

Parameters
rNewLayerNew layer to show on
bRedrawLayerRedraw shape on given layer

Implemented in slideshow::internal::DrawShape.

◆ clearAllViewLayers()

virtual void slideshow::internal::Shape::clearAllViewLayers ( )
pure virtual

Withdraw all view layers at once.

This method will be faster than repeated removeViewLayer() calls.

Implemented in slideshow::internal::DrawShape.

◆ getBounds()

virtual ::basegfx::B2DRectangle slideshow::internal::Shape::getBounds ( ) const
pure virtual

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).

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

◆ getDomBounds()

virtual ::basegfx::B2DRectangle slideshow::internal::Shape::getDomBounds ( ) const
pure virtual

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).

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

◆ getPriority()

virtual double slideshow::internal::Shape::getPriority ( ) const
pure virtual

Get the shape priority.

The shape priority defines the relative order of the shapes on the slide.

Returns
the priority. Will be in the [0,+infty) range.

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

Referenced by slideshow::internal::Shape::lessThanShape::compare().

◆ getUpdateArea()

virtual ::basegfx::B2DRectangle slideshow::internal::Shape::getUpdateArea ( ) const
pure virtual

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().

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

◆ getXShape()

virtual css::uno::Reference< css::drawing::XShape > slideshow::internal::Shape::getXShape ( ) const
pure virtual

Get the associated XShape of this shape.

Returns
the associated XShape. If this method returns an empty reference, this object might be one of the special-purpose shapes of a slide, which have no direct corresponding XShape (the background comes to mind here).

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

◆ isBackgroundDetached()

virtual bool slideshow::internal::Shape::isBackgroundDetached ( ) const
pure virtual

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).

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

◆ isContentChanged()

virtual bool slideshow::internal::Shape::isContentChanged ( ) const
pure virtual

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).

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

◆ isForeground()

virtual bool slideshow::internal::Shape::isForeground ( ) const
inlinevirtual

Check whether the shape belongs to the foreground.

For instance, if the shape is in the master slide it does not belong to the foreground.

Returns
true if the shape is on the foreground

Definition at line 212 of file shape.hxx.

References mbIsForeground.

◆ isVisible()

virtual bool slideshow::internal::Shape::isVisible ( ) const
pure virtual

Query whether the shape is visible at all.

Returns
true, if this shape is visible, false otherwise.

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

◆ operator=()

Shape & slideshow::internal::Shape::operator= ( const Shape )
delete

◆ removeViewLayer()

virtual bool slideshow::internal::Shape::removeViewLayer ( const ViewLayerSharedPtr rNewLayer)
pure virtual

Withdraw the shape from a view layer.

This method removes the shape from the given view layer.

Returns
true, if the shape was successfully removed

Implemented in slideshow::internal::DrawShape.

◆ render()

virtual bool slideshow::internal::Shape::render ( ) const
pure virtual

Render the shape.

This method renders the shape on all registered view layers, regardless of whether shape content has changed or not.

Returns
whether the rendering finished successfully.

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

◆ setIsForeground()

virtual void slideshow::internal::Shape::setIsForeground ( const bool  bIsForeground)
inlinevirtual

Set the flag that holds whether the shape is in the foreground or not.

Parameters
bIsForegroundShape is on the foreground

Definition at line 221 of file shape.hxx.

References mbIsForeground.

◆ update()

virtual bool slideshow::internal::Shape::update ( ) const
pure virtual

Update the shape.

This method updates the Shape on all registered view layers, but only if shape content has actually changed.

Returns
whether the update finished successfully.

Implemented in slideshow::internal::DrawShape, and slideshow::internal::ExternalShapeBase.

Member Data Documentation

◆ mbIsForeground

bool slideshow::internal::Shape::mbIsForeground
private

Flag to check whether the shape belongs to the foreground.

For instance, it is false if the shape belongs to the master slide.

Definition at line 272 of file shape.hxx.

Referenced by isForeground(), and setIsForeground().


The documentation for this class was generated from the following file: