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

A NWN widget with a text caption. More...

#include <nwnwidgetwithcaption.h>

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

Public Member Functions

 NWNWidgetWithCaption (::Engines::GUI &gui, const Common::UString &tag)
 
 ~NWNWidgetWithCaption ()
 
void show ()
 Show the widget. More...
 
void hide ()
 Hide the widget. More...
 
virtual void initCaption (const Common::UString &font, const Common::UString &text, float r=1.0f, float g=1.0f, float b=1.0f, float a=1.0f, float halign=Graphics::Aurora::kHAlignLeft, float valign=Graphics::Aurora::kVAlignTop)
 
void setPosition (float x, float y, float z)
 Set the widget's position. More...
 
void setColor (float r, float g, float b, float a)
 
void setText (const Common::UString &text)
 
const Common::UString getText () const
 
float getWidth () const
 Get the widget's width. More...
 
float getHeight () const
 Get the widget's height. More...
 
float getHorizontalAlign () const
 
float getVerticalAlign () const
 
void setDisabled (bool disabled)
 Disable/Enable the widget. 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...
 
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...
 
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 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 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...
 
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...
 

Protected Attributes

Common::ScopedPtr< Graphics::Aurora::Text_caption
 
float _r
 
float _g
 
float _b
 
float _a
 
- 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...
 

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)
 

Detailed Description

A NWN widget with a text caption.

One of the base NWN widget classes, the NWNWidgetWithCaption consists of a single Aurora Text.

Definition at line 47 of file nwnwidgetwithcaption.h.

Constructor & Destructor Documentation

◆ NWNWidgetWithCaption()

Engines::NWN::NWNWidgetWithCaption::NWNWidgetWithCaption ( ::Engines::GUI gui,
const Common::UString tag 
)

Definition at line 38 of file nwnwidgetwithcaption.cpp.

◆ ~NWNWidgetWithCaption()

Engines::NWN::NWNWidgetWithCaption::~NWNWidgetWithCaption ( )

Definition at line 43 of file nwnwidgetwithcaption.cpp.

Member Function Documentation

◆ getHeight()

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

Get the widget's height.

Reimplemented from Engines::Widget.

Definition at line 113 of file nwnwidgetwithcaption.cpp.

References _caption.

Referenced by initCaption().

Here is the caller graph for this function:

◆ getHorizontalAlign()

float Engines::NWN::NWNWidgetWithCaption::getHorizontalAlign ( ) const

◆ getText()

const Common::UString Engines::NWN::NWNWidgetWithCaption::getText ( ) const

Definition at line 101 of file nwnwidgetwithcaption.cpp.

References _caption, and Common::ScopedPtrBase< T, Deallocator >::get().

Here is the call graph for this function:

◆ getVerticalAlign()

float Engines::NWN::NWNWidgetWithCaption::getVerticalAlign ( ) const

Definition at line 125 of file nwnwidgetwithcaption.cpp.

References _caption, and Graphics::Aurora::kVAlignTop.

◆ getWidth()

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

Get the widget's width.

Reimplemented from Engines::Widget.

Definition at line 107 of file nwnwidgetwithcaption.cpp.

References _caption.

Referenced by initCaption().

Here is the caller graph for this function:

◆ hide()

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

Hide the widget.

Reimplemented from Engines::NWN::NWNWidget.

Definition at line 56 of file nwnwidgetwithcaption.cpp.

References _caption, Engines::NWN::NWNWidget::hide(), and Engines::Widget::isVisible().

Referenced by Engines::NWN::ModelWidget::hide().

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

◆ initCaption()

void Engines::NWN::NWNWidgetWithCaption::initCaption ( const Common::UString font,
const Common::UString text,
float  r = 1.0f,
float  g = 1.0f,
float  b = 1.0f,
float  a = 1.0f,
float  halign = Graphics::Aurora::kHAlignLeft,
float  valign = Graphics::Aurora::kVAlignTop 
)
virtual

◆ setColor()

void Engines::NWN::NWNWidgetWithCaption::setColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 84 of file nwnwidgetwithcaption.cpp.

References _a, _b, _caption, _g, and _r.

◆ setDisabled()

void Engines::NWN::NWNWidgetWithCaption::setDisabled ( bool  disabled)
virtual

Disable/Enable the widget.

Reimplemented from Engines::Widget.

Definition at line 131 of file nwnwidgetwithcaption.cpp.

References _a, _b, _caption, _g, _r, Engines::Widget::isDisabled(), and Engines::Widget::setDisabled().

Referenced by Engines::NWN::WidgetButton::setDisabled().

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

◆ setPosition()

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

Set the widget's position.

Reimplemented from Engines::NWN::NWNWidget.

Reimplemented in Engines::NWN::WidgetSlider.

Definition at line 76 of file nwnwidgetwithcaption.cpp.

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

Referenced by Engines::NWN::WidgetLabel::initCaption(), Engines::NWN::ModelWidget::setPosition(), Engines::NWN::WidgetLabel::setText(), Engines::NWN::OKCancelDialog::show(), and Engines::NWN::YesNoCancelDialog::show().

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

◆ setText()

void Engines::NWN::NWNWidgetWithCaption::setText ( const Common::UString text)

◆ show()

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

Show the widget.

Reimplemented from Engines::Widget.

Definition at line 46 of file nwnwidgetwithcaption.cpp.

References _caption, Engines::Widget::isInvisible(), Engines::Widget::isVisible(), and Engines::Widget::show().

Referenced by Engines::NWN::ModelWidget::show().

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

Member Data Documentation

◆ _a

float Engines::NWN::NWNWidgetWithCaption::_a
protected

Definition at line 78 of file nwnwidgetwithcaption.h.

Referenced by setColor(), and setDisabled().

◆ _b

float Engines::NWN::NWNWidgetWithCaption::_b
protected

Definition at line 77 of file nwnwidgetwithcaption.h.

Referenced by setColor(), and setDisabled().

◆ _caption

Common::ScopedPtr<Graphics::Aurora::Text> Engines::NWN::NWNWidgetWithCaption::_caption
protected

◆ _g

float Engines::NWN::NWNWidgetWithCaption::_g
protected

Definition at line 76 of file nwnwidgetwithcaption.h.

Referenced by setColor(), and setDisabled().

◆ _r

float Engines::NWN::NWNWidgetWithCaption::_r
protected

Definition at line 75 of file nwnwidgetwithcaption.h.

Referenced by setColor(), and setDisabled().


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