xoreos
0.0.5
|
Base class for all widgets in NWN. More...
#include <nwnwidget.h>
Public Member Functions | |
NWNWidget (::Engines::GUI &gui, const Common::UString &tag) | |
~NWNWidget () | |
void | hide () |
Hide the widget. More... | |
void | enter () |
The mouse entered the widget. More... | |
void | leave () |
The mouse left the widget. More... | |
void | setPosition (float x, float y, float z) |
Set the widget's position. 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... | |
virtual void | show () |
Show the widget. 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 float | getWidth () const |
Get the widget's width. More... | |
virtual float | getHeight () const |
Get the widget's height. 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 Member Functions | |
void | createTooltip () |
Private Attributes | |
Common::ScopedPtr< Tooltip > | _tooltip |
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... | |
Base class for all widgets in NWN.
Definition at line 45 of file nwnwidget.h.
Engines::NWN::NWNWidget::NWNWidget | ( | ::Engines::GUI & | gui, |
const Common::UString & | tag | ||
) |
Definition at line 34 of file nwnwidget.cpp.
Engines::NWN::NWNWidget::~NWNWidget | ( | ) |
Definition at line 37 of file nwnwidget.cpp.
|
private |
Definition at line 80 of file nwnwidget.cpp.
References _tooltip, and Engines::NWN::Tooltip::kTypeHelp.
Referenced by setTooltip(), and setTooltipPosition().
|
virtual |
The mouse entered the widget.
Reimplemented from Engines::Widget.
Definition at line 50 of file nwnwidget.cpp.
References _tooltip, and Engines::NWN::Tooltip::getDefaultDelay().
Referenced by Engines::NWN::WidgetCheckBox::enter(), and Engines::NWN::WidgetButton::enter().
|
virtual |
Hide the widget.
Reimplemented from Engines::Widget.
Reimplemented in Engines::NWN::PortraitWidget, Engines::NWN::WidgetScrollbar, Engines::NWN::QuadWidget, and Engines::NWN::NWNWidgetWithCaption.
Definition at line 40 of file nwnwidget.cpp.
References _tooltip, Engines::Widget::hide(), and Engines::Widget::isVisible().
Referenced by Engines::NWN::WidgetListItemBaseButton::hide(), Engines::NWN::NWNWidgetWithCaption::hide(), Engines::NWN::WidgetScrollbar::hide(), Engines::NWN::PortraitWidget::hide(), and Engines::NWN::WidgetListBox::remove().
|
virtual |
The mouse left the widget.
Reimplemented from Engines::Widget.
Definition at line 55 of file nwnwidget.cpp.
References _tooltip.
Referenced by Engines::NWN::WidgetClose::leave(), Engines::NWN::WidgetCheckBox::leave(), and Engines::NWN::WidgetButton::leave().
|
virtual |
Set the widget's position.
Reimplemented from Engines::Widget.
Reimplemented in Engines::NWN::PortraitWidget, Engines::NWN::WidgetScrollbar, Engines::NWN::QuadWidget, Engines::NWN::NWNWidgetWithCaption, and Engines::NWN::WidgetSlider.
Definition at line 60 of file nwnwidget.cpp.
References _tooltip, and Engines::Widget::setPosition().
Referenced by Engines::NWN::WidgetListItemBaseButton::setPosition(), Engines::NWN::QuickbarButton::setPosition(), Engines::NWN::WidgetListItemModule::setPosition(), Engines::NWN::WidgetListItemPremium::setPosition(), Engines::NWN::NWNWidgetWithCaption::setPosition(), Engines::NWN::QuadWidget::setPosition(), Engines::NWN::WidgetListItemTextLine::setPosition(), Engines::NWN::WidgetScrollbar::setPosition(), Engines::NWN::PortraitWidget::setPosition(), Engines::NWN::WidgetGridBox::unlock(), Engines::NWN::WidgetListBox::unlock(), Engines::NWN::WidgetGridBox::updateVisible(), and Engines::NWN::WidgetListBox::updateVisible().
void Engines::NWN::NWNWidget::setTooltip | ( | const Common::UString & | text | ) |
Definition at line 67 of file nwnwidget.cpp.
References _tooltip, and createTooltip().
Referenced by Engines::NWN::CharSpells::CharSpells(), Engines::NWN::PartyLeader::PartyLeader(), and Engines::NWN::PartyLeader::updatePortraitTooltip().
void Engines::NWN::NWNWidget::setTooltipPosition | ( | float | x, |
float | y, | ||
float | z | ||
) |
Definition at line 74 of file nwnwidget.cpp.
References _tooltip, and createTooltip().
Referenced by Engines::NWN::CharSpells::CharSpells(), and Engines::NWN::PartyLeader::PartyLeader().
|
private |
Definition at line 61 of file nwnwidget.h.
Referenced by createTooltip(), enter(), hide(), leave(), setPosition(), setTooltip(), and setTooltipPosition().