Lugre::cWidget Class Reference

#include <lugre_widget.h>

Inheritance diagram for Lugre::cWidget:

Inheritance graph
[legend]
Collaboration diagram for Lugre::cWidget:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cWidget ()
 don't use this, just for lua binding
 cWidget (cDialog *pDialog, cWidget *pParent=0)
 don't call directly, use cDialog::CreateWidget() instead
 ~cWidget ()
 don't call directly, use Destroy() instead
void Destroy ()
 shortcut to cDialog::DestroyWidget(this)
cWidgetCreateChild ()
 shortcut to cDialog::CreateWidget(this);
void AttachChild (cWidget *pWidget)
 WARNING ! cannot be used to change parents during runtime, as gfx2d is not detached and reattached, don't use, only needed by CreateWidget().
void DetachChild (cWidget *pWidget)
 WARNING ! cannot be used to change parents during runtime, as gfx2d is not detached and reattached, don't use, only needed by DestroyWidget().
void UpdateClip (const Ogre::Real fMarginL=0, const Ogre::Real fMarginT=0, const Ogre::Real fMarginR=0, const Ogre::Real fMarginB=0)
 call on parent resize or reposition, UpdateClip(3,3,3,3); sets a 3 pixel margin inside "this", where no childs are visible
bool IsUnderPos (const size_t x, const size_t y)
cWidgetGetChildUnderPos (const size_t x, const size_t y)
 also returns grand-children. if no child is found, returns 0

Static Public Member Functions

static void LuaRegister (lua_State *L)
 lua binding

Public Attributes

size_t miUID
 globally unique id, always set, for lua-association and comparison
cDialogmpDialog
cWidgetmpParent
cGfx2DmpGfx2D
bool mbIgnoreMouseOver
 true for labels, icons in buttons, ignored for mouseover
bool mbClipChildsHitTest
cBitMaskmpBitMask
std::list< cWidget * > mlChild


Detailed Description

Definition at line 98 of file lugre_widget.h.


Constructor & Destructor Documentation

Lugre::cWidget::cWidget (  ) 

don't use this, just for lua binding

don't use, just for lua binding (prototype creating for member-var offset)

Definition at line 190 of file lugre_widget.cpp.

Lugre::cWidget::cWidget ( cDialog pDialog,
cWidget pParent = 0 
)

don't call directly, use cDialog::CreateWidget() instead

Definition at line 192 of file lugre_widget.cpp.

References assert, miUID, mpDialog, mpGfx2D, and Lugre::cDialog::mpOverlay.

Lugre::cWidget::~cWidget (  ) 

don't call directly, use Destroy() instead

Definition at line 202 of file lugre_widget.cpp.

References assert, mlChild, and mpGfx2D.


Member Function Documentation

void Lugre::cWidget::Destroy (  ) 

shortcut to cDialog::DestroyWidget(this)

Definition at line 210 of file lugre_widget.cpp.

References Lugre::cDialog::DestroyWidget(), and mpDialog.

cWidget * Lugre::cWidget::CreateChild (  ) 

shortcut to cDialog::CreateWidget(this);

Definition at line 215 of file lugre_widget.cpp.

References Lugre::cDialog::CreateWidget(), and mpDialog.

void Lugre::cWidget::AttachChild ( cWidget pWidget  ) 

WARNING ! cannot be used to change parents during runtime, as gfx2d is not detached and reattached, don't use, only needed by CreateWidget().

Definition at line 220 of file lugre_widget.cpp.

References mlChild, and mpParent.

Referenced by Lugre::cDialog::CreateWidget().

void Lugre::cWidget::DetachChild ( cWidget pWidget  ) 

WARNING ! cannot be used to change parents during runtime, as gfx2d is not detached and reattached, don't use, only needed by DestroyWidget().

Definition at line 226 of file lugre_widget.cpp.

References mlChild, and mpParent.

Referenced by Lugre::cDialog::DestroyWidget().

void Lugre::cWidget::UpdateClip ( const Ogre::Real  fMarginL = 0,
const Ogre::Real  fMarginT = 0,
const Ogre::Real  fMarginR = 0,
const Ogre::Real  fMarginB = 0 
)

call on parent resize or reposition, UpdateClip(3,3,3,3); sets a 3 pixel margin inside "this", where no childs are visible

Definition at line 232 of file lugre_widget.cpp.

References Lugre::cGfx2D::GetDerivedLeft(), Lugre::cGfx2D::GetDerivedTop(), Lugre::cGfx2D::GetHeight(), Lugre::cGfx2D::GetWidth(), mlChild, and mpGfx2D.

bool Lugre::cWidget::IsUnderPos ( const size_t  x,
const size_t  y 
)

cWidget * Lugre::cWidget::GetChildUnderPos ( const size_t  x,
const size_t  y 
)

also returns grand-children. if no child is found, returns 0

Definition at line 251 of file lugre_widget.cpp.

References GetChildUnderPos(), IsUnderPos(), and mlChild.

Referenced by GetChildUnderPos(), and Lugre::cDialog::GetWidgetUnderPos().

void Lugre::cWidget::LuaRegister ( lua_State *  L  )  [static]

lua binding

Definition at line 173 of file lugre_widget_L.cpp.

References PROFILE.


Member Data Documentation

globally unique id, always set, for lua-association and comparison

Definition at line 99 of file lugre_widget.h.

Referenced by cWidget().

Definition at line 100 of file lugre_widget.h.

Referenced by CreateChild(), cWidget(), Destroy(), and Lugre::cDialog::DestroyWidget().

Definition at line 101 of file lugre_widget.h.

Referenced by AttachChild(), Lugre::cDialog::DestroyWidget(), and DetachChild().

Definition at line 102 of file lugre_widget.h.

Referenced by cWidget(), IsUnderPos(), UpdateClip(), and ~cWidget().

true for labels, icons in buttons, ignored for mouseover

Definition at line 103 of file lugre_widget.h.

Referenced by IsUnderPos().

Definition at line 104 of file lugre_widget.h.

Definition at line 105 of file lugre_widget.h.

Referenced by IsUnderPos().


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

Generated on Wed Feb 8 06:00:22 2012 for cpp by  doxygen 1.5.6