xoreos  0.0.5
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Engines::NWN::WidgetListItemButton Class Reference

#include <listitembutton.h>

Inheritance diagram for Engines::NWN::WidgetListItemButton:
Inheritance graph
[legend]
Collaboration diagram for Engines::NWN::WidgetListItemButton:
Collaboration graph
[legend]

Public Member Functions

 WidgetListItemButton (::Engines::GUI &gui, const Common::UString &button, const Common::UString &text, const Common::UString &icon, uint32 otherButtons=0x04, const Common::UString &soundClick="gui_button")
 
 ~WidgetListItemButton ()
 
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 mouseDown (uint8 state, float x, float y)
 A mouse button was pressed on the widget. More...
 
void mouseUp (uint8 state, float x, float y)
 A mouse button was released on the widget. More...
 
void enter ()
 The mouse entered the widget. More...
 
void leave ()
 The mouse left the widget. More...
 
bool movable () const
 
void setUnmovable ()
 
void setTextColor (float r, float g, float b, float a)
 
void changeArrowDirection ()
 
- Public Member Functions inherited from Engines::NWN::WidgetListItemBaseButton
 WidgetListItemBaseButton (::Engines::GUI &gui, const Common::UString &button, float spacing=0.0f, const Common::UString &soundClick="gui_button")
 
 ~WidgetListItemBaseButton ()
 
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...
 
void setSound (const Common::UString &sound)
 
- Public Member Functions inherited from Engines::NWN::WidgetListItem
 WidgetListItem (::Engines::GUI &gui)
 
 ~WidgetListItem ()
 
bool operator< (const WidgetListItem &item) const
 
void mouseWheel (uint8 state, int x, int y)
 A mouse wheel was used on the widget. More...
 
void mouseDblClick (uint8 state, float x, float y)
 A mouse button was double-clicked on the widget. More...
 
void select ()
 
size_t getItemNumber () const
 
- Public Member Functions inherited from Engines::NWN::NWNWidget
 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::UStringgetTag () 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...
 
WidgetgetParent ()
 
const WidgetgetParent () const
 
WidgetgetChild (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 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 Member Functions

virtual void callbackHelp ()
 
- Protected Member Functions inherited from Engines::NWN::WidgetListItemBaseButton
bool activate ()
 
bool deactivate ()
 
- Protected Member Functions inherited from Engines::NWN::WidgetListItem
bool getState ()
 
void signalGroupMemberActive ()
 A fellow group member signaled that it is now active. More...
 
- Protected Member Functions inherited from Engines::Widget
void setActive (bool active)
 The widget's active state. More...
 
void raiseCallbackActive (Widget &widget)
 

Protected Attributes

Common::ScopedPtr< Graphics::Aurora::Text_text
 
Common::ScopedPtr< Portrait_icon
 
bool _isRight
 
bool _isMovable
 
Common::ScopedPtr< Graphics::Aurora::Model_helpButton
 
WidgetButton_moveButtonRight
 
WidgetButton_moveButtonLeft
 
- Protected Attributes inherited from Engines::NWN::WidgetListItemBaseButton
Common::ScopedPtr< Graphics::Aurora::Model_button
 
- 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...
 

Detailed Description

Definition at line 78 of file listitembutton.h.

Constructor & Destructor Documentation

◆ WidgetListItemButton()

Engines::NWN::WidgetListItemButton::WidgetListItemButton ( ::Engines::GUI gui,
const Common::UString button,
const Common::UString text,
const Common::UString icon,
uint32  otherButtons = 0x04,
const Common::UString soundClick = "gui_button" 
)

◆ ~WidgetListItemButton()

Engines::NWN::WidgetListItemButton::~WidgetListItemButton ( )

Definition at line 150 of file listitembutton.cpp.

Member Function Documentation

◆ callbackHelp()

void Engines::NWN::WidgetListItemButton::callbackHelp ( )
protectedvirtual

Reimplemented in Engines::NWN::WidgetListItemSpell, and Engines::NWN::WidgetListItemFeat.

Definition at line 283 of file listitembutton.cpp.

Referenced by mouseUp().

Here is the caller graph for this function:

◆ changeArrowDirection()

void Engines::NWN::WidgetListItemButton::changeArrowDirection ( )

◆ enter()

void Engines::NWN::WidgetListItemButton::enter ( )
virtual

The mouse entered the widget.

Reimplemented from Engines::Widget.

Definition at line 248 of file listitembutton.cpp.

References _helpButton.

◆ hide()

void Engines::NWN::WidgetListItemButton::hide ( )
virtual

Hide the widget.

Reimplemented from Engines::NWN::WidgetListItemBaseButton.

Definition at line 174 of file listitembutton.cpp.

References _icon, _isRight, _moveButtonLeft, _moveButtonRight, _text, Engines::NWN::WidgetListItemBaseButton::hide(), and Engines::NWN::ModelWidget::hide().

Referenced by changeArrowDirection(), and Engines::NWN::CharFeats::moveFeat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ leave()

void Engines::NWN::WidgetListItemButton::leave ( )
virtual

The mouse left the widget.

Reimplemented from Engines::Widget.

Definition at line 253 of file listitembutton.cpp.

References _helpButton.

◆ mouseDown()

void Engines::NWN::WidgetListItemButton::mouseDown ( uint8  state,
float  x,
float  y 
)
virtual

A mouse button was pressed on the widget.

Reimplemented from Engines::NWN::WidgetListItemBaseButton.

Definition at line 227 of file listitembutton.cpp.

References _helpButton, and Engines::NWN::WidgetListItemBaseButton::mouseDown().

Referenced by Engines::NWN::WidgetListItemVoice::mouseDown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mouseUp()

void Engines::NWN::WidgetListItemButton::mouseUp ( uint8  state,
float  x,
float  y 
)
virtual

A mouse button was released on the widget.

Reimplemented from Engines::NWN::WidgetListItem.

Definition at line 237 of file listitembutton.cpp.

References _helpButton, callbackHelp(), and Engines::NWN::WidgetListItem::mouseUp().

Referenced by Engines::NWN::WidgetListItemDomain::mouseUp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ movable()

bool Engines::NWN::WidgetListItemButton::movable ( ) const

Definition at line 258 of file listitembutton.cpp.

References _isMovable.

Referenced by Engines::NWN::CharFeats::callbackActive(), and Engines::NWN::WidgetListItemFeat::subActive().

Here is the caller graph for this function:

◆ setPosition()

void Engines::NWN::WidgetListItemButton::setPosition ( float  x,
float  y,
float  z 
)
virtual

Set the widget's position.

Reimplemented from Engines::NWN::WidgetListItemBaseButton.

Definition at line 191 of file listitembutton.cpp.

References Engines::NWN::WidgetListItemBaseButton::_button, _helpButton, _icon, _moveButtonLeft, _moveButtonRight, _text, Engines::NWN::WidgetListItemBaseButton::setPosition(), and Engines::NWN::WidgetButton::setPosition().

Referenced by Engines::NWN::WidgetListItemSkill::setPosition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTextColor()

void Engines::NWN::WidgetListItemButton::setTextColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 267 of file listitembutton.cpp.

References _text.

Referenced by Engines::NWN::CharClass::createClassList().

Here is the caller graph for this function:

◆ setUnmovable()

void Engines::NWN::WidgetListItemButton::setUnmovable ( )

Definition at line 262 of file listitembutton.cpp.

References _isMovable, and _text.

Referenced by Engines::NWN::CharFeats::makeKnownList().

Here is the caller graph for this function:

◆ show()

void Engines::NWN::WidgetListItemButton::show ( )
virtual

Show the widget.

Reimplemented from Engines::NWN::WidgetListItemBaseButton.

Definition at line 153 of file listitembutton.cpp.

References _icon, _isRight, _moveButtonLeft, _moveButtonRight, _text, Engines::NWN::ModelWidget::hide(), Engines::Widget::isVisible(), Engines::NWN::WidgetListItemBaseButton::show(), and Engines::NWN::ModelWidget::show().

Referenced by changeArrowDirection().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _helpButton

Common::ScopedPtr<Graphics::Aurora::Model> Engines::NWN::WidgetListItemButton::_helpButton
protected

Definition at line 113 of file listitembutton.h.

Referenced by enter(), leave(), mouseDown(), mouseUp(), setPosition(), and WidgetListItemButton().

◆ _icon

Common::ScopedPtr<Portrait> Engines::NWN::WidgetListItemButton::_icon
protected

Definition at line 108 of file listitembutton.h.

Referenced by hide(), setPosition(), show(), and WidgetListItemButton().

◆ _isMovable

bool Engines::NWN::WidgetListItemButton::_isMovable
protected

Definition at line 111 of file listitembutton.h.

Referenced by movable(), setUnmovable(), and WidgetListItemButton().

◆ _isRight

bool Engines::NWN::WidgetListItemButton::_isRight
protected

◆ _moveButtonLeft

WidgetButton* Engines::NWN::WidgetListItemButton::_moveButtonLeft
protected

Definition at line 116 of file listitembutton.h.

Referenced by hide(), setPosition(), show(), and WidgetListItemButton().

◆ _moveButtonRight

WidgetButton* Engines::NWN::WidgetListItemButton::_moveButtonRight
protected

Definition at line 115 of file listitembutton.h.

Referenced by changeArrowDirection(), hide(), setPosition(), show(), and WidgetListItemButton().

◆ _text

Common::ScopedPtr<Graphics::Aurora::Text> Engines::NWN::WidgetListItemButton::_text
protected

The documentation for this class was generated from the following files: