|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
Abstract editor pointer tool. Implementations are stateless across document load (the editor recreates them on document change is fine since Tool instances are cheap), but may carry per-drag state. More...
#include "donner/editor/Tool.h"
Public Member Functions | |
| Tool (const Tool &)=delete | |
| Tool & | operator= (const Tool &)=delete |
| Tool (Tool &&)=delete | |
| Tool & | operator= (Tool &&)=delete |
| virtual void | onMouseDown (EditorApp &editor, const Vector2d &documentPoint, MouseModifiers modifiers)=0 |
| Mouse button (left) was pressed at documentPoint. modifiers captures the modifier-key state at the moment of the press; implementations that don't care can ignore it. Default arguments on virtuals are banned by the style guide, so callers that don't need modifier state should pass MouseModifiers{} explicitly. | |
| virtual void | onMouseMove (EditorApp &editor, const Vector2d &documentPoint, bool buttonHeld)=0 |
| Mouse moved to documentPoint. buttonHeld is true while the left button is down — i.e., this is a drag continuation rather than a hover. | |
| virtual void | onMouseUp (EditorApp &editor, const Vector2d &documentPoint)=0 |
| Mouse button was released at documentPoint. | |
Abstract editor pointer tool. Implementations are stateless across document load (the editor recreates them on document change is fine since Tool instances are cheap), but may carry per-drag state.
|
pure virtual |
Mouse button (left) was pressed at documentPoint. modifiers captures the modifier-key state at the moment of the press; implementations that don't care can ignore it. Default arguments on virtuals are banned by the style guide, so callers that don't need modifier state should pass MouseModifiers{} explicitly.
Implemented in donner::editor::SelectTool.
|
pure virtual |
Mouse moved to documentPoint. buttonHeld is true while the left button is down — i.e., this is a drag continuation rather than a hover.
Implemented in donner::editor::SelectTool.
|
pure virtual |
Mouse button was released at documentPoint.
Implemented in donner::editor::SelectTool.