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

A NWN portrait widget. More...

#include <portrait.h>

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

Public Member Functions

 PortraitWidget (::Engines::GUI &gui, const Common::UString &tag, const Common::UString &name, Portrait::Size size, float border=0.0f, float bR=1.0f, float bG=1.0f, float bB=1.0f, float bA=1.0f)
 
 ~PortraitWidget ()
 
void show ()
 Show the widget. More...
 
void hide ()
 Hide the widget. More...
 
void mouseDown (uint8 state, float x, float y)
 A mouse button was pressed on the widget. More...
 
void mouseWheel (uint8 state, int x, int y)
 A mouse wheel was used on the widget. More...
 
void setPosition (float x, float y, float z)
 Set the widget's position. More...
 
void setPortrait (const Common::UString &name)
 
void setBorderColor (float bR, float bG, float bB, float bA)
 
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::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::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 mouseUp (uint8 state, float x, float y)
 A mouse button was released 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 Attributes

Portrait _portrait
 

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)
 
- 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 NWN portrait widget.

Definition at line 121 of file portrait.h.

Constructor & Destructor Documentation

◆ PortraitWidget()

Engines::NWN::PortraitWidget::PortraitWidget ( ::Engines::GUI gui,
const Common::UString tag,
const Common::UString name,
Portrait::Size  size,
float  border = 0.0f,
float  bR = 1.0f,
float  bG = 1.0f,
float  bB = 1.0f,
float  bA = 1.0f 
)

Definition at line 293 of file portrait.cpp.

References _portrait, Graphics::Renderable::setClickable(), and Graphics::Renderable::setTag().

Here is the call graph for this function:

◆ ~PortraitWidget()

Engines::NWN::PortraitWidget::~PortraitWidget ( )

Definition at line 302 of file portrait.cpp.

Member Function Documentation

◆ getHeight()

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

Get the widget's height.

Reimplemented from Engines::Widget.

Definition at line 352 of file portrait.cpp.

References _portrait, and Engines::NWN::Portrait::getHeight().

Referenced by Engines::NWN::WidgetGridItemPortrait::getHeight().

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

◆ getWidth()

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

Get the widget's width.

Reimplemented from Engines::Widget.

Definition at line 348 of file portrait.cpp.

References _portrait, and Engines::NWN::Portrait::getWidth().

Referenced by Engines::NWN::WidgetGridItemPortrait::getWidth().

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

◆ hide()

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

Hide the widget.

Reimplemented from Engines::NWN::NWNWidget.

Definition at line 315 of file portrait.cpp.

References _portrait, Engines::NWN::NWNWidget::hide(), Graphics::Renderable::hide(), and Engines::Widget::isVisible().

Here is the call graph for this function:

◆ mouseDown()

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

A mouse button was pressed on the widget.

Reimplemented from Engines::Widget.

Definition at line 323 of file portrait.cpp.

References Engines::Widget::_owner, and Engines::Widget::mouseDown().

Here is the call graph for this function:

◆ mouseWheel()

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

A mouse wheel was used on the widget.

Reimplemented from Engines::Widget.

Definition at line 328 of file portrait.cpp.

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

Here is the call graph for this function:

◆ setBorderColor()

void Engines::NWN::PortraitWidget::setBorderColor ( float  bR,
float  bG,
float  bB,
float  bA 
)

Definition at line 344 of file portrait.cpp.

References _portrait, and Engines::NWN::Portrait::setBorderColor().

Referenced by Engines::NWN::WidgetGridItemPortrait::activate(), and Engines::NWN::WidgetGridItemPortrait::deactivate().

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

◆ setPortrait()

void Engines::NWN::PortraitWidget::setPortrait ( const Common::UString name)

Definition at line 340 of file portrait.cpp.

References _portrait, and Engines::NWN::Portrait::setPortrait().

Referenced by Engines::NWN::PartyLeader::setPortrait().

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

◆ setPosition()

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

Set the widget's position.

Reimplemented from Engines::NWN::NWNWidget.

Definition at line 333 of file portrait.cpp.

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

Referenced by Engines::NWN::PartyLeader::PartyLeader().

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

◆ setTag()

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

Set the widget's tag.

Reimplemented from Engines::Widget.

Definition at line 356 of file portrait.cpp.

References _portrait, Engines::Widget::getTag(), Engines::Widget::setTag(), and Graphics::Renderable::setTag().

Here is the call graph for this function:

◆ show()

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

Show the widget.

Reimplemented from Engines::Widget.

Definition at line 305 of file portrait.cpp.

References _portrait, Engines::Widget::isInvisible(), Engines::Widget::isVisible(), Engines::Widget::show(), and Graphics::Renderable::show().

Here is the call graph for this function:

Member Data Documentation

◆ _portrait

Portrait Engines::NWN::PortraitWidget::_portrait
private

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