EmoteContainer Class Reference
[Core GUI related classes (widgets)]

#include <emotecontainer.h>

List of all members.


Detailed Description

An emote container.

Used to show emotes in inventory and trade dialog.

Definition at line 44 of file emotecontainer.h.


Public Member Functions

 EmoteContainer ()
 Constructor.
virtual ~EmoteContainer ()
 Destructor.
void draw (gcn::Graphics *graphics)
 Draws the emotes.
void widgetResized (const gcn::Event &event)
 Called whenever the widget changes size.
void mousePressed (gcn::MouseEvent &event)
 Handles mouse click.
int getSelectedEmote ()
 Returns the selected emote.
void selectNone ()
 Sets selected emote to NULL.
void addSelectionListener (gcn::SelectionListener *listener)
 Adds a listener to the list that's notified each time a change to the selection occurs.
void removeSelectionListener (gcn::SelectionListener *listener)
 Removes a listener from the list that's notified each time a change to the selection occurs.

Private Member Functions

void setSelectedEmoteIndex (int index)
 Sets the currently selected emote.
void refindSelectedEmote (void)
 Find the current emote index by the most recently used emote ID.
void recalculateHeight (void)
 Determine and set the height of the container.
void distributeValueChangedEvent (void)
 Sends out selection events to the list of selection listeners.

Private Attributes

std::vector< const
AnimatedSprite * > 
mEmoteImg
ImagemSelImg
int mSelectedEmoteIndex
int mMaxEmote
std::list
< gcn::SelectionListener * > 
mListeners

Static Private Attributes

static const int gridWidth = 34
static const int gridHeight = 36

Constructor & Destructor Documentation

EmoteContainer::EmoteContainer (  ) 

Constructor.

Initializes the graphic.

Definition at line 48 of file emotecontainer.cpp.

EmoteContainer::~EmoteContainer (  )  [virtual]

Destructor.

Definition at line 71 of file emotecontainer.cpp.


Member Function Documentation

void EmoteContainer::draw ( gcn::Graphics *  graphics  ) 

Draws the emotes.

Definition at line 80 of file emotecontainer.cpp.

void EmoteContainer::widgetResized ( const gcn::Event &  event  ) 

Called whenever the widget changes size.

Definition at line 105 of file emotecontainer.cpp.

void EmoteContainer::mousePressed ( gcn::MouseEvent &  event  ) 

Handles mouse click.

Definition at line 156 of file emotecontainer.cpp.

int EmoteContainer::getSelectedEmote (  ) 

Returns the selected emote.

Definition at line 123 of file emotecontainer.cpp.

void EmoteContainer::selectNone (  ) 

Sets selected emote to NULL.

Definition at line 131 of file emotecontainer.cpp.

void EmoteContainer::addSelectionListener ( gcn::SelectionListener *  listener  )  [inline]

Adds a listener to the list that's notified each time a change to the selection occurs.

Definition at line 88 of file emotecontainer.h.

void EmoteContainer::removeSelectionListener ( gcn::SelectionListener *  listener  )  [inline]

Removes a listener from the list that's notified each time a change to the selection occurs.

Definition at line 97 of file emotecontainer.h.

void EmoteContainer::setSelectedEmoteIndex ( int  index  )  [private]

Sets the currently selected emote.

Invalid (e.g., negative) indices set `no emotr'.

Definition at line 136 of file emotecontainer.cpp.

void EmoteContainer::refindSelectedEmote ( void   )  [private]

Find the current emote index by the most recently used emote ID.

void EmoteContainer::recalculateHeight ( void   )  [private]

Determine and set the height of the container.

Definition at line 110 of file emotecontainer.cpp.

void EmoteContainer::distributeValueChangedEvent ( void   )  [private]

Sends out selection events to the list of selection listeners.

Definition at line 144 of file emotecontainer.cpp.


Member Data Documentation

std::vector<const AnimatedSprite*> EmoteContainer::mEmoteImg [private]

Definition at line 124 of file emotecontainer.h.

Definition at line 125 of file emotecontainer.h.

Definition at line 126 of file emotecontainer.h.

Definition at line 128 of file emotecontainer.h.

std::list<gcn::SelectionListener*> EmoteContainer::mListeners [private]

Definition at line 130 of file emotecontainer.h.

const int EmoteContainer::gridWidth = 34 [static, private]

Definition at line 132 of file emotecontainer.h.

const int EmoteContainer::gridHeight = 36 [static, private]

Definition at line 133 of file emotecontainer.h.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5