#include <lugre_widget.h>


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) | |
| cWidget * | CreateChild () |
| 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) |
| cWidget * | GetChildUnderPos (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 | |
| cDialog * | mpDialog |
| cWidget * | mpParent |
| cGfx2D * | mpGfx2D |
| bool | mbIgnoreMouseOver |
| true for labels, icons in buttons, ignored for mouseover | |
| bool | mbClipChildsHitTest |
| cBitMask * | mpBitMask |
| std::list< cWidget * > | mlChild |
Definition at line 98 of file lugre_widget.h.
| 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.
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 | ( | ) |
| 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 | |||
| ) |
Definition at line 242 of file lugre_widget.cpp.
References Lugre::cGfx2D::GetDerivedLeft(), Lugre::cGfx2D::GetDerivedTop(), Lugre::cGfx2D::GetVisible(), Lugre::cGfx2D::IsPointWithin(), mbIgnoreMouseOver, mpBitMask, mpGfx2D, and Lugre::cBitMask::TestBit().
Referenced by GetChildUnderPos().
| 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] |
| size_t Lugre::cWidget::miUID |
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.
| std::list<cWidget*> Lugre::cWidget::mlChild |
Definition at line 106 of file lugre_widget.h.
Referenced by AttachChild(), Lugre::cDialog::DestroyWidget(), DetachChild(), GetChildUnderPos(), UpdateClip(), and ~cWidget().
1.5.6