Gorgon Game Engine
basic_RectangleProvider< A_ > Class Template Reference

This class allows instancing of a rectangle like image that is made out of three parts. More...

Inheritance diagram for basic_RectangleProvider< A_ >:
[legend]

Public Types

using AnimationType = Rectangle
 
- Public Types inherited from RectangularAnimationProvider
using AnimationType = RectangularAnimation
 
- Public Types inherited from AnimationProvider
using AnimationType = Animation
 
- Public Types inherited from Provider
using AnimationType = Base
 

Public Member Functions

 basic_RectangleProvider ()
 Empty constructor, rectangle can be instanced even if it is completely empty. More...
 
 basic_RectangleProvider (A_ &&border)
 Filling constructor using move semantics, rectangle will create and own new object. More...
 
 basic_RectangleProvider (A_ &&border, A_ &&center)
 Filling constructor using move semantics, rectangle will create and own new objects. More...
 
 basic_RectangleProvider (A_ &&tl, A_ &&tm, A_ &&tr, A_ &&ml, A_ &&mm, A_ &&mr, A_ &&bl, A_ &&bm, A_ &&br)
 Filling constructor using move semantics, rectangle will create and own new objects. More...
 
 basic_RectangleProvider (A_ &border)
 Filling constructor. More...
 
 basic_RectangleProvider (A_ &border, A_ &center)
 Filling constructor. More...
 
 basic_RectangleProvider (A_ &tl, A_ &tm, A_ &tr, A_ &ml, A_ &mm, A_ &mr, A_ &bl, A_ &bm, A_ &br)
 Filling constructor. More...
 
 basic_RectangleProvider (A_ *tl, A_ *tm, A_ *tr, A_ *ml, A_ *mm, A_ *mr, A_ *bl, A_ *bm, A_ *br)
 Filling constructor, nullptr is acceptable. More...
 
 basic_RectangleProvider (basic_RectangleProvider &&other)
 Move constructor. More...
 
 basic_RectangleProvider (const basic_RectangleProvider &)=delete
 
 ~basic_RectangleProvider ()
 
RectangleCreateAnimation (bool create=true) const override
 This function should create and animation and depending on the create parameter, it should create its own timer. More...
 
RectangleCreateAnimation (Gorgon::Animation::ControllerBase &timer) const override
 This function should create a new animation with the given controller and if owner parameter is set to true, it should assume ownership of the controller. More...
 
virtual RectangularAnimationCreateBL () const override
 Creates an animation without controller. This function should always return an animation. More...
 
virtual RectangularAnimationCreateBM () const override
 Creates an animation without controller. This function should always return an animation. More...
 
virtual RectangularAnimationCreateBR () const override
 Creates an animation without controller. This function should always return an animation. More...
 
virtual RectangularAnimationCreateML () const override
 Creates an animation without controller. This function should always return an animation. More...
 
virtual RectangularAnimationCreateMM () const override
 Creates an animation without controller. This function should always return an animation. More...
 
virtual RectangularAnimationCreateMR () const override
 Creates an animation without controller. This function should always return an animation. More...
 
virtual RectangularAnimationCreateTL () const override
 Creates an animation without controller. This function should always return an animation. More...
 
virtual RectangularAnimationCreateTM () const override
 Creates an animation without controller. This function should always return an animation. More...
 
virtual RectangularAnimationCreateTR () const override
 Creates an animation without controller. This function should always return an animation. More...
 
A_ * GetBL () const
 Returns BL provider, may return nullptr. More...
 
A_ * GetBM () const
 Returns BM provider, may return nullptr. More...
 
A_ * GetBR () const
 Returns BR provider, may return nullptr. More...
 
A_ * GetML () const
 Returns ML provider, may return nullptr. More...
 
A_ * GetMM () const
 Returns MM provider, may return nullptr. More...
 
A_ * GetMR () const
 Returns MR provider, may return nullptr. More...
 
Geometry::Size GetSize () const override
 
A_ * GetTL () const
 Returns TL provider, may return nullptr. More...
 
A_ * GetTM () const
 Returns TM provider, may return nullptr. More...
 
A_ * GetTR () const
 Returns TR provider, may return nullptr. More...
 
virtual auto MoveOutProvider () -> decltype(*this) override
 This function moves this animation provider into a new provider. More...
 
basic_RectangleProvideroperator= (const basic_RectangleProvider &)=delete
 
