YAPOG  0.0.1
Yet Another Pokemon Online Game
yap::WidgetBorder Class Reference

#include <WidgetBorder.hpp>

Inheritance diagram for yap::WidgetBorder:
Collaboration diagram for yap::WidgetBorder:

List of all members.

Classes

struct  EventArgsTexture

Public Member Functions

 WidgetBorder ()
 WidgetBorder (String file)
 WidgetBorder (Texture &top, Texture &topRight, Texture &right, Texture &botRight, Texture &bot, Texture &botLeft, Texture &left, Texture &topLeft, bool isScalable)
virtual ~WidgetBorder ()
virtual bool IsFocusable () const
void SetBorder (Vector2 size, uint width)
void SetBorder (Vector2 size)
const TextureGetTexture () const
void SetScalable (bool state)
uint GetWidth () const
- Public Member Functions inherited from yap::BaseWidget
 BaseWidget ()
virtual ~BaseWidget ()
virtual void AddDrawable (IDrawable &drawable)
virtual void AddChild (IWidget &child)
virtual void FrontAddChild (IWidget &child)
virtual void RemoveChild (IWidget &child)
virtual IWidgetGetRoot () const
virtual void SetDefaultColor (const sf::Color &color)
virtual void SetParent (IWidget &parent)
virtual void SetPadding (const Padding &padding)
virtual void SetBackground (WidgetBackground &background)
virtual void SetBorder (WidgetBorder &border, uint width)
virtual void SetBorder (WidgetBorder &border)
virtual void UnsetBackground ()
virtual void UnsetBorder ()
Vector2 GetUserSize () const
virtual void SetToTop ()
virtual void SetEnable (bool enable)
virtual void Open ()
virtual void Close ()
virtual const Vector2GetPosition () const
 Gets the coordinates in pixels of the origin of this ISpatial from the global origin.
virtual const Vector2GetSize () const
 Gets the size in pixels of this ISpatial.
virtual const Vector2GetTopLeft () const
virtual const Vector2GetBottomRight () const
virtual const Vector2GetCenter () const
virtual const sf::FloatRect & GetRectangle () const
virtual WidgetBorderGetBorder () const
virtual void Move (const Vector2 &offset)
virtual void Scale (const Vector2 &factor)
virtual void SetPosition (const Vector2 &position)
virtual void SetSize (const Vector2 &size)
virtual void Draw (IDrawingContext &context)
virtual bool IsVisible () const
virtual void Show (bool isVisible)
virtual void ChangeColor (const sf::Color &color)
virtual bool OnEvent (const GuiEvent &guiEvent)
 Treats an event. Transferts the event before treating it.
virtual bool OnPriorityEvent (const GuiEvent &guiEvent)
 Treats an event. Treats the event before transfering it.
virtual void Update (const Time &dt)
 Makes the object evolve for one frame of the game.
- Public Member Functions inherited from yap::IWidget
virtual ~IWidget ()
- Public Member Functions inherited from yap::ISpatial
virtual ~ISpatial ()
- Public Member Functions inherited from yap::IDrawable
virtual ~IDrawable ()
- Public Member Functions inherited from yap::IEventHandler
virtual ~IEventHandler ()
- Public Member Functions inherited from yap::IUpdateable
virtual ~IUpdateable ()

Public Attributes

Event< const WidgetBorder
&, const EventArgsTexture & > 
OnBorderSet
- Public Attributes inherited from yap::BaseWidget
Event< const BaseWidget
&, const EventArgs & > 
OnMoved
Event< const BaseWidget
&, const EventArgs & > 
OnScaled
Event< const BaseWidget
&, const EventArgs & > 
OnSizeSet
Event< const BaseWidget
&, const EventArgsDraw & > 
OnDraw
Event< const BaseWidget
&, const EventArgsColor & > 
OnColorChanged
Event< const BaseWidget
&, const EventArgsIWidget & > 
OnChildAdded

Private Member Functions

 DISALLOW_COPY (WidgetBorder)
uint GetTextureWidth () const
virtual Vector2 HandleGetSize () const
virtual void HandleMove (const Vector2 &offset)
virtual void HandleScale (const Vector2 &factor)
virtual void HandleDraw (IDrawingContext &context)
virtual void HandleShow (bool isVisible)
virtual void HandleChangeColor (const sf::Color &color)
virtual void HandleUpdate (const Time &dt)

Private Attributes

Textureborder_
String file_
collection::Array< Texture * > textures_
collection::Array
< TextureManager * > 
tms_
TextureManagertmTop_
TextureManagertmBottom_
TextureManagertmLeft_
TextureManagertmRight_
uint width_
bool isInit
bool basic_
bool isScalable_

Additional Inherited Members

- Protected Member Functions inherited from yap::BaseWidget
void RefreshBorder ()
virtual void SetFocused (bool state)
virtual void Refresh ()
virtual bool HandleOnEvent (const GuiEvent &guiEvent)
virtual bool HandleOnPriorityEvent (const GuiEvent &guiEvent)
- Protected Attributes inherited from yap::BaseWidget
SpatialInfo spatialInfo_
bool isVisible_
bool isEnabled_
sf::Color color_
collection::List< IDrawable * > drawables_
collection::List< IEventHandler * > eventHandlers_
collection::List< IWidget * > childen_
collection::List< IUpdateable * > updatables_
IWidgetroot_
IWidgetparent_
Padding padding_
WidgetBackgroundbackground_
Vector2 userSize_
bool isExtensible_
bool isFocused_
sf::Color userColor_
bool isChangeColorCall_
- Static Protected Attributes inherited from yap::BaseWidget
static const bool DEFAULT_VISIBLE_STATE = true
static const bool DEFAULT_ENABLED_STATE = true
static const sf::Color DEFAULT_COLOR = sf::Color::Black

