xoreos
0.0.5
|
#include <quadwidget.h>
Public Member Functions | |
QuadWidget (::Engines::GUI &gui, const Common::UString &tag, const Common::UString &texture, float x1, float y1, float x2, float y2, float tX1=0.0f, float tY1=0.0f, float tX2=1.0f, float tY2=1.0f) | |
~QuadWidget () | |
void | show () |
Show the widget. More... | |
void | hide () |
Hide the widget. More... | |
void | setPosition (float x, float y, float z) |
Set the widget's position. More... | |
void | setColor (float r, float g, float b, float a) |
void | setTexture (const Common::UString &texture) |
void | setWidth (float w) |
void | setHeight (float h) |
float | getWidth () const |
Get the widget's width. More... | |
float | getHeight () const |
Get the widget's height. More... | |
Public Member Functions inherited from Engines::NWN::NWNWidget | |
NWNWidget (::Engines::GUI &gui, const Common::UString &tag) | |
~NWNWidget () | |
void | enter () |
The mouse entered the widget. More... | |
void | leave () |
The mouse left the widget. More... | |
void | setTooltip (const Common::UString &text) |
void | setTooltipPosition (float x, float y, float z) |
Public Member Functions inherited from Engines::Widget | |
Widget (GUI &gui, const Common::UString &tag) | |
virtual | ~Widget () |
const Common::UString & | getTag () const |
Get the widget's tag. More... | |
virtual void | setTag (const Common::UString &tag) |
Set the widget's tag. More... | |
bool | isActive () const |
Was the widget activated? More... | |
bool | isVisible () const |
Is the widget visible? More... | |
bool | isDisabled () const |
Is the widget disabled? More... | |
bool | isInvisible () const |
Is the widget invisible (never visible)? More... | |
Widget * | getParent () |
const Widget * | getParent () const |
Widget * | getChild (const Common::UString &childTag) |
Get the widget's child by tag. More... | |
virtual void | movePosition (float x, float y, float z) |
Move the widget, relative to its current position. More... | |
virtual void | getPosition (float &x, float &y, float &z) const |
Get the widget's position. More... | |
virtual void | setDisabled (bool disabled) |
Disable/Enable the widget. More... | |
virtual void | setInvisible (bool invisible) |
Make the widget invisible. More... | |
virtual void | mouseMove (uint8 state, float x, float y) |
The mouse was moved over the widget. More... | |
virtual void | mouseDown (uint8 state, float x, float y) |
A mouse button was pressed on the widget. More... | |
virtual void | mouseUp (uint8 state, float x, float y) |
A mouse button was released on the widget. More... | |
virtual void | mouseWheel (uint8 state, int x, int y) |
A mouse wheel was used on the widget. More... | |
virtual void | mouseDblClick (uint8 state, float x, float y) |
A mouse button was double-clicked on the widget. More... | |
virtual void | subActive (Widget &widget) |
A sub-widget was activated. More... | |
void | remove () |
Remove the widget from the GUI. More... | |
virtual void | addSub (Widget &widget) |
Add a sub-widget to the widget. More... | |
virtual void | addChild (Widget &widget) |
Add a child to the widget. More... | |
virtual void | addGroupMember (Widget &widget) |
Add a fellow group member to the widget. More... | |
virtual void | removeSub (Widget &widget) |
Remove a sub-widget from the widget. More... | |
virtual void | removeChild (Widget &widget) |
Remove a child from the widget. More... | |
virtual void | removeGroupMember (Widget &widget) |
Remove fellow group member from the widget. More... | |
Private Attributes | |
float | _width |
float | _height |
Common::ScopedPtr< Graphics::Aurora::GUIQuad > | _quad |
Additional Inherited Members | |
Protected Member Functions inherited from Engines::Widget | |
virtual void | signalGroupMemberActive () |
A fellow group member signaled that it is now active. More... | |
void | setActive (bool active) |
The widget's active state. More... | |
void | raiseCallbackActive (Widget &widget) |
Protected Attributes inherited from Engines::Widget | |
GUI * | _gui |
The GUI the widget belongs to. More... | |
Common::UString | _tag |
The widget's tag. More... | |
Widget * | _parent |
The widget's parent, if any. More... | |
Widget * | _owner |
The widget's owner, if any. More... | |
std::list< Widget * > | _subWidgets |
The widget's sub-widgets. More... | |
std::list< Widget * > | _children |
The widget's children. More... | |
std::list< Widget * > | _groupMembers |
The widget's fellow group members. More... | |
A NWN quad widget.
One of the base NWN widget classes, the QuadWidget consists of a single Aurora GUIQuad.
Definition at line 49 of file quadwidget.h.
Engines::NWN::QuadWidget::QuadWidget | ( | ::Engines::GUI & | gui, |
const Common::UString & | tag, | ||
const Common::UString & | texture, | ||
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2, | ||
float | tX1 = 0.0f , |
||
float | tY1 = 0.0f , |
||
float | tX2 = 1.0f , |
||
float | tY2 = 1.0f |
||
) |
Definition at line 36 of file quadwidget.cpp.
References _height, _quad, _width, ABS(), and Common::ScopedPtrBase< T, Deallocator >::reset().
Engines::NWN::QuadWidget::~QuadWidget | ( | ) |
Definition at line 50 of file quadwidget.cpp.
|
virtual |
Get the widget's height.
Reimplemented from Engines::Widget.
Definition at line 88 of file quadwidget.cpp.
References _height.
|
virtual |
Get the widget's width.
Reimplemented from Engines::Widget.
Definition at line 84 of file quadwidget.cpp.
References _width.
|
virtual |
Hide the widget.
Reimplemented from Engines::NWN::NWNWidget.
Definition at line 57 of file quadwidget.cpp.
References _quad.
void Engines::NWN::QuadWidget::setColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Definition at line 68 of file quadwidget.cpp.
References _quad.
Referenced by Engines::NWN::PartyLeader::PartyLeader(), and Engines::NWN::PartyLeader::setHealthColor().
void Engines::NWN::QuadWidget::setHeight | ( | float | h | ) |
Definition at line 80 of file quadwidget.cpp.
References _quad.
Referenced by Engines::NWN::PartyLeader::setHealth().
|
virtual |
Set the widget's position.
Reimplemented from Engines::NWN::NWNWidget.
Definition at line 61 of file quadwidget.cpp.
References _quad, Engines::Widget::getPosition(), and Engines::NWN::NWNWidget::setPosition().
Referenced by Engines::NWN::PartyLeader::PartyLeader().
void Engines::NWN::QuadWidget::setTexture | ( | const Common::UString & | texture | ) |
Definition at line 72 of file quadwidget.cpp.
References _quad.
void Engines::NWN::QuadWidget::setWidth | ( | float | w | ) |
Definition at line 76 of file quadwidget.cpp.
References _quad.
|
virtual |
Show the widget.
Reimplemented from Engines::Widget.
Definition at line 53 of file quadwidget.cpp.
References _quad.
|
private |
Definition at line 72 of file quadwidget.h.
Referenced by getHeight(), and QuadWidget().
|
private |
Definition at line 74 of file quadwidget.h.
Referenced by hide(), QuadWidget(), setColor(), setHeight(), setPosition(), setTexture(), setWidth(), and show().
|
private |
Definition at line 71 of file quadwidget.h.
Referenced by getWidth(), and QuadWidget().