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

A text line widget within a NWN listbox widget. More...

#include <listbox.h>

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

Public Member Functions

 WidgetListItemTextLine (::Engines::GUI &gui, const Common::UString &font, const Common::UString &text, float spacing=0.0f)
 
 ~WidgetListItemTextLine ()
 
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 setUnselectedColor (float r, float g, float b, float a)
 
void setSelectedColor (float r, float g, float b, float a)
 
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...
 
- Public Member Functions inherited from Engines::NWN::WidgetListItem
 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...
 
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 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 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)
 

Private Attributes

Common::ScopedPtr< Graphics::Aurora::Text_text
 
float _uR
 
float _uG
 
float _uB
 
float _uA
 
float _sR
 
float _sG
 
float _sB
 
float _sA
 
float _fontHeight
 
float _spacing
 

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

A text line widget within a NWN listbox widget.

Definition at line 82 of file listbox.h.

Constructor & Destructor Documentation

◆ WidgetListItemTextLine()

Engines::NWN::WidgetListItemTextLine::WidgetListItemTextLine ( ::Engines::GUI gui,
const Common::UString font,
const Common::UString text,
float  spacing = 0.0f 
)

◆ ~WidgetListItemTextLine()

Engines::NWN::WidgetListItemTextLine::~WidgetListItemTextLine ( )

Definition at line 159 of file listbox.cpp.

Member Function Documentation

◆ activate()

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

Reimplemented from Engines::NWN::WidgetListItem.

Definition at line 214 of file listbox.cpp.

References _sA, _sB, _sG, _sR, _text, and Engines::NWN::WidgetListItem::activate().

Here is the call graph for this function:

◆ deactivate()

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

Reimplemented from Engines::NWN::WidgetListItem.

Definition at line 223 of file listbox.cpp.

References _text, _uA, _uB, _uG, _uR, and Engines::NWN::WidgetListItem::deactivate().

Here is the call graph for this function:

◆ getHeight()

float Engines::NWN::WidgetListItemTextLine::getHeight ( ) const
virtual

Get the widget's height.

Reimplemented from Engines::Widget.

Definition at line 201 of file listbox.cpp.

References _fontHeight, _spacing, and _text.

◆ getWidth()

float Engines::NWN::WidgetListItemTextLine::getWidth ( ) const
virtual

Get the widget's width.

Reimplemented from Engines::Widget.

Definition at line 197 of file listbox.cpp.

References _text.

◆ hide()

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

Hide the widget.

Reimplemented from Engines::Widget.

Definition at line 166 of file listbox.cpp.

References _text.

◆ setPosition()

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

Set the widget's position.

Reimplemented from Engines::Widget.

Definition at line 170 of file listbox.cpp.

References _text, Engines::Widget::getPosition(), and Engines::NWN::NWNWidget::setPosition().

Here is the call graph for this function:

◆ setSelectedColor()

void Engines::NWN::WidgetListItemTextLine::setSelectedColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 187 of file listbox.cpp.

References _sA, _sB, _sG, _sR, _text, and Engines::NWN::WidgetListItem::getState().

Here is the call graph for this function:

◆ setTag()

void Engines::NWN::WidgetListItemTextLine::setTag ( const Common::UString tag)
virtual

Set the widget's tag.

Reimplemented from Engines::Widget.

Definition at line 208 of file listbox.cpp.

References _text, and Engines::Widget::setTag().

Here is the call graph for this function:

◆ setUnselectedColor()

void Engines::NWN::WidgetListItemTextLine::setUnselectedColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 177 of file listbox.cpp.

References _text, _uA, _uB, _uG, _uR, and Engines::NWN::WidgetListItem::getState().

Here is the call graph for this function:

◆ show()

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

Show the widget.

Reimplemented from Engines::Widget.

Definition at line 162 of file listbox.cpp.

References _text.

Member Data Documentation

◆ _fontHeight

float Engines::NWN::WidgetListItemTextLine::_fontHeight
private

Definition at line 111 of file listbox.h.

Referenced by getHeight(), and WidgetListItemTextLine().

◆ _sA

float Engines::NWN::WidgetListItemTextLine::_sA
private

Definition at line 109 of file listbox.h.

Referenced by activate(), and setSelectedColor().

◆ _sB

float Engines::NWN::WidgetListItemTextLine::_sB
private

Definition at line 109 of file listbox.h.

Referenced by activate(), and setSelectedColor().

◆ _sG

float Engines::NWN::WidgetListItemTextLine::_sG
private

Definition at line 109 of file listbox.h.

Referenced by activate(), and setSelectedColor().

◆ _spacing

float Engines::NWN::WidgetListItemTextLine::_spacing
private

Definition at line 112 of file listbox.h.

Referenced by getHeight().

◆ _sR

float Engines::NWN::WidgetListItemTextLine::_sR
private

Definition at line 109 of file listbox.h.

Referenced by activate(), and setSelectedColor().

◆ _text

Common::ScopedPtr<Graphics::Aurora::Text> Engines::NWN::WidgetListItemTextLine::_text
private

◆ _uA

float Engines::NWN::WidgetListItemTextLine::_uA
private

Definition at line 108 of file listbox.h.

Referenced by deactivate(), setUnselectedColor(), and WidgetListItemTextLine().

◆ _uB

float Engines::NWN::WidgetListItemTextLine::_uB
private

Definition at line 108 of file listbox.h.

Referenced by deactivate(), setUnselectedColor(), and WidgetListItemTextLine().

◆ _uG

float Engines::NWN::WidgetListItemTextLine::_uG
private

Definition at line 108 of file listbox.h.

Referenced by deactivate(), setUnselectedColor(), and WidgetListItemTextLine().

◆ _uR

float Engines::NWN::WidgetListItemTextLine::_uR
private

Definition at line 108 of file listbox.h.

Referenced by deactivate(), setUnselectedColor(), and WidgetListItemTextLine().


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