#include <shortcutcontainer.h>
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 | |
Image * | mBackgroundImg |
int | mMaxItems |
int | mBoxWidth |
int | mBoxHeight |
int | mCursorPosX |
int | mCursorPosY |
int | mGridWidth |
int | mGridHeight |
Static Protected Attributes | |
static float | mAlpha = 1.0 |
ShortcutContainer::ShortcutContainer | ( | ) |
Constructor.
Initializes the shortcut container.
Definition at line 32 of file shortcutcontainer.cpp.
ShortcutContainer::~ShortcutContainer | ( | ) | [inline] |
virtual void ShortcutContainer::draw | ( | gcn::Graphics * | graphics | ) | [pure virtual] |
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] |
virtual void ShortcutContainer::mousePressed | ( | gcn::MouseEvent & | event | ) | [pure virtual] |
virtual void ShortcutContainer::mouseReleased | ( | gcn::MouseEvent & | event | ) | [pure virtual] |
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.
pointX | X coordinate of the point. | |
pointY | Y coordinate of the point. |
Definition at line 53 of file shortcutcontainer.cpp.
Image* ShortcutContainer::mBackgroundImg [protected] |
Definition at line 96 of file shortcutcontainer.h.
float ShortcutContainer::mAlpha = 1.0 [static, protected] |
Definition at line 98 of file shortcutcontainer.h.
int ShortcutContainer::mMaxItems [protected] |
Definition at line 100 of file shortcutcontainer.h.
int ShortcutContainer::mBoxWidth [protected] |
Definition at line 101 of file shortcutcontainer.h.
int ShortcutContainer::mBoxHeight [protected] |
Definition at line 102 of file shortcutcontainer.h.
int ShortcutContainer::mCursorPosX [protected] |
Definition at line 103 of file shortcutcontainer.h.
int ShortcutContainer::mCursorPosY [protected] |
Definition at line 103 of file shortcutcontainer.h.
int ShortcutContainer::mGridWidth [protected] |
Definition at line 104 of file shortcutcontainer.h.
int ShortcutContainer::mGridHeight [protected] |
Definition at line 104 of file shortcutcontainer.h.