Detailed Description

Definition at line 12 of file WidgetBorder.hpp.


Constructor & Destructor Documentation

yap::WidgetBorder::WidgetBorder ( )

Definition at line 8 of file WidgetBorder.cpp.

yap::WidgetBorder::WidgetBorder ( String  file)

Definition at line 29 of file WidgetBorder.cpp.

yap::WidgetBorder::WidgetBorder ( Texture top,
Texture topRight,
Texture right,
Texture botRight,
Texture bot,
Texture botLeft,
Texture left,
Texture topLeft,
bool  isScalable 
)

Definition at line 45 of file WidgetBorder.cpp.

Here is the call graph for this function:

yap::WidgetBorder::~WidgetBorder ( )
virtual

Definition at line 82 of file WidgetBorder.cpp.


Member Function Documentation

yap::WidgetBorder::DISALLOW_COPY ( WidgetBorder  )
private
const Texture & yap::WidgetBorder::GetTexture ( ) const

Definition at line 159 of file WidgetBorder.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint yap::WidgetBorder::GetTextureWidth ( ) const
private

Definition at line 202 of file WidgetBorder.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint yap::WidgetBorder::GetWidth ( ) const

Definition at line 169 of file WidgetBorder.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WidgetBorder::HandleChangeColor ( const sf::Color &  color)
privatevirtual

Reimplemented from yap::BaseWidget.

Definition at line 155 of file WidgetBorder.cpp.

void yap::WidgetBorder::HandleDraw ( IDrawingContext context)
privatevirtual

Reimplemented from yap::BaseWidget.

Definition at line 86 of file WidgetBorder.cpp.

Here is the call graph for this function:

Vector2 yap::WidgetBorder::HandleGetSize ( ) const
privatevirtual

Reimplemented from yap::BaseWidget.

Definition at line 178 of file WidgetBorder.cpp.

Here is the call graph for this function:

void yap::WidgetBorder::HandleMove ( const Vector2 offset)
privatevirtual

Reimplemented from yap::BaseWidget.

Definition at line 107 of file WidgetBorder.cpp.

Here is the call graph for this function:

void yap::WidgetBorder::HandleScale ( const Vector2 factor)
privatevirtual

Reimplemented from yap::BaseWidget.

Definition at line 128 of file WidgetBorder.cpp.

Here is the call graph for this function:

void yap::WidgetBorder::HandleShow ( bool  isVisible)
privatevirtual

Reimplemented from yap::BaseWidget.

Definition at line 103 of file WidgetBorder.cpp.

void yap::WidgetBorder::HandleUpdate ( const Time dt)
privatevirtual

Reimplemented from yap::BaseWidget.

Definition at line 151 of file WidgetBorder.cpp.

bool yap::WidgetBorder::IsFocusable ( ) const
virtual

Implements yap::BaseWidget.

Definition at line 24 of file WidgetBorder.cpp.

void yap::WidgetBorder::SetBorder ( Vector2  size,
uint  width 
)

Definition at line 292 of file WidgetBorder.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WidgetBorder::SetBorder ( Vector2  size)

Definition at line 219 of file WidgetBorder.cpp.

Here is the call graph for this function:

void yap::WidgetBorder::SetScalable ( bool  state)

Definition at line 124 of file WidgetBorder.cpp.


Member Data Documentation

bool yap::WidgetBorder::basic_
private

Definition at line 74 of file WidgetBorder.hpp.

Texture* yap::WidgetBorder::border_
private

Reimplemented from yap::BaseWidget.

Definition at line 62 of file WidgetBorder.hpp.

String yap::WidgetBorder::file_
private

Definition at line 63 of file WidgetBorder.hpp.

bool yap::WidgetBorder::isInit
private

Definition at line 73 of file WidgetBorder.hpp.

bool yap::WidgetBorder::isScalable_
private

Definition at line 75 of file WidgetBorder.hpp.

Event<const WidgetBorder&, const EventArgsTexture&> yap::WidgetBorder::OnBorderSet

Definition at line 42 of file WidgetBorder.hpp.

collection::Array<Texture*> yap::WidgetBorder::textures_
private

Definition at line 65 of file WidgetBorder.hpp.

TextureManager* yap::WidgetBorder::tmBottom_
private

Definition at line 68 of file WidgetBorder.hpp.

TextureManager* yap::WidgetBorder::tmLeft_
private

Definition at line 69 of file WidgetBorder.hpp.

TextureManager* yap::WidgetBorder::tmRight_
private

Definition at line 70 of file WidgetBorder.hpp.

collection::Array<TextureManager*> yap::WidgetBorder::tms_
private

Definition at line 66 of file WidgetBorder.hpp.

TextureManager* yap::WidgetBorder::tmTop_
private

Definition at line 67 of file WidgetBorder.hpp.

uint yap::WidgetBorder::width_
private

Definition at line 71 of file WidgetBorder.hpp.


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