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

#include <listitembutton.h>

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

Public Member Functions

 WidgetListItemBaseButton (::Engines::GUI &gui, const Common::UString &button, float spacing=0.0f, const Common::UString &soundClick="gui_button")
 
 ~WidgetListItemBaseButton ()
 
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...
 
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 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 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)
 

Protected Attributes

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...
 

Private Attributes

float _spacing
 
Common::UString _sound
 
Sound::ChannelHandle _channelHandle
 

Detailed Description

Definition at line 41 of file listitembutton.h.

Constructor & Destructor Documentation

◆ WidgetListItemBaseButton()

Engines::NWN::WidgetListItemBaseButton::WidgetListItemBaseButton ( ::Engines::GUI gui,
const Common::UString button,
float  spacing = 0.0f,
const Common::UString soundClick = "gui_button" 
)

Definition at line 43 of file listitembutton.cpp.

References _button, _channelHandle, Engines::loadModelGUI(), and Common::ScopedPtrBase< T, Deallocator >::reset().

Here is the call graph for this function:

◆ ~WidgetListItemBaseButton()

Engines::NWN::WidgetListItemBaseButton::~WidgetListItemBaseButton ( )

Definition at line 56 of file listitembutton.cpp.

Member Function Documentation

◆ activate()

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

Reimplemented from Engines::NWN::WidgetListItem.

Definition at line 105 of file listitembutton.cpp.

References _button, and Engines::NWN::WidgetListItem::activate().

Referenced by Engines::NWN::CharDomain::moveDomain().

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

◆ deactivate()

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

Reimplemented from Engines::NWN::WidgetListItem.

Definition at line 114 of file listitembutton.cpp.

References _button, _channelHandle, Engines::NWN::WidgetListItem::deactivate(), and SoundMan.

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

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

◆ getHeight()

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

Get the widget's height.

Reimplemented from Engines::Widget.

Definition at line 91 of file listitembutton.cpp.

References _button, and _spacing.

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

Here is the caller graph for this function:

◆ getWidth()

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

Get the widget's width.

Reimplemented from Engines::Widget.

Definition at line 87 of file listitembutton.cpp.

References _button.

◆ hide()

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

Hide the widget.

Reimplemented from Engines::Widget.

Reimplemented in Engines::NWN::WidgetListItemButton.

Definition at line 65 of file listitembutton.cpp.

References _button, and Engines::NWN::NWNWidget::hide().

Referenced by Engines::NWN::WidgetListItemCharacter::hide(), and Engines::NWN::WidgetListItemButton::hide().

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

◆ mouseDown()

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

A mouse button was pressed on the widget.

Reimplemented from Engines::Widget.

Reimplemented in Engines::NWN::WidgetListItemButton.

Definition at line 78 of file listitembutton.cpp.

References _channelHandle, _sound, Sound::kSoundTypeSFX, Engines::Widget::mouseDown(), Engines::playSound(), and SoundMan.

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

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

◆ setPosition()

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

Set the widget's position.

Reimplemented from Engines::Widget.

Reimplemented in Engines::NWN::WidgetListItemButton.

Definition at line 71 of file listitembutton.cpp.

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

Referenced by Engines::NWN::WidgetListItemCharacter::setPosition(), and Engines::NWN::WidgetListItemButton::setPosition().

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

◆ setSound()

void Engines::NWN::WidgetListItemBaseButton::setSound ( const Common::UString sound)

Definition at line 101 of file listitembutton.cpp.

References _sound.

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

Here is the caller graph for this function:

◆ setTag()

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

Set the widget's tag.

Reimplemented from Engines::Widget.

Definition at line 95 of file listitembutton.cpp.

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

Referenced by Engines::NWN::WidgetListItemDomain::WidgetListItemDomain(), Engines::NWN::WidgetListItemFeat::WidgetListItemFeat(), Engines::NWN::WidgetListItemSkill::WidgetListItemSkill(), and Engines::NWN::WidgetListItemSpell::WidgetListItemSpell().

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

◆ show()

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

Show the widget.

Reimplemented from Engines::Widget.

Reimplemented in Engines::NWN::WidgetListItemButton.

Definition at line 59 of file listitembutton.cpp.

References _button, and Engines::Widget::show().

Referenced by Engines::NWN::WidgetListItemCharacter::show(), and Engines::NWN::WidgetListItemButton::show().

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

Member Data Documentation

◆ _button

Common::ScopedPtr<Graphics::Aurora::Model> Engines::NWN::WidgetListItemBaseButton::_button
protected

◆ _channelHandle

Sound::ChannelHandle Engines::NWN::WidgetListItemBaseButton::_channelHandle
private

Definition at line 69 of file listitembutton.h.

Referenced by deactivate(), mouseDown(), and WidgetListItemBaseButton().

◆ _sound

Common::UString Engines::NWN::WidgetListItemBaseButton::_sound
private

Definition at line 68 of file listitembutton.h.

Referenced by mouseDown(), and setSound().

◆ _spacing

float Engines::NWN::WidgetListItemBaseButton::_spacing
private

Definition at line 67 of file listitembutton.h.

Referenced by getHeight().


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