void OwnProviders ()
 Issuing this function will make this rectangle to own its providers, destroying them along with itself. More...
 
void Prepare ()
 Prepares all animation providers if the they support Prepare function. More...
 
void SetBL (A_ *value)
 Changes the BL animation, ownership semantics will not change. More...
 
void SetBM (A_ *value)
 Changes the BM animation, ownership semantics will not change. More...
 
void SetBR (A_ *value)
 Changes the BR animation, ownership semantics will not change. More...
 
void SetML (A_ *value)
 Changes the ML animation, ownership semantics will not change. More...
 
void SetMM (A_ *value)
 Changes the MM animation, ownership semantics will not change. More...
 
void SetMR (A_ *value)
 Changes the MR animation, ownership semantics will not change. More...
 
void SetTL (A_ *value)
 Changes the TL animation, ownership semantics will not change. More...
 
void SetTM (A_ *value)
 Changes the TM animation, ownership semantics will not change. More...
 
void SetTR (A_ *value)
 Changes the TR animation, ownership semantics will not change. More...
 
- Public Member Functions inherited from IRectangleProvider
 IRectangleProvider ()
 
virtual bool GetCenterTiling () const
 Returns if the middle part will be tiled. More...
 
virtual bool GetSideTiling () const
 Returns if the middle part will be tiled. More...
 
virtual void SetCenterTiling (bool value)
 Sets whether the middle part would be tiled. More...
 
virtual void SetSideTiling (bool value)
 Sets whether the side parts (tm, ml, mr, bm) would be tiled. More...
 
- Public Member Functions inherited from RectangularAnimationProvider
int GetHeight () const
 
int GetWidth () const
 
- Public Member Functions inherited from AnimationProvider
virtual ~AnimationProvider ()
 
- Public Member Functions inherited from Provider
virtual ~Provider ()
 Virtual destructor. More...
 

Detailed Description

template<class A_>
class Gorgon::Graphics::basic_RectangleProvider< A_ >

This class allows instancing of a rectangle like image that is made out of three parts.

The first part is the start of the rectangle, the second part is the middle and the third part is the end of the rectangle. Middle part can be repeated or stretched. A rectangle provider can have empty animations. Provider will use EmptyImage for missing parts. A_ must derive from RectangularAnimationProvider. For best results, try to keep size of parts compatible. If an image is smaller, it will be placed towards the center. Part names follows a logic, first letter is vertical location, second is horizontal. For instance TL is top left, ML is directly the left of the middle section. Any part that has an M in it will be scaled/tiled.

Member Typedef Documentation

◆ AnimationType

Constructor & Destructor Documentation

◆ basic_RectangleProvider() [1/10]

Empty constructor, rectangle can be instanced even if it is completely empty.

◆ basic_RectangleProvider() [2/10]

◆ basic_RectangleProvider() [3/10]

basic_RectangleProvider ( A_ &  tl,
A_ &  tm,
A_ &  tr,
A_ &  ml,
A_ &  mm,
A_ &  mr,
A_ &  bl,
A_ &  bm,
A_ &  br 
)

Filling constructor.

◆ basic_RectangleProvider() [4/10]

basic_RectangleProvider ( A_ &&  tl,
A_ &&  tm,
A_ &&  tr,
A_ &&  ml,
A_ &&  mm,
A_ &&  mr,
A_ &&  bl,
A_ &&  bm,
A_ &&  br 
)

Filling constructor using move semantics, rectangle will create and own new objects.

The given objects will be moved to these new objects.

◆ basic_RectangleProvider() [5/10]

basic_RectangleProvider ( A_ &  border)
explicit

Filling constructor.

The given object will be used for the borders. Center will be empty

◆ basic_RectangleProvider() [6/10]

basic_RectangleProvider ( A_ &&  border)
explicit

Filling constructor using move semantics, rectangle will create and own new object.

The given object will be moved to this new object. The given object will be used for the borders

◆ basic_RectangleProvider() [7/10]

basic_RectangleProvider ( A_ &  border,
A_ &  center 
)

Filling constructor.

The first given object will be used for the borders. The second will be used for the center

◆ basic_RectangleProvider() [8/10]

basic_RectangleProvider ( A_ &&  border,
A_ &&  center 
)
explicit

Filling constructor using move semantics, rectangle will create and own new objects.

The given objects will be moved to these new objects. The first object will be used for the borders, the second will be used for center

◆ basic_RectangleProvider() [9/10]

basic_RectangleProvider ( A_ *  tl,
A_ *  tm,
A_ *  tr,
A_ *  ml,
A_ *  mm,
A_ *  mr,
A_ *  bl,
A_ *  bm,
A_ *  br 
)

Filling constructor, nullptr is acceptable.

◆ basic_RectangleProvider() [10/10]

◆ ~basic_RectangleProvider()

Member Function Documentation

◆ CreateAnimation() [1/2]

Rectangle& CreateAnimation ( bool  create = true) const
overridevirtual

This function should create and animation and depending on the create parameter, it should create its own timer.

Implements RectangularAnimationProvider.

◆ CreateAnimation() [2/2]

Rectangle& CreateAnimation ( Gorgon::Animation::ControllerBase timer) const
overridevirtual

This function should create a new animation with the given controller and if owner parameter is set to true, it should assume ownership of the controller.

Implements RectangularAnimationProvider.

◆ CreateBL()

virtual RectangularAnimation& CreateBL ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ CreateBM()

virtual RectangularAnimation& CreateBM ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ CreateBR()

virtual RectangularAnimation& CreateBR ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ CreateML()

virtual RectangularAnimation& CreateML ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ CreateMM()

virtual RectangularAnimation& CreateMM ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ CreateMR()

virtual RectangularAnimation& CreateMR ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ CreateTL()

virtual RectangularAnimation& CreateTL ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ CreateTM()

virtual RectangularAnimation& CreateTM ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ CreateTR()

virtual RectangularAnimation& CreateTR ( ) const
overridevirtual

Creates an animation without controller. This function should always return an animation.

Implements IRectangleProvider.

References EmptyImage::Instance().

◆ GetBL()

A_* GetBL ( ) const

Returns BL provider, may return nullptr.

◆ GetBM()

A_* GetBM ( ) const

Returns BM provider, may return nullptr.

◆ GetBR()

A_* GetBR ( ) const

Returns BR provider, may return nullptr.

◆ GetML()

A_* GetML ( ) const

Returns ML provider, may return nullptr.

◆ GetMM()

A_* GetMM ( ) const

Returns MM provider, may return nullptr.

◆ GetMR()

A_* GetMR ( ) const

Returns MR provider, may return nullptr.

◆ GetSize()

Geometry::Size GetSize ( ) const
overridevirtual

◆ GetTL()

A_* GetTL ( ) const

Returns TL provider, may return nullptr.

◆ GetTM()

A_* GetTM ( ) const

Returns TM provider, may return nullptr.

◆ GetTR()

A_* GetTR ( ) const

Returns TR provider, may return nullptr.

◆ MoveOutProvider()

virtual auto MoveOutProvider ( ) -> decltype(*this)
overridevirtual

This function moves this animation provider into a new provider.

Ownership of this new object belongs to the caller and this object could be destroyed safely.

Implements IRectangleProvider.

◆ operator=()

basic_RectangleProvider& operator= ( const basic_RectangleProvider< A_ > &  )
delete

◆ OwnProviders()

void OwnProviders ( )

Issuing this function will make this rectangle to own its providers, destroying them along with itself.

◆ Prepare()

void Prepare ( )

Prepares all animation providers if the they support Prepare function.

◆ SetBL()

void SetBL ( A_ *  value)

Changes the BL animation, ownership semantics will not change.

◆ SetBM()

void SetBM ( A_ *  value)

Changes the BM animation, ownership semantics will not change.

◆ SetBR()

void SetBR ( A_ *  value)

Changes the BR animation, ownership semantics will not change.

◆ SetML()

void SetML ( A_ *  value)

Changes the ML animation, ownership semantics will not change.

◆ SetMM()

void SetMM ( A_ *  value)

Changes the MM animation, ownership semantics will not change.

◆ SetMR()

void SetMR ( A_ *  value)

Changes the MR animation, ownership semantics will not change.

◆ SetTL()

void SetTL ( A_ *  value)

Changes the TL animation, ownership semantics will not change.

◆ SetTM()

void SetTM ( A_ *  value)

Changes the TM animation, ownership semantics will not change.

◆ SetTR()

void SetTR ( A_ *  value)

Changes the TR animation, ownership semantics will not change.


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