LibreOffice Module sdext (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sdext::presenter::PresenterSprite Class Referencefinal

A wrapper around a css::rendering::XCustomSprite that allows not only setting values like size, location, and transformation but also provides read access to them. More...

#include <PresenterSprite.hxx>

Public Member Functions

 PresenterSprite ()
 
 ~PresenterSprite ()
 
 PresenterSprite (const PresenterSprite &)=delete
 
PresenterSpriteoperator= (const PresenterSprite &)=delete
 
void SetFactory (const css::uno::Reference< css::rendering::XSpriteCanvas > &rxSpriteFactory)
 The given sprite canvas is used as factory to create the sprite that is wrapped by objects of this class. More...
 
css::uno::Reference< css::rendering::XCanvas > GetCanvas ()
 
void Show ()
 
void Hide ()
 
void Resize (const css::geometry::RealSize2D &rSize)
 
void MoveTo (const css::geometry::RealPoint2D &rLocation)
 
void Update ()
 

Private Member Functions

void ProvideSprite ()
 
void DisposeSprite ()
 

Private Attributes

css::uno::Reference< css::rendering::XSpriteCanvas > mxSpriteFactory
 
css::uno::Reference< css::rendering::XCustomSprite > mxSprite
 
css::geometry::RealSize2D maSize
 
css::geometry::RealPoint2D maLocation
 
bool mbIsVisible
 

Detailed Description

A wrapper around a css::rendering::XCustomSprite that allows not only setting values like size, location, and transformation but also provides read access to them.

It also handles the showing and hiding of a sprite. This includes not to show the sprite when its size is not yet defined (results in a crash) and hiding a sprite before disposing it (results in zombie sprites.)

Definition at line 35 of file PresenterSprite.hxx.

Constructor & Destructor Documentation

sdext::presenter::PresenterSprite::PresenterSprite ( )

Definition at line 33 of file PresenterSprite.cxx.

References mxSprite.

sdext::presenter::PresenterSprite::~PresenterSprite ( )

Definition at line 42 of file PresenterSprite.cxx.

References mxSprite, and xComponent.

sdext::presenter::PresenterSprite::PresenterSprite ( const PresenterSprite )
delete

Member Function Documentation

void sdext::presenter::PresenterSprite::DisposeSprite ( )
private

Definition at line 151 of file PresenterSprite.cxx.

References mxSprite, and xComponent.

Referenced by Resize(), and SetFactory().

css::uno::Reference< css::rendering::XCanvas > sdext::presenter::PresenterSprite::GetCanvas ( )

Definition at line 66 of file PresenterSprite.cxx.

References mxSprite, and ProvideSprite().

void sdext::presenter::PresenterSprite::Hide ( )

Definition at line 84 of file PresenterSprite.cxx.

References mbIsVisible, and mxSprite.

void sdext::presenter::PresenterSprite::MoveTo ( const css::geometry::RealPoint2D &  rLocation)

Definition at line 100 of file PresenterSprite.cxx.

References maLocation, and mxSprite.

PresenterSprite& sdext::presenter::PresenterSprite::operator= ( const PresenterSprite )
delete
void sdext::presenter::PresenterSprite::ProvideSprite ( )
private

Definition at line 123 of file PresenterSprite.cxx.

References maLocation, maSize, mbIsVisible, mxSprite, and mxSpriteFactory.

Referenced by GetCanvas(), Resize(), SetFactory(), and Show().

void sdext::presenter::PresenterSprite::Resize ( const css::geometry::RealSize2D &  rSize)

Definition at line 91 of file PresenterSprite.cxx.

References DisposeSprite(), maSize, mbIsVisible, mxSprite, and ProvideSprite().

void sdext::presenter::PresenterSprite::SetFactory ( const css::uno::Reference< css::rendering::XSpriteCanvas > &  rxSpriteFactory)

The given sprite canvas is used as factory to create the sprite that is wrapped by objects of this class.

It is also used to call updateScreen() at (wrapped by the Update() method).

Definition at line 54 of file PresenterSprite.cxx.

References DisposeSprite(), mbIsVisible, mxSpriteFactory, and ProvideSprite().

void sdext::presenter::PresenterSprite::Show ( )

Definition at line 75 of file PresenterSprite.cxx.

References mbIsVisible, mxSprite, and ProvideSprite().

void sdext::presenter::PresenterSprite::Update ( )

Definition at line 117 of file PresenterSprite.cxx.

References mxSpriteFactory.

Member Data Documentation

css::geometry::RealPoint2D sdext::presenter::PresenterSprite::maLocation
private

Definition at line 64 of file PresenterSprite.hxx.

Referenced by MoveTo(), and ProvideSprite().

css::geometry::RealSize2D sdext::presenter::PresenterSprite::maSize
private

Definition at line 63 of file PresenterSprite.hxx.

Referenced by ProvideSprite(), and Resize().

bool sdext::presenter::PresenterSprite::mbIsVisible
private

Definition at line 65 of file PresenterSprite.hxx.

Referenced by Hide(), ProvideSprite(), Resize(), SetFactory(), and Show().

css::uno::Reference<css::rendering::XCustomSprite> sdext::presenter::PresenterSprite::mxSprite
private
css::uno::Reference<css::rendering::XSpriteCanvas> sdext::presenter::PresenterSprite::mxSpriteFactory
private

Definition at line 61 of file PresenterSprite.hxx.

Referenced by ProvideSprite(), SetFactory(), and Update().


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