xoreos
0.0.5
|
#include <modelwidget.h>
Public Member Functions | |
ModelWidget (::Engines::GUI &gui, const Common::UString &tag, const Common::UString &model) | |
~ModelWidget () | |
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... | |
float | getWidth () const |
Get the widget's width. More... | |
float | getHeight () const |
Get the widget's height. More... | |
void | setTag (const Common::UString &tag) |
Set the widget's tag. More... | |
Graphics::Aurora::ModelNode * | getNode (const Common::UString &nodeName) const |
Public Member Functions inherited from Engines::NWN::NWNWidgetWithCaption | |
NWNWidgetWithCaption (::Engines::GUI &gui, const Common::UString &tag) | |
~NWNWidgetWithCaption () | |
void | show () |
Show the widget. More... | |
void | hide () |
Hide the widget. More... | |
virtual void | initCaption (const Common::UString &font, const Common::UString &text, float r=1.0f, float g=1.0f, float b=1.0f, float a=1.0f, float halign=Graphics::Aurora::kHAlignLeft, float valign=Graphics::Aurora::kVAlignTop) |
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 | setText (const Common::UString &text) |
const Common::UString | getText () const |
float | getWidth () const |
Get the widget's width. More... | |
float | getHeight () const |
Get the widget's height. More... | |
float | getHorizontalAlign () const |
float | getVerticalAlign () const |
void | setDisabled (bool disabled) |
Disable/Enable the widget. 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... | |
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 | 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... | |
Protected Attributes | |
Graphics::Aurora::Model * | _model |
Protected Attributes inherited from Engines::NWN::NWNWidgetWithCaption | |
Common::ScopedPtr< Graphics::Aurora::Text > | _caption |
float | _r |
float | _g |
float | _b |
float | _a |
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... | |
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) |
A NWN model widget.
One of the base NWN widget classes, the ModelWidget consists of a single Aurora Model.
Definition at line 45 of file modelwidget.h.
Engines::NWN::ModelWidget::ModelWidget | ( | ::Engines::GUI & | gui, |
const Common::UString & | tag, | ||
const Common::UString & | model | ||
) |
Definition at line 39 of file modelwidget.cpp.
References _model, Common::UString::c_str(), Engines::loadModelGUI(), and Graphics::Renderable::setTag().
Engines::NWN::ModelWidget::~ModelWidget | ( | ) |
Definition at line 49 of file modelwidget.cpp.
References _model, and Engines::freeModel().
|
virtual |
Get the widget's height.
Reimplemented from Engines::Widget.
Definition at line 82 of file modelwidget.cpp.
References _model, and Graphics::Aurora::Model::getHeight().
Referenced by Engines::NWN::Compass::Compass(), Engines::NWN::WidgetListBox::createScrollbar(), Engines::NWN::Quickchat::getHeight(), Engines::NWN::WidgetListBox::getProperties(), Engines::NWN::PartyLeader::PartyLeader(), and Engines::NWN::Quickbar::Quickbar().
Graphics::Aurora::ModelNode * Engines::NWN::ModelWidget::getNode | ( | const Common::UString & | nodeName | ) | const |
Definition at line 92 of file modelwidget.cpp.
References _model, and Graphics::Aurora::Model::getNode().
Referenced by Engines::NWN::CharAppearance::adjustButtons(), Engines::NWN::CharPortrait::CharPortrait(), Engines::NWN::CharSpells::makeSpellsList(), Engines::NWN::CharPortrait::setMainTexture(), and Engines::NWN::CharDomain::updateChosenDomains().
|
virtual |
Get the widget's width.
Reimplemented from Engines::Widget.
Definition at line 78 of file modelwidget.cpp.
References _model, and Graphics::Aurora::Model::getWidth().
Referenced by Engines::NWN::Compass::Compass(), Engines::NWN::WidgetListBox::createScrollbar(), Engines::NWN::WidgetListBox::getProperties(), Engines::NWN::Quickchat::getWidth(), Engines::NWN::WidgetGridBox::mouseDown(), Engines::NWN::WidgetListBox::mouseDown(), Engines::NWN::PartyLeader::PartyLeader(), and Engines::NWN::WidgetSlider::WidgetSlider().
|
virtual |
Hide the widget.
Reimplemented from Engines::Widget.
Definition at line 63 of file modelwidget.cpp.
References _model, Engines::NWN::NWNWidgetWithCaption::hide(), Graphics::Aurora::Model::hide(), and Engines::Widget::isVisible().
Referenced by Engines::NWN::WidgetListItemButton::hide(), Engines::NWN::WidgetListBox::hide(), and Engines::NWN::WidgetListItemButton::show().
|
virtual |
Set the widget's position.
Reimplemented from Engines::Widget.
Reimplemented in Engines::NWN::WidgetSlider.
Definition at line 71 of file modelwidget.cpp.
References _model, Engines::Widget::getPosition(), Engines::NWN::NWNWidgetWithCaption::setPosition(), and Graphics::Aurora::Model::setPosition().
Referenced by Engines::NWN::Compass::Compass(), Engines::NWN::GUI::initWidget(), Engines::NWN::MainMenu::MainMenu(), Engines::NWN::OptionsControlsMenu::OptionsControlsMenu(), Engines::NWN::OptionsFeedbackMenu::OptionsFeedbackMenu(), Engines::NWN::OptionsGameMenu::OptionsGameMenu(), Engines::NWN::OptionsGorePasswordMenu::OptionsGorePasswordMenu(), Engines::NWN::OptionsMenu::OptionsMenu(), Engines::NWN::OptionsResolutionMenu::OptionsResolutionMenu(), Engines::NWN::OptionsSoundAdvancedMenu::OptionsSoundAdvancedMenu(), Engines::NWN::OptionsSoundMenu::OptionsSoundMenu(), Engines::NWN::OptionsVideoAdvancedMenu::OptionsVideoAdvancedMenu(), Engines::NWN::OptionsVideoMenu::OptionsVideoMenu(), Engines::NWN::PartyLeader::PartyLeader(), Engines::NWN::Quickbar::Quickbar(), Engines::NWN::Quickchat::Quickchat(), Engines::NWN::WidgetListItemSkill::setPosition(), Engines::NWN::WidgetSlider::setPosition(), Engines::NWN::WidgetButton::setPosition(), and Engines::NWN::WidgetListBox::setPosition().
|
virtual |
Set the widget's tag.
Reimplemented from Engines::Widget.
Definition at line 86 of file modelwidget.cpp.
References _model, Engines::Widget::setTag(), and Graphics::Renderable::setTag().
|
virtual |
Show the widget.
Reimplemented from Engines::Widget.
Definition at line 53 of file modelwidget.cpp.
References _model, Engines::Widget::isInvisible(), Engines::Widget::isVisible(), Engines::NWN::NWNWidgetWithCaption::show(), and Graphics::Aurora::Model::show().
Referenced by Engines::NWN::WidgetListItemButton::show(), and Engines::NWN::WidgetListBox::show().
|
protected |
Definition at line 64 of file modelwidget.h.
Referenced by Engines::NWN::WidgetListBox::createScrollbar(), Engines::NWN::WidgetButton::enter(), getHeight(), getNode(), Engines::NWN::WidgetListBox::getProperties(), getWidth(), hide(), Engines::NWN::WidgetButton::isPressed(), Engines::NWN::WidgetClose::leave(), Engines::NWN::WidgetButton::leave(), ModelWidget(), Engines::NWN::WidgetClose::mouseDown(), Engines::NWN::WidgetButton::mouseDown(), Engines::NWN::WidgetClose::mouseUp(), Engines::NWN::WidgetButton::mouseUp(), Engines::NWN::WidgetButton::setDisabled(), Engines::NWN::WidgetButton::setMode(), setPosition(), Engines::NWN::WidgetButton::setPressed(), Engines::NWN::CompassWidget::setRotation(), setTag(), Engines::NWN::WidgetEditBox::setTitle(), show(), Engines::NWN::WidgetCheckBox::updateModel(), Engines::NWN::WidgetButton::WidgetButton(), Engines::NWN::WidgetCheckBox::WidgetCheckBox(), Engines::NWN::WidgetClose::WidgetClose(), Engines::NWN::WidgetListBox::WidgetListBox(), Engines::NWN::WidgetSlider::WidgetSlider(), and ~ModelWidget().