| 1 | // Copyright 2005 by Anthony Liekens [email protected] |
| 2 | |
| 3 | #ifndef SELECTION_H |
| 4 | #define SELECTION_H |
| 5 | |
| 6 | #include "coordinate.h" |
| 7 | |
| 8 | class Selection { |
| 9 | Coordinate c1, c2; |
| 10 | enum SelectionStates { NOT_SELECTING, SELECTING }; |
| 11 | SelectionStates state; |
| 12 | |
| 13 | public: |
| 14 | Selection(); |
| 15 | |
| 16 | void start(int, int); |
| 17 | void update(int, int); |
| 18 | void end(); |
| 19 | |
| 20 | void render(); |
| 21 | |
| 22 | double getMinX() const; |
| 23 | double getMaxX() const; |
| 24 | |
| 25 | double getMinY() const; |
| 26 | double getMaxY() const; |
| 27 | |
| 28 | bool isEmpty() const; |
| 29 | |
| 30 | bool isSelecting() const; |
| 31 | }; |
| 32 | |
| 33 | #endif |