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

An item widget within a NWN listbox widget. More...

#include <listbox.h>

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

Public Member Functions

 WidgetListItem (::Engines::GUI &gui)
 
 ~WidgetListItem ()
 
bool operator< (const WidgetListItem &item) const
 
void mouseUp (uint8 state, float x, float y)
 A mouse button was released on the widget. More...
 
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...
 
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...
 
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 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 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

bool getState ()
 
virtual bool activate ()
 
virtual bool deactivate ()
 
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)
 

Private Attributes

size_t _itemNumber
 
bool _state
 

Friends

class WidgetListBox
 

Additional Inherited Members

- 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

An item widget within a NWN listbox widget.

Definition at line 51 of file listbox.h.

Constructor & Destructor Documentation

◆ WidgetListItem()

Engines::NWN::WidgetListItem::WidgetListItem ( ::Engines::GUI gui)

Definition at line 52 of file listbox.cpp.

◆ ~WidgetListItem()

Engines::NWN::WidgetListItem::~WidgetListItem ( )

Definition at line 55 of file listbox.cpp.

Member Function Documentation

◆ activate()

bool Engines::NWN::WidgetListItem::activate ( )
protectedvirtual

◆ deactivate()

bool Engines::NWN::WidgetListItem::deactivate ( )
protectedvirtual

◆ getItemNumber()

size_t Engines::NWN::WidgetListItem::getItemNumber ( ) const

Definition at line 101 of file listbox.cpp.

References _itemNumber.

Referenced by Engines::NWN::WidgetGridBox::subActive().

Here is the caller graph for this function:

◆ getState()

bool Engines::NWN::WidgetListItem::getState ( )
protected

Definition at line 105 of file listbox.cpp.

References _state.

Referenced by Engines::NWN::WidgetListItemTextLine::setSelectedColor(), and Engines::NWN::WidgetListItemTextLine::setUnselectedColor().

Here is the caller graph for this function:

◆ mouseDblClick()

void Engines::NWN::WidgetListItem::mouseDblClick ( uint8  state,
float  x,
float  y 
)
virtual

A mouse button was double-clicked on the widget.

Reimplemented from Engines::Widget.

Definition at line 72 of file listbox.cpp.

References Engines::Widget::_owner, Engines::Widget::isDisabled(), and Engines::NWN::WidgetListBox::itemDblClicked().

Here is the call graph for this function:

◆ mouseUp()

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

A mouse button was released on the widget.

Reimplemented from Engines::Widget.

Reimplemented in Engines::NWN::WidgetListItemButton.

Definition at line 62 of file listbox.cpp.

References activate(), and Engines::Widget::isDisabled().

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

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

◆ mouseWheel()

void Engines::NWN::WidgetListItem::mouseWheel ( uint8  state,
int  x,
int  y 
)
virtual

A mouse wheel was used on the widget.

Reimplemented from Engines::Widget.

Definition at line 83 of file listbox.cpp.

References Engines::Widget::_owner, Engines::Widget::isDisabled(), and Engines::Widget::mouseWheel().

Here is the call graph for this function:

◆ operator<()

bool Engines::NWN::WidgetListItem::operator< ( const WidgetListItem item) const

Definition at line 58 of file listbox.cpp.

References Engines::Widget::getTag().

Here is the call graph for this function:

◆ select()

void Engines::NWN::WidgetListItem::select ( )

Definition at line 94 of file listbox.cpp.

References activate(), and Engines::Widget::isDisabled().

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

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

◆ signalGroupMemberActive()

void Engines::NWN::WidgetListItem::signalGroupMemberActive ( )
protectedvirtual

A fellow group member signaled that it is now active.

Reimplemented from Engines::Widget.

Definition at line 137 of file listbox.cpp.

References deactivate(), and Engines::Widget::signalGroupMemberActive().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ WidgetListBox

friend class WidgetListBox
friend

Definition at line 78 of file listbox.h.

Member Data Documentation

◆ _itemNumber

size_t Engines::NWN::WidgetListItem::_itemNumber
private

◆ _state

bool Engines::NWN::WidgetListItem::_state
private

Definition at line 76 of file listbox.h.

Referenced by activate(), deactivate(), and getState().


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