Mouse control for the Display. More...
#include <Mouse.hpp>
Public Member Functions | |
| Mouse (Delegate *delegate) | |
| virtual void | install () |
| virtual void | load () |
| virtual void | onCanvasEvent (const CanvasEvent &event) |
| virtual void | onCanvasEventButton (const CanvasEvent &event) |
| virtual void | onCanvasEventDrag (const CanvasEvent &event) |
| virtual void | onCommandEvent (int command) |
Protected Member Functions | |
| void | addBindings () |
| void | addManipulators () |
| void | dragApply () |
| void | dragDecide () |
| void | enableScaleManipulators () |
| void | enableTranslateManipulators () |
| float | findDragAmount (int i) |
| void | pickItem () |
| bool | useUnconstrained (int command) |
Private Attributes | |
| Binding * | binding |
| Binding * | dragBindings [2] |
| CanvasState | state |
| CanvasState | last |
| GLuint | itemID |
| GLuint | shapeID |
| Manipulator * | manip |
| Vector | axis |
| Vector | direction |
| Vector | movement |
| Picker * | picker |
| int | iteration |
| int | index |
| bool | loaded |
Mouse control for the Display.
| void addBindings | ( | ) | [inline, protected] |
Installs the bindings for the mouse.
| void addManipulators | ( | ) | [inline, protected] |
Installs the manipulators to show for selected items.
| void dragDecide | ( | ) | [protected] |
Decides which axis the user should be allowed to drag in.
| void enableScaleManipulators | ( | ) | [protected] |
Use all the scale manipulators.
| void enableTranslateManipulators | ( | ) | [protected] |
Use all the translate manipulators.
| void install | ( | ) | [virtual] |
| void load | ( | ) | [virtual] |
Sets up picking and manipulators.
Implements Control.
| void onCanvasEvent | ( | const CanvasEvent & | event | ) | [virtual] |
Handles incoming events from the canvas.
| void onCanvasEventButton | ( | const CanvasEvent & | event | ) | [virtual] |
Handles mouse clicks.
| void onCanvasEventDrag | ( | const CanvasEvent & | event | ) | [virtual] |
Handles mouse dragging.
| void onCommandEvent | ( | int | command | ) | [virtual] |
Handles incoming events from the delegate.
| void pickItem | ( | ) | [protected] |
Finds the item ID and shape ID, and checks if item was manipulaor.
| bool useUnconstrained | ( | int | command | ) | [inline, protected] |
Commands that should not be constrained to one axis.
1.6.3