YAPOG  0.0.1
Yet Another Pokemon Online Game
ycl::ChatWidget Class Reference

#include <ChatWidget.hpp>

Inheritance diagram for ycl::ChatWidget:
Collaboration diagram for ycl::ChatWidget:

List of all members.

Public Member Functions

 ChatWidget (const yap::String &userLogin)
virtual ~ChatWidget ()
void Init ()
virtual bool IsFocusable () const
void AddMessage (const yap::GameMessage &message)
- 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

yap::Event< ChatWidget
&, yap::GameMessage & > 
OnMessageSent
 Event raised each time a message is entered by the player.
- 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

Protected Member Functions

virtual yap::Vector2 HandleGetSize () const
virtual void HandleMove (const yap::Vector2 &offset)
virtual void HandleScale (const yap::Vector2 &factor)
virtual void HandleDraw (yap::IDrawingContext &context)
virtual bool HandleOnEvent (const yap::GuiEvent &guiEvent)
virtual bool HandleOnPriorityEvent (const yap::GuiEvent &guiEvent)
virtual void HandleShow (bool isVisible)
virtual void HandleChangeColor (const sf::Color &color)
virtual void HandleUpdate (const yap::Time &dt)
- Protected Member Functions inherited from yap::BaseWidget
void RefreshBorder ()
virtual void SetFocused (bool state)
virtual void Refresh ()

Private Member Functions

 DISALLOW_COPY (ChatWidget)
void InitTab ()
void InitDial ()
void InitEntry ()
void DisplayResponse (yap::ResponseType response)
bool TestAddChan (const yap::GuiEvent &guiEvent)
bool TestSwitchTab (const yap::GuiEvent &guiEvent)
bool TabAndChanHandler (bool chan, bool add, int i)

Private Attributes

const yap::StringuserLogin_
yap::Chatchat_
yap::String line_
yap::TextBoxWidgetlineCatcher_
TabTitleType tabTitle_
yap::HorizontalLayouttabLayout_
yap::MultiLabelWidgetdialog_
yap::HorizontalLayoutdialLayout_
yap::HorizontalLayoutentryLayout_
yap::VerticalLayoutbigLayout_

Additional Inherited Members

- 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 30 of file ChatWidget.hpp.


Constructor & Destructor Documentation

ycl::ChatWidget::ChatWidget ( const yap::String userLogin)

Definition at line 13 of file ChatWidget.cpp.

Here is the call graph for this function:

ycl::ChatWidget::~ChatWidget ( )
virtual

Definition at line 37 of file ChatWidget.cpp.


Member Function Documentation

void ycl::ChatWidget::AddMessage ( const yap::GameMessage message)

Definition at line 149 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ycl::ChatWidget::DISALLOW_COPY ( ChatWidget  )
private
void ycl::ChatWidget::DisplayResponse ( yap::ResponseType  response)
private

Definition at line 157 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::ChatWidget::HandleChangeColor ( const sf::Color &  color)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 372 of file ChatWidget.cpp.

void ycl::ChatWidget::HandleDraw ( yap::IDrawingContext context)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 364 of file ChatWidget.cpp.

yap::Vector2 ycl::ChatWidget::HandleGetSize ( ) const
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 144 of file ChatWidget.cpp.

Here is the call graph for this function:

void ycl::ChatWidget::HandleMove ( const yap::Vector2 offset)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 356 of file ChatWidget.cpp.

bool ycl::ChatWidget::HandleOnEvent ( const yap::GuiEvent guiEvent)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 315 of file ChatWidget.cpp.

Here is the call graph for this function:

bool ycl::ChatWidget::HandleOnPriorityEvent ( const yap::GuiEvent guiEvent)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 298 of file ChatWidget.cpp.

Here is the call graph for this function:

void ycl::ChatWidget::HandleScale ( const yap::Vector2 factor)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 360 of file ChatWidget.cpp.

void ycl::ChatWidget::HandleShow ( bool  isVisible)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 368 of file ChatWidget.cpp.

void ycl::ChatWidget::HandleUpdate ( const yap::Time dt)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 376 of file ChatWidget.cpp.

void ycl::ChatWidget::Init ( )

Definition at line 98 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::ChatWidget::InitDial ( )
private

Definition at line 78 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::ChatWidget::InitEntry ( )
private

Definition at line 88 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::ChatWidget::InitTab ( )
private

Definition at line 61 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ycl::ChatWidget::IsFocusable ( ) const
virtual

Implements yap::BaseWidget.

Definition at line 139 of file ChatWidget.cpp.

bool ycl::ChatWidget::TabAndChanHandler ( bool  chan,
bool  add,
int  i 
)
private

Definition at line 209 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ycl::ChatWidget::TestAddChan ( const yap::GuiEvent guiEvent)
private

Definition at line 228 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ycl::ChatWidget::TestSwitchTab ( const yap::GuiEvent guiEvent)
private

Definition at line 263 of file ChatWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

yap::VerticalLayout* ycl::ChatWidget::bigLayout_
private

Definition at line 78 of file ChatWidget.hpp.

yap::Chat* ycl::ChatWidget::chat_
private

Definition at line 70 of file ChatWidget.hpp.

yap::HorizontalLayout* ycl::ChatWidget::dialLayout_
private

Definition at line 76 of file ChatWidget.hpp.

yap::MultiLabelWidget* ycl::ChatWidget::dialog_
private

Definition at line 75 of file ChatWidget.hpp.

yap::HorizontalLayout* ycl::ChatWidget::entryLayout_
private

Definition at line 77 of file ChatWidget.hpp.

yap::String ycl::ChatWidget::line_
private

Definition at line 71 of file ChatWidget.hpp.

yap::TextBoxWidget* ycl::ChatWidget::lineCatcher_
private

Definition at line 72 of file ChatWidget.hpp.

yap::Event<ChatWidget&, yap::GameMessage&> ycl::ChatWidget::OnMessageSent

Event raised each time a message is entered by the player.

Definition at line 44 of file ChatWidget.hpp.

yap::HorizontalLayout* ycl::ChatWidget::tabLayout_
private

Definition at line 74 of file ChatWidget.hpp.

TabTitleType ycl::ChatWidget::tabTitle_
private

Definition at line 73 of file ChatWidget.hpp.

const yap::String& ycl::ChatWidget::userLogin_
private

Definition at line 69 of file ChatWidget.hpp.


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