DraggableImage Class Reference
[Maze minigame]

#include <DraggableImage.h>

Inherits MouseListener.

Collaboration diagram for DraggableImage:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DraggableImage (MazeCommand command, MazeProgrammingController *controller, Point _location, int width, int height)
virtual ~DraggableImage ()
void draw (BITMAP *bmp)
void mouseClick (MouseEvent *e)
 Called when the mouse clicks on a MouseListener.
void mouseDrag (MouseEvent *e)
 Called while the MouseListener is being dragged around, to give it updates on position.
void mouseRelease (MouseEvent *e)
 Called when a MouseListener was being dragged, and it is let go of.
bool containsPoint (Point p)

Private Member Functions

bool writeCommand (Point location)
 Ask the controller to attempt to write the command. If the image is over a ButtonSpot, it returns true.

Private Attributes

MazeProgrammingControllerController
 This is its parent controller.
ButtonSpotStack
 This is the permanent image underneath that gives the appearance of more DraggableImages.
Point ClickLocation
 This remembers where on the image the mouse clicked, so the image sticks exactly to the mouse.
Point Origin
 This is where the image returns to after it is released.
int Width
int Height
MazeCommand Command
 This is the command that the image represents.
double ReturnLocationX
 These values are used for the animation of the image returning to its pile.
double ReturnLocationY
double ReturnDX
double ReturnDY
int ReturnTime
bool Return
BITMAP * Image
 This is the bitmap associated with the DraggableImage.
Point location
WaveSoundClickSample
 These are the sounds used by the class.
WaveSoundAddSample
WaveSoundMissSample


Constructor & Destructor Documentation

DraggableImage::DraggableImage ( MazeCommand  command,
MazeProgrammingController controller,
Point  _location,
int  width,
int  height 
)

DraggableImage::~DraggableImage (  )  [virtual]


Member Function Documentation

bool DraggableImage::containsPoint ( Point  p  )  [virtual]

Reimplemented from MouseListener.

void DraggableImage::draw ( BITMAP *  bmp  ) 

void DraggableImage::mouseClick ( MouseEvent  )  [virtual]

Called when the mouse clicks on a MouseListener.

Reimplemented from MouseListener.

void DraggableImage::mouseDrag ( MouseEvent  )  [virtual]

Called while the MouseListener is being dragged around, to give it updates on position.

Reimplemented from MouseListener.

void DraggableImage::mouseRelease ( MouseEvent  )  [virtual]

Called when a MouseListener was being dragged, and it is let go of.

Reimplemented from MouseListener.

bool DraggableImage::writeCommand ( Point  location  )  [private]

Ask the controller to attempt to write the command. If the image is over a ButtonSpot, it returns true.


Member Data Documentation

This remembers where on the image the mouse clicked, so the image sticks exactly to the mouse.

These are the sounds used by the class.

This is the command that the image represents.

This is its parent controller.

int DraggableImage::Height [private]

BITMAP* DraggableImage::Image [private]

This is the bitmap associated with the DraggableImage.

This is where the image returns to after it is released.

bool DraggableImage::Return [private]

double DraggableImage::ReturnDX [private]

double DraggableImage::ReturnDY [private]

These values are used for the animation of the image returning to its pile.

This is the permanent image underneath that gives the appearance of more DraggableImages.

int DraggableImage::Width [private]


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

Generated on Mon Mar 16 14:33:08 2009 for LearningGaming by  doxygen 1.5.7.1