xoreos
0.0.5
|
#include <protoitem.h>
Public Member Functions | |
WidgetProtoItem (GUI &gui, const Common::UString &tag, WidgetListBox *parentList=0) | |
~WidgetProtoItem () | |
virtual void | setContents (const Common::UString &contents) |
Set item contents. More... | |
bool | isHovered () const |
virtual void | load (const Aurora::GFF3Struct &gff) |
void | enter () |
The mouse entered the widget. More... | |
void | leave () |
The mouse left the widget. More... | |
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... | |
void | setDisableHighlight (bool disableHighlight) |
void | setSoundHover (const Common::UString &resRef) |
void | setSoundClick (const Common::UString &resRef) |
Public Member Functions inherited from Engines::KotORJadeWidget | |
KotORJadeWidget (GUI &gui, const Common::UString &tag) | |
~KotORJadeWidget () | |
void | setClickable (bool clickable) |
Set the widget clickable, or not clickable. More... | |
void | setScissor (int x, int y, int width, int height) |
Create a scissor test over this widget. More... | |
void | setFill (const Common::UString &fill) |
void | setColor (float r, float g, float b, float a) |
void | setBorderColor (float r, float g, float b, float a) |
void | setWrapped (bool wrapped) |
void | setSubScene (Graphics::Aurora::SubSceneQuad *subscene) |
float | getBorderDimension () const |
void | setHighlight (const Common::UString &hilight) |
void | setHighlight (bool highlight) |
Set if the widget should be highlighted. More... | |
bool | isHighlight () |
If the widget is highlighted. More... | |
void | createText (const Common::UString &font, const Common::UString &str) |
Initialize the text within this widget. More... | |
void | setFont (const Common::UString &fnt) |
Change the font for this widget. More... | |
void | setText (const Common::UString &text) |
void | setTextColor (float r, float g, float b, float a) |
void | setHorizontalTextAlign (float halign) |
void | setVerticalTextAlign (float valign) |
float | getTextHeight (const Common::UString &text) const |
void | setTag (const Common::UString &tag) |
Set the widget's tag. More... | |
virtual void | show () |
Show the widget. More... | |
virtual void | hide () |
Hide the widget. More... | |
virtual void | setPosition (float x, float y, float z) |
Set the widget's position. More... | |
virtual void | setRotation (float angle) |
Set the rotation of the widget in degrees. More... | |
virtual void | setWidth (float width) |
Set the width of the widget. More... | |
virtual void | setHeight (float height) |
Set the height of the widget. More... | |
float | getWidth () const |
Get the widget's width. More... | |
float | getHeight () const |
Get the widget's height. More... | |
virtual void | setInvisible (bool invisible) |
Make the widget invisible. More... | |
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 | setDisabled (bool disabled) |
Disable/Enable the widget. 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 | 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 | setDefaultHighlighting (Graphics::Aurora::Highlightable *highlightable) |
Private Attributes | |
bool | _disableHighlight |
bool | _hovered |
WidgetListBox * | _parentList |
Common::UString | _soundHover |
Common::UString | _soundClick |
Definition at line 33 of file protoitem.h.
Engines::WidgetProtoItem::WidgetProtoItem | ( | GUI & | gui, |
const Common::UString & | tag, | ||
WidgetListBox * | parentList = 0 |
||
) |
Definition at line 34 of file protoitem.cpp.
Engines::WidgetProtoItem::~WidgetProtoItem | ( | ) |
Definition at line 41 of file protoitem.cpp.
|
virtual |
The mouse entered the widget.
Reimplemented from Engines::Widget.
Definition at line 65 of file protoitem.cpp.
References _disableHighlight, _hovered, _soundHover, Common::UString::empty(), Sound::kSoundTypeSFX, Engines::playSound(), and Engines::KotORJadeWidget::setHighlight().
bool Engines::WidgetProtoItem::isHovered | ( | ) | const |
Definition at line 49 of file protoitem.cpp.
References _hovered.
|
virtual |
The mouse left the widget.
Reimplemented from Engines::Widget.
Definition at line 75 of file protoitem.cpp.
References _disableHighlight, _hovered, and Engines::KotORJadeWidget::setHighlight().
|
virtual |
Reimplemented from Engines::KotORJadeWidget.
Reimplemented in Engines::KotORInventoryItem.
Definition at line 53 of file protoitem.cpp.
References Engines::KotORJadeWidget::getQuadHighlightableComponent(), Engines::KotORJadeWidget::getTextHighlightableComponent(), Engines::KotORJadeWidget::load(), and setDefaultHighlighting().
Referenced by Engines::KotORInventoryItem::load().
|
virtual |
A mouse button was released on the widget.
Reimplemented from Engines::Widget.
Definition at line 82 of file protoitem.cpp.
References _soundClick, Common::UString::empty(), Sound::kSoundTypeSFX, Engines::playSound(), and Engines::Widget::setActive().
|
virtual |
A mouse wheel was used on the widget.
Reimplemented from Engines::Widget.
Definition at line 108 of file protoitem.cpp.
References _parentList, and Engines::WidgetListBox::mouseWheel().
|
virtual |
Set item contents.
If not overriden this method will only change text.
Reimplemented in Engines::KotORInventoryItem.
Definition at line 44 of file protoitem.cpp.
References Engines::KotORJadeWidget::_text.
Referenced by Engines::WidgetListBox::refreshItemWidgets().
|
private |
Definition at line 101 of file protoitem.cpp.
References Graphics::Aurora::Highlightable::setHighlightable(), Graphics::Aurora::Highlightable::setHighlightDelta(), Graphics::Aurora::Highlightable::setHighlightLowerBound(), and Graphics::Aurora::Highlightable::setHighlightUpperBound().
Referenced by load().
void Engines::WidgetProtoItem::setDisableHighlight | ( | bool | disableHighlight | ) |
Definition at line 89 of file protoitem.cpp.
References _disableHighlight.
Referenced by Engines::KotORInventoryItem::KotORInventoryItem().
void Engines::WidgetProtoItem::setSoundClick | ( | const Common::UString & | resRef | ) |
Definition at line 97 of file protoitem.cpp.
References _soundClick.
void Engines::WidgetProtoItem::setSoundHover | ( | const Common::UString & | resRef | ) |
Definition at line 93 of file protoitem.cpp.
References _soundHover.
|
private |
Definition at line 60 of file protoitem.h.
Referenced by enter(), leave(), and setDisableHighlight().
|
private |
Definition at line 61 of file protoitem.h.
Referenced by enter(), isHovered(), and leave().
|
private |
Definition at line 63 of file protoitem.h.
Referenced by mouseWheel().
|
private |
Definition at line 66 of file protoitem.h.
Referenced by mouseUp(), and setSoundClick().
|
private |
Definition at line 65 of file protoitem.h.
Referenced by enter(), and setSoundHover().