#include <DraggableImage.h>
Inherits MouseListener.

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 | |
| MazeProgrammingController * | Controller |
| This is its parent controller. | |
| ButtonSpot * | Stack |
| 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 |
| WaveSound * | ClickSample |
| These are the sounds used by the class. | |
| WaveSound * | AddSample |
| WaveSound * | MissSample |
| DraggableImage::DraggableImage | ( | MazeCommand | command, | |
| MazeProgrammingController * | controller, | |||
| Point | _location, | |||
| int | width, | |||
| int | height | |||
| ) |
| DraggableImage::~DraggableImage | ( | ) | [virtual] |
| bool DraggableImage::containsPoint | ( | Point | p | ) | [virtual] |
Reimplemented from MouseListener.
| void DraggableImage::draw | ( | BITMAP * | bmp | ) |
| void DraggableImage::mouseClick | ( | MouseEvent * | ) | [virtual] |
| 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.
WaveSound * DraggableImage::AddSample [private] |
Point DraggableImage::ClickLocation [private] |
This remembers where on the image the mouse clicked, so the image sticks exactly to the mouse.
WaveSound* DraggableImage::ClickSample [private] |
These are the sounds used by the class.
MazeCommand DraggableImage::Command [private] |
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.
Point DraggableImage::location [private] |
WaveSound * DraggableImage::MissSample [private] |
Point DraggableImage::Origin [private] |
This is where the image returns to after it is released.
bool DraggableImage::Return [private] |
double DraggableImage::ReturnDX [private] |
double DraggableImage::ReturnDY [private] |
double DraggableImage::ReturnLocationX [private] |
These values are used for the animation of the image returning to its pile.
double DraggableImage::ReturnLocationY [private] |
int DraggableImage::ReturnTime [private] |
ButtonSpot* DraggableImage::Stack [private] |
This is the permanent image underneath that gives the appearance of more DraggableImages.
int DraggableImage::Width [private] |
1.5.7.1