Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::gui::Control Class Reference

This class is the base of gui controls. More...

#include <Control.h>

Inheritance diagram for kge::gui::Control:
kge::KgeUnknown kge::gui::Image kge::gui::Text

Public Member Functions

virtual ~Control ()
virtual bool CheckClick (int X, int Y)
 Checks if control clicked.
virtual void Connect (EventType eventtype, core::Functor2< void, Control *, EventArgs * > *Function)
 Connect an event.
virtual void Render ()=0
 Renders the control.
virtual void SetPosistion (int X, int Y)
 Sets the control position.
virtual void SetSize (int Width, int Height)
 Sets Control size.
virtual void SetRect (int X, int Y, int Width, int Height)
 Sets the control rect.
virtual void SetRect (core::RectI rect)
 Sets the control rect.
virtual bool GetFocus ()
 Gets The Focuse Status.
virtual void SetFocus (bool FocusStatus)
 Set The Focuse Status.
- Public Member Functions inherited from kge::KgeUnknown
 KgeUnknown ()
 Constructor.
virtual ~KgeUnknown ()
 Destructor.
virtual void AddRef ()
 Add a reference to the object.
virtual void DecRef ()
 Decrease a reference from the object. if its reference count get 0 then the object will destroy.
u32 GetRefCount ()
 Return resource reference count.
const char * GetDebugText ()
 returns the instance debug text.

Public Attributes

kge::gfx::Texturem_BackImage

Protected Member Functions

virtual void Update ()
- Protected Member Functions inherited from kge::KgeUnknown
void SetDebugText (char *text)

Protected Attributes

kge::u16m_pIndices
core::RectI m_Rect
gfx::Rendererm_pRenderer
bool m_bMouseOver
bool m_bFocus
std::vector< EventTypem_vEventTypes
std::vector< core::Functor2
< void, Control *, EventArgs * > * > 
m_vFunctors

Friends

class GuiManager

Detailed Description

This class is the base of gui controls.

Definition at line 26 of file Control.h.

Constructor & Destructor Documentation

virtual kge::gui::Control::~Control ( )
inlinevirtual

Definition at line 32 of file Control.h.

Member Function Documentation

virtual bool kge::gui::Control::CheckClick ( int  X,
int  Y 
)
virtual

Checks if control clicked.

virtual void kge::gui::Control::Connect ( EventType  eventtype,
core::Functor2< void, Control *, EventArgs * > *  Function 
)
virtual

Connect an event.

virtual bool kge::gui::Control::GetFocus ( )
inlinevirtual

Gets The Focuse Status.

Definition at line 62 of file Control.h.

virtual void kge::gui::Control::Render ( )
pure virtual

Renders the control.

Implemented in kge::gui::Text, and kge::gui::Image.

virtual void kge::gui::Control::SetFocus ( bool  FocusStatus)
inlinevirtual

Set The Focuse Status.

Definition at line 65 of file Control.h.

virtual void kge::gui::Control::SetPosistion ( int  X,
int  Y 
)
virtual

Sets the control position.

virtual void kge::gui::Control::SetRect ( int  X,
int  Y,
int  Width,
int  Height 
)
virtual

Sets the control rect.

virtual void kge::gui::Control::SetRect ( core::RectI  rect)
virtual

Sets the control rect.

virtual void kge::gui::Control::SetSize ( int  Width,
int  Height 
)
virtual

Sets Control size.

virtual void kge::gui::Control::Update ( )
inlineprotectedvirtual

Reimplemented in kge::gui::Text, and kge::gui::Image.

Definition at line 90 of file Control.h.

Friends And Related Function Documentation

friend class GuiManager
friend

Definition at line 28 of file Control.h.

Member Data Documentation

kge::gfx::Texture* kge::gui::Control::m_BackImage

Definition at line 68 of file Control.h.

bool kge::gui::Control::m_bFocus
protected

Definition at line 81 of file Control.h.

bool kge::gui::Control::m_bMouseOver
protected

Definition at line 79 of file Control.h.

kge::u16* kge::gui::Control::m_pIndices
protected

Definition at line 73 of file Control.h.

gfx::Renderer* kge::gui::Control::m_pRenderer
protected

Definition at line 77 of file Control.h.

core::RectI kge::gui::Control::m_Rect
protected

Definition at line 75 of file Control.h.

std::vector<EventType> kge::gui::Control::m_vEventTypes
protected

Definition at line 84 of file Control.h.

std::vector<core::Functor2<void, Control*, EventArgs*>*> kge::gui::Control::m_vFunctors
protected

Definition at line 87 of file Control.h.


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