fontlabapp.fontui.tglyph_edit.Editor
Editor
Gesture state of one TGlyph window over model; Qt-free.
tool is "select" or "pen". drag holds the font-unit origin
of a point drag, band the screen rectangle of a rubber band, pen
the contour index the pen tool is extending, pending the font-unit
first point of a pen contour not yet written and before the glyph as
it was when the current gesture started.
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, model: TGlyphModel, label_prefix: str='TGlyph', *, read_only: bool=False) -> None |
|
busy |
attribute | (self) -> bool |
True while a drag or a rubber band is in progress. |
cancel |
function | (self) -> None |
Cancel a drag or rubber band; a drag preview reverts to <code>before</code>. |
commit |
function | (self, edit: Edit) -> str |
Write <code>edit</code><code> once; return the fingerprint of the drawn state for </code><code>Echo</code>. |
delete |
function | (self) -> Edit | None |
Delete the selected points; None without a selection. |
escape |
function | (self) -> bool |
Escape: cancel the gesture or end the pen contour; True when something ended. |
move |
function | (self, sx: float, sy: float) -> None |
Pointer moved: preview a drag (no write) or grow the rubber band. |
nudge |
function | (self, dx: float, dy: float) -> Edit | None |
Shift the selection by <code>(dx, dy)</code> font units; None without a selection. |
pen_click |
function | (self, sx: float, sy: float) -> Edit | None |
Pen click: start, extend or close an open contour. |
press |
function | (self, sx: float, sy: float, extend: bool=False) -> None |
Select-tool press: drag a hit selection, select a hit point, or start a band. |
release |
function | (self, sx: float | None=None, sy: float | None=None) -> Edit | None |
End the gesture; a drag that moved returns its <code>Move</code> edit, else None. |
reset |
function | (self) -> None |
Cancel the gesture (reverting a preview), end the pen contour and drop a pending point. |
set_tool |
function | (self, tool: str) -> None |
Switch to <code>"select"</code><code> or </code><code>"pen"</code>; any gesture and pen contour end. |
toggle |
function | (self) -> Edit | None |
Toggle selected on/off-curve roles; refuse invalid open endpoints. |