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

#include <shortcutcontainer.h>

Inheritance diagram for ShortcutContainer:

EmoteShortcutContainer ItemShortcutContainer

List of all members.


Detailed Description

A generic shortcut container.

Definition at line 36 of file shortcutcontainer.h.


Public Member Functions

 ShortcutContainer ()
 Constructor.
 ~ShortcutContainer ()
 Destructor.
virtual void draw (gcn::Graphics *graphics)=0
 Draws the shortcuts.
virtual void widgetResized (const gcn::Event &event)
 Invoked when a widget changes its size.
virtual void mouseDragged (gcn::MouseEvent &event)=0
 Handles mouse when dragged.
virtual void mousePressed (gcn::MouseEvent &event)=0
 Handles mouse when pressed.
virtual void mouseReleased (gcn::MouseEvent &event)=0
 Handles mouse release.
virtual int getMaxItems ()
virtual int getBoxWidth ()
virtual int getBoxHeight ()

Protected Member Functions

int getIndexFromGrid (int pointX, int pointY) const
 Gets the index from the grid provided the point is in an item box.

Protected Attributes

ImagemBackgroundImg
int mMaxItems
int mBoxWidth
int mBoxHeight
int mCursorPosX
int mCursorPosY
int mGridWidth
int mGridHeight

Static Protected Attributes

static float mAlpha = 1.0

Constructor & Destructor Documentation

ShortcutContainer::ShortcutContainer (  ) 

Constructor.

Initializes the shortcut container.

Definition at line 32 of file shortcutcontainer.cpp.

ShortcutContainer::~ShortcutContainer (  )  [inline]

Destructor.

Definition at line 49 of file shortcutcontainer.h.


Member Function Documentation

virtual void ShortcutContainer::draw ( gcn::Graphics *  graphics  )  [pure virtual]

Draws the shortcuts.

Implemented in EmoteShortcutContainer, and ItemShortcutContainer.

void ShortcutContainer::widgetResized ( const gcn::Event &  event  )  [virtual]

Invoked when a widget changes its size.

This is used to determine the new height of the container.

Definition at line 38 of file shortcutcontainer.cpp.

virtual void ShortcutContainer::mouseDragged ( gcn::MouseEvent &  event  )  [pure virtual]

Handles mouse when dragged.

Implemented in EmoteShortcutContainer, and ItemShortcutContainer.

virtual void ShortcutContainer::mousePressed ( gcn::MouseEvent &  event  )  [pure virtual]

Handles mouse when pressed.

Implemented in EmoteShortcutContainer, and ItemShortcutContainer.

virtual void ShortcutContainer::mouseReleased ( gcn::MouseEvent &  event  )  [pure virtual]

Handles mouse release.

Implemented in EmoteShortcutContainer, and ItemShortcutContainer.

virtual int ShortcutContainer::getMaxItems (  )  [inline, virtual]

Definition at line 77 of file shortcutcontainer.h.

virtual int ShortcutContainer::getBoxWidth (  )  [inline, virtual]

Definition at line 80 of file shortcutcontainer.h.

virtual int ShortcutContainer::getBoxHeight (  )  [inline, virtual]

Definition at line 83 of file shortcutcontainer.h.

int ShortcutContainer::getIndexFromGrid ( int  pointX,
int  pointY 
) const [protected]

Gets the index from the grid provided the point is in an item box.

Parameters:
pointX X coordinate of the point.
pointY Y coordinate of the point.
Returns:
index on success, -1 on failure.

Definition at line 53 of file shortcutcontainer.cpp.


Member Data Documentation

Definition at line 96 of file shortcutcontainer.h.

float ShortcutContainer::mAlpha = 1.0 [static, protected]

Definition at line 98 of file shortcutcontainer.h.

Definition at line 100 of file shortcutcontainer.h.

Definition at line 101 of file shortcutcontainer.h.

Definition at line 102 of file shortcutcontainer.h.

Definition at line 103 of file shortcutcontainer.h.

Definition at line 103 of file shortcutcontainer.h.

Definition at line 104 of file shortcutcontainer.h.

Definition at line 104 of file shortcutcontainer.h.


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

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