Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::editor::MouseModifiers Struct Reference

Modifier-key state captured at the moment a mouse event was dispatched. Tools use this for shift-add-to-selection, alt-clone, etc. Default-constructed = no modifiers, which keeps existing callsites that don't care about modifiers source-compatible. More...

#include "donner/editor/Tool.h"

Public Attributes

bool shift = false
 Shift held - used by SelectTool to toggle/extend selection rather than replacing it, and by PenTool for 45-degree constraints.
bool option = false
 Option/Alt held - used by transform handles to resize from center and by PenTool to break smooth-handle coupling.
bool command = false
 Cmd (macOS) / Ctrl held - used by PenTool to restrict a gesture to point editing (drag anchors/handles only, never place anchors).
bool doubleClick = false
 True when this mouse-down is the second click of a double-click - used by TextTool to start point text on empty canvas.
double pixelsPerDocUnit = 1.0
 Current viewport scale used for screen-pixel-stable hit testing.

Detailed Description

Modifier-key state captured at the moment a mouse event was dispatched. Tools use this for shift-add-to-selection, alt-clone, etc. Default-constructed = no modifiers, which keeps existing callsites that don't care about modifiers source-compatible.

Member Data Documentation

◆ command

bool donner::editor::MouseModifiers::command = false

Cmd (macOS) / Ctrl held - used by PenTool to restrict a gesture to point editing (drag anchors/handles only, never place anchors).

◆ doubleClick

bool donner::editor::MouseModifiers::doubleClick = false

True when this mouse-down is the second click of a double-click - used by TextTool to start point text on empty canvas.

◆ option

bool donner::editor::MouseModifiers::option = false

Option/Alt held - used by transform handles to resize from center and by PenTool to break smooth-handle coupling.

◆ pixelsPerDocUnit

double donner::editor::MouseModifiers::pixelsPerDocUnit = 1.0

Current viewport scale used for screen-pixel-stable hit testing.

◆ shift

bool donner::editor::MouseModifiers::shift = false

Shift held - used by SelectTool to toggle/extend selection rather than replacing it, and by PenTool for 45-degree constraints.


The documentation for this struct was generated from the following file: