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

#include <Label.hpp>

Inheritance diagram for yap::Label:
Collaboration diagram for yap::Label:

List of all members.

Classes

struct  EventArgsString

Public Member Functions

 Label ()
 Label (String content)
virtual ~Label ()
virtual bool IsFocusable () const
void SetText (const String &content)
void SetTextSize (uint size)
String GetText () const
float GetCharWidth () const
uint GetCharHeight () const
Vector2 CharPos (uint pos) const
uint Length () const
virtual void SetDefaultColor (const sf::Color &color)
virtual void SetBackground (WidgetBackground &background)
- 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 SetParent (IWidget &parent)
virtual void SetPadding (const Padding &padding)
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 Label &, const
EventArgsString & > 
OnTextChanged
- 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 (Label)
virtual void Refresh ()
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

String textContent_
sf::Text drawableText_
bool isPosSet_

Static Private Attributes

static const String DEFAULT_FONT = "pkmnemn.ttf"

Additional Inherited Members

- Protected Member Functions inherited from yap::BaseWidget
void RefreshBorder ()
virtual void SetFocused (bool state)
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_
WidgetBorderborder_
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 13 of file Label.hpp.


Constructor & Destructor Documentation

yap::Label::Label ( )

Definition at line 14 of file Label.cpp.

Here is the call graph for this function:

yap::Label::Label ( String  content)

Definition at line 24 of file Label.cpp.

Here is the call graph for this function:

yap::Label::~Label ( )
virtual

Definition at line 41 of file Label.cpp.


Member Function Documentation

Vector2 yap::Label::CharPos ( uint  pos) const

Definition at line 54 of file Label.cpp.

Here is the caller graph for this function:

yap::Label::DISALLOW_COPY ( Label  )
private
uint yap::Label::GetCharHeight ( ) const

Definition at line 77 of file Label.cpp.

Here is the caller graph for this function:

float yap::Label::GetCharWidth ( ) const

Definition at line 49 of file Label.cpp.

Here is the caller graph for this function:

String yap::Label::GetText ( ) const

Definition at line 131 of file Label.cpp.

Here is the caller graph for this function:

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

Reimplemented from yap::BaseWidget.

Definition at line 126 of file Label.cpp.

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

Reimplemented from yap::BaseWidget.

Definition at line 97 of file Label.cpp.

Here is the call graph for this function:

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

Reimplemented from yap::BaseWidget.

Definition at line 82 of file Label.cpp.

Here is the call graph for this function:

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

Reimplemented from yap::BaseWidget.

Definition at line 107 of file Label.cpp.

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

Reimplemented from yap::BaseWidget.

Definition at line 117 of file Label.cpp.

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

Reimplemented from yap::BaseWidget.

Definition at line 103 of file Label.cpp.

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

Reimplemented from yap::BaseWidget.

Definition at line 122 of file Label.cpp.

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

Implements yap::BaseWidget.

Definition at line 44 of file Label.cpp.

uint yap::Label::Length ( ) const

Definition at line 72 of file Label.cpp.

Here is the caller graph for this function:

void yap::Label::Refresh ( )
privatevirtual

Reimplemented from yap::BaseWidget.

Definition at line 59 of file Label.cpp.

Here is the call graph for this function:

void yap::Label::SetBackground ( WidgetBackground background)
virtual

Reimplemented from yap::BaseWidget.

Definition at line 136 of file Label.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Label::SetDefaultColor ( const sf::Color &  color)
virtual

Reimplemented from yap::BaseWidget.

Definition at line 67 of file Label.cpp.

Here is the caller graph for this function:

void yap::Label::SetText ( const String content)

Definition at line 145 of file Label.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Label::SetTextSize ( uint  size)

Definition at line 113 of file Label.cpp.

Here is the caller graph for this function:


Member Data Documentation

const String yap::Label::DEFAULT_FONT = "pkmnemn.ttf"
staticprivate

Definition at line 64 of file Label.hpp.

sf::Text yap::Label::drawableText_
private

Definition at line 61 of file Label.hpp.

bool yap::Label::isPosSet_
private

Definition at line 62 of file Label.hpp.

Event<const Label&, const EventArgsString&> yap::Label::OnTextChanged

Definition at line 38 of file Label.hpp.

String yap::Label::textContent_
private

Definition at line 60 of file Label.hpp.


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