![]() |
Gorgon Game Engine
|
Public Member Functions | |
Rectangle ()=default | |
Creates an empty rectangle. More... | |
Rectangle (Graphics::AnimatedBitmapRectangleProvider &&prov) | |
Creates a new rectangle using another rectangle provider. More... | |
Rectangle (Graphics::AnimatedBitmapRectangleProvider &prov) | |
Creates a new rectangle using another rectangle provider. More... | |
Rectangle (Graphics::BitmapRectangleProvider &&prov) | |
Creates a new rectangle using another rectangle provider. More... | |
Rectangle (Graphics::BitmapRectangleProvider &prov) | |
Creates a new rectangle using another rectangle provider. More... | |
Rectangle (Graphics::RectangleProvider &&prov) | |
Creates a new rectangle using another rectangle provider. More... | |
Rectangle (Graphics::RectangleProvider &prov) | |
Creates a new rectangle using another rectangle provider. More... | |
void | AssumeProvider (Graphics::AnimatedBitmapRectangleProvider &value) |
Changes the provider stored in this line, ownership will be transferred. More... | |
void | AssumeProvider (Graphics::BitmapRectangleProvider &value) |
Changes the provider stored in this line, ownership will be transferred. More... | |
void | AssumeProvider (Graphics::RectangleProvider &value) |
Changes the provider stored in this line, ownership will be transferred. More... | |
virtual Gorgon::Graphics::Rectangle & | CreateAnimation (bool create=true) const override |
This function should create and animation and depending on the create parameter, it should create its own timer. More... | |
virtual Gorgon::Graphics::Rectangle & | CreateAnimation (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 Graphics::RectangularAnimation & | CreateBL () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual Graphics::RectangularAnimation & | CreateBM () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual Graphics::RectangularAnimation & | CreateBR () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual Graphics::RectangularAnimation & | CreateML () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual Graphics::RectangularAnimation & | CreateMM () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual Graphics::RectangularAnimation & | CreateMR () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual Graphics::RectangularAnimation & | CreateTL () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual Graphics::RectangularAnimation & | CreateTM () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual Graphics::RectangularAnimation & | CreateTR () const override |
Creates an animation without controller. This function should always return an animation. More... | |
virtual bool | GetCenterTiling () const override |
Returns if the middle part will be tiled. More... | |
GID::Type | GetGID () const override |
This function shall return Gorgon ID of this resource. More... | |
virtual bool | GetSideTiling () const override |
Returns if the middle part will be tiled. More... | |
virtual Geometry::Size | GetSize () const override |
Graphics::IRectangleProvider & | MoveOutProvider () override |
This function moves this animation provider into a new provider. More... | |
void | RemoveProvider () |
Removes the provider, if it is own by this resource it will be deleted. More... | |
virtual void | SetCenterTiling (bool value) override |
Sets whether the middle part would be tiled. More... | |
void | SetProvider (Graphics::AnimatedBitmapRectangleProvider &value) |
Changes provider to the given provider, ownership will not be transferred. More... | |
void | SetProvider (Graphics::BitmapRectangleProvider &value) |
Changes provider to the given provider, ownership will not be transferred. More... | |
void | SetProvider (Graphics::RectangleProvider &value) |
Changes provider to the given provider, ownership will not be transferred. More... | |
virtual void | SetSideTiling (bool value) override |
Sets whether the side parts (tm, ml, mr, bm) would be tiled. More... | |
![]() | |
IRectangleProvider () | |
![]() | |
int | GetHeight () const |
int | GetWidth () const |
![]() | |
virtual | ~AnimationProvider () |
![]() | |
virtual | ~Provider () |
Virtual destructor. More... | |
![]() | |
Graphics::RectangularAnimationStorage | MoveOut () |
Moves this animation out as a generic value type animation. More... | |
![]() | |
Base () | |
Default constructor. More... | |
const Containers::Collection< Base >::ConstIterator | begin () const |
Allows easy iteration through range based fors. More... | |
const Containers::Collection< Base >::ConstIterator | cbegin () const |
Beginning of children. More... | |
const Containers::Collection< Base >::ConstIterator | cend () const |
End of children. More... | |
bool | DeleteResource () |
Safely deletes the resource. More... | |
virtual void | Discard () |
This function shall discard any transitional data which is not vital after Prepare function is issued. More... | |
const Containers::Collection< Base >::ConstIterator | end () const |
Allows easy iteration through range based fors. More... | |
virtual SGuid | GetGuid () const |
Returns the guid of the object. More... | |
const std::string & | GetName () const |
Returns the name of this object. More... | |
Base & | GetParent () const |
Returns the parent. If no parent set, this function throws std::runtime_error. More... | |
Base * | GetParentPtr () const |
Returns the pointer to the parent. This function may return nullptr. More... | |
const Base & | GetRoot () const |
Returns the root of this resource. More... | |
bool | HasParent () const |
Returns whether this object has a parent. More... | |
virtual bool | IsEqual (const SGuid &guid) const |
This function tests whether this object has the given SGuid. More... | |
virtual void | Prepare () |
This function shall prepare this resource to be used after resource is loaded. More... | |
virtual void | Resolve (File &file) |
This function shall resolve links or similar constructs. More... | |
void | Save (Writer &writer) |
Saves this object into the given writer. The writer should be open prior to this call. More... | |
virtual void | SetGuid (SGuid guid) |
Changes the guid of the object. More... | |
virtual void | SetName (const std::string &name) |
Sets the name of the object. More... | |
Static Public Member Functions | |
static Rectangle * | LoadResource (std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long size) |
This function loads a rectangle resource from the file. More... | |
static void | SaveThis (Writer &writer, const Graphics::IRectangleProvider &provider) |
Protected Member Functions | |
virtual Graphics::RectangularAnimationStorage | animmoveout () override |
void | save (Writer &writer) const override |
![]() | |
virtual | ~Base () |
Destructor, Always children gets destroyed first. More... | |
void | destroychildren () |
Destroys the children of this resource. More... | |
void | setparenttonullptr (Base &base) |
Sets the parent of an object to nullptr, provides access. More... | |
Additional Inherited Members | |
![]() | |
using | AnimationType = RectangularAnimation |
![]() | |
using | AnimationType = Animation |
![]() | |
using | AnimationType = Base |
![]() | |
const Containers::Collection< Base > & | Children |
The children this object have. More... | |
unsigned long | refcount |
INTERNAL, Reference count, used in linking mechanism. More... | |
![]() | |
Containers::Collection< Base > | children |
Child objects that this resource object have. More... | |
SGuid | guid |
SGuid to identify this resource object. More... | |
std::string | name |
Name of this resource object, may not be loaded. More... | |
Base * | parent |
Immediate parent of this resource. More... | |
const Base * | root |
Root of this resource. More... | |
|
explicit |
Creates a new rectangle using another rectangle provider.
|
explicit |
Creates a new rectangle using another rectangle provider.
|
explicit |
Creates a new rectangle using another rectangle provider.
|
explicit |
Creates a new rectangle using another rectangle provider.
|
explicit |
Creates a new rectangle using another rectangle provider.
|
explicit |
Creates a new rectangle using another rectangle provider.
|
default |
Creates an empty rectangle.
|
overrideprotectedvirtual |
Implements AnimationStorage.
References Rectangle::MoveOutProvider().
void AssumeProvider | ( | Graphics::AnimatedBitmapRectangleProvider & | value | ) |
Changes the provider stored in this line, ownership will be transferred.
References Rectangle::RemoveProvider().
void AssumeProvider | ( | Graphics::BitmapRectangleProvider & | value | ) |
Changes the provider stored in this line, ownership will be transferred.
References Rectangle::RemoveProvider().
void AssumeProvider | ( | Graphics::RectangleProvider & | value | ) |
Changes the provider stored in this line, ownership will be transferred.
References Rectangle::RemoveProvider().
|
overridevirtual |
This function should create and animation and depending on the create parameter, it should create its own timer.
Implements RectangularAnimationProvider.
References basic_RectangleProvider< A_ >::CreateAnimation().
|
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.
References basic_RectangleProvider< A_ >::CreateAnimation().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateBL().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateBM().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateBR().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateML().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateMM().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateMR().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateTL().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateTM().
|
overridevirtual |
Creates an animation without controller. This function should always return an animation.
Implements IRectangleProvider.
References basic_RectangleProvider< A_ >::CreateTR().
|
overridevirtual |
Returns if the middle part will be tiled.
Reimplemented from IRectangleProvider.
References IRectangleProvider::GetCenterTiling().
|
overridevirtual |
This function shall return Gorgon ID of this resource.
Implements Base.
References Gorgon::Resource::GID::Rectangle.
|
overridevirtual |
Returns if the middle part will be tiled.
Reimplemented from IRectangleProvider.
References IRectangleProvider::GetSideTiling().
|
overridevirtual |
Implements RectangularAnimationProvider.
References basic_RectangleProvider< A_ >::GetSize().
|
static |
This function loads a rectangle resource from the file.
References Rectangle::Rectangle().
|
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.
References IRectangleProvider::IRectangleProvider(), and Base::children.
void RemoveProvider | ( | ) |
Removes the provider, if it is own by this resource it will be deleted.
|
overrideprotectedvirtual |
Implements Base.
References Writer::WriteEnd(), and Writer::WriteObjectStart().
|
static |
References Gorgon::Resource::GID::Rectangle, Writer::WriteChunkStart(), and Writer::WriteEnd().
|
overridevirtual |
Sets whether the middle part would be tiled.
If set to false it will be stretched to fit the given area. Instances will require redrawing before this change is reflected. This effects both dimensions. Tiling is recommended for all applications.
Reimplemented from IRectangleProvider.
References IRectangleProvider::SetCenterTiling().
void SetProvider | ( | Graphics::AnimatedBitmapRectangleProvider & | value | ) |
Changes provider to the given provider, ownership will not be transferred.
References Rectangle::RemoveProvider().
void SetProvider | ( | Graphics::BitmapRectangleProvider & | value | ) |
Changes provider to the given provider, ownership will not be transferred.
References Rectangle::RemoveProvider().
void SetProvider | ( | Graphics::RectangleProvider & | value | ) |
Changes provider to the given provider, ownership will not be transferred.
References Rectangle::RemoveProvider().
|
overridevirtual |
Sets whether the side parts (tm, ml, mr, bm) would be tiled.
If set to false it will be stretched to fit the given area. Instances will require redrawing before this change is reflected. Tiling is recommended for all applications.
Reimplemented from IRectangleProvider.
References IRectangleProvider::SetSideTiling().