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

#include <Menu.hpp>

Inheritance diagram for yap::Menu:
Collaboration diagram for yap::Menu:

List of all members.

Public Types

enum  Type { VERTICAL, HORIZONTAL }

Public Member Functions

 Menu (Type type, Padding ext, Padding in, bool fixed)
void AddChild (MenuItem &child, LayoutBox::Align align=LayoutBox::Align::CENTER)
virtual ~Menu ()
void SetSelectedBackground (WidgetBackground &background)
void SetSelectedBorder (WidgetBorder &border)
virtual bool IsFocusable () const
uint GetCurrentSelect () const
void SetFixed (bool state)
void Clear ()
- 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 Menu &, const
EmptyEventArgs & > 
OnDesactivated
- 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 void HandleItemActivated ()
virtual void HandleItemSelected ()
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)
bool HandleOnEvent (const GuiEvent &guiEvent)
- Protected Member Functions inherited from yap::BaseWidget
void RefreshBorder ()
virtual void SetFocused (bool state)
virtual void Refresh ()
virtual bool HandleOnPriorityEvent (const GuiEvent &guiEvent)

Private Member Functions

 DISALLOW_COPY (Menu)
void SetFormItem ()
void SetUnformItem ()

Private Attributes

collection::Array< MenuItem * > itemz_
uint currentSelec_
LayoutBoxlayout_
WidgetBackgroundselecBckgrd_
WidgetBorderselecBrdr_
uint selecBrdSize_
bool isFixed_
Type type_
PartialLayoutManagerlayoutManager_

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 14 of file Menu.hpp.


Member Enumeration Documentation

Enumerator:
VERTICAL 
HORIZONTAL 

Definition at line 21 of file Menu.hpp.


Constructor & Destructor Documentation

yap::Menu::Menu ( Type  type,
Padding  ext,
Padding  in,
bool  fixed 
)

Definition at line 13 of file Menu.cpp.

Here is the call graph for this function:

yap::Menu::~Menu ( )
virtual

Definition at line 44 of file Menu.cpp.


Member Function Documentation

void yap::Menu::AddChild ( MenuItem child,
LayoutBox::Align  align = LayoutBox::Align::CENTER 
)

Definition at line 82 of file Menu.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Menu::Clear ( )

Definition at line 121 of file Menu.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

yap::Menu::DISALLOW_COPY ( Menu  )
private
uint yap::Menu::GetCurrentSelect ( ) const

Definition at line 128 of file Menu.cpp.

Here is the caller graph for this function:

void yap::Menu::HandleChangeColor ( const sf::Color &  color)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 213 of file Menu.cpp.

void yap::Menu::HandleDraw ( IDrawingContext context)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 133 of file Menu.cpp.

Vector2 yap::Menu::HandleGetSize ( ) const
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 58 of file Menu.cpp.

Here is the call graph for this function:

void yap::Menu::HandleItemActivated ( )
protectedvirtual

Reimplemented in ycl::GameMenu.

Definition at line 217 of file Menu.cpp.

Here is the caller graph for this function:

void yap::Menu::HandleItemSelected ( )
protectedvirtual

Reimplemented in ycl::GameMenu.

Definition at line 221 of file Menu.cpp.

Here is the caller graph for this function:

void yap::Menu::HandleMove ( const Vector2 offset)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 201 of file Menu.cpp.

bool yap::Menu::HandleOnEvent ( const GuiEvent guiEvent)
protectedvirtual

Reimplemented from yap::BaseWidget.

Reimplemented in ycl::GameMenu.

Definition at line 138 of file Menu.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Menu::HandleScale ( const Vector2 factor)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 205 of file Menu.cpp.

void yap::Menu::HandleShow ( bool  isVisible)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 197 of file Menu.cpp.

void yap::Menu::HandleUpdate ( const Time dt)
protectedvirtual

Reimplemented from yap::BaseWidget.

Definition at line 209 of file Menu.cpp.

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

Implements yap::BaseWidget.

Definition at line 39 of file Menu.cpp.

void yap::Menu::SetFixed ( bool  state)

Definition at line 34 of file Menu.cpp.

void yap::Menu::SetFormItem ( )
private

Definition at line 65 of file Menu.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Menu::SetSelectedBackground ( WidgetBackground background)

Definition at line 48 of file Menu.cpp.

Here is the caller graph for this function:

void yap::Menu::SetSelectedBorder ( WidgetBorder border)

Definition at line 53 of file Menu.cpp.

Here is the caller graph for this function:

void yap::Menu::SetUnformItem ( )
private

Definition at line 75 of file Menu.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

uint yap::Menu::currentSelec_
private

Definition at line 58 of file Menu.hpp.

bool yap::Menu::isFixed_
private

Definition at line 64 of file Menu.hpp.

collection::Array<MenuItem*> yap::Menu::itemz_
private

Definition at line 57 of file Menu.hpp.

LayoutBox* yap::Menu::layout_
private

Definition at line 59 of file Menu.hpp.

PartialLayoutManager* yap::Menu::layoutManager_
private

Definition at line 66 of file Menu.hpp.

Event<const Menu&, const EmptyEventArgs&> yap::Menu::OnDesactivated

Definition at line 19 of file Menu.hpp.

WidgetBackground* yap::Menu::selecBckgrd_
private

Definition at line 61 of file Menu.hpp.

WidgetBorder* yap::Menu::selecBrdr_
private

Definition at line 62 of file Menu.hpp.

uint yap::Menu::selecBrdSize_
private

Definition at line 63 of file Menu.hpp.

Type yap::Menu::type_
private

Definition at line 65 of file Menu.hpp.


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