All key events go through a hidden St Entry.
* Ibus inputs support.
* GS keyboard support, by moving the keyboard box above the drawing area.
* All convenience keybindings of a St Entry (cursor moves, delete, paste, select all ...).
* Add a writing action mode so some keybindings are disabled when writing (e.g. `Delete` and `Ctrl + A`).
* Draw a thin rectangle as text cursor instead of a text character, so moving the cursor is smoother.
Close#29, #34
While attributes are not changed in user.css, they are persistent through drawing mode toggling. Css attributes that are modifiable in the user interface are just default attributes.
Close#27
* Populate 'Open' and 'Save' submenu on opening. It prevents the 'jump'.
* By removing the previous trick, it now give the key-focus to the first item when opening the menu with 'Menu' key.
* Close menu before toggling modal (before because the menu changes `Main.actionMode`).
* Hide the helper and update the grid display when toggling modal.
* Signal `stop-drawing` -> `leave-drawing-mode` for consistence.
* `area.disable` -> area `destroy` event handler.
* `area.isInDrawingMode` -> `area.reactive`.
Keybinding to ungrab keyboard and mouse while drawing remains at the top.
To be aware that this create some problems with the shell (DnD #1 and maybe more ?).
related to #6, #9, #20, #24, #33
* Fix reflection and inversion SVG transformations.
* Remove the Cairo wrappers (crRotate, crScale, crTranslate).
* Cairo transformation builds are now similar to SVG transformation builds.
Since reflection and inversion introductions, compute center only with the slides of the traslations is not correct.
* `_getCenter` -> `_getOriginalCenter`
* `_getCenterWithSlide` -> `_getTransformedCenter`
* Use pango matrices to compute the new center position since matrices from Cairo, Graphene, ..., are not available with GJS.
* Stock original center and transformed center to not compute it numerous time.
Use `cr.fillPreserve, ..., then cr.stroke` instead of `cr.copyPath, ..., cr.stroke, cr.appendPath, cr.fill`
Was there a reason for painting stroke before fill ?
Is something broken ?
* Use `cr.save` and `cr.stroke` (Restore the context but not the path).
* Use `cr.identityMatrix` to clean context after transformations.
Inverting transformations was not enough, in particular with combinations of scale and rotate (`SCALE_ANGLE`, `REFLECTION`, ...).
Now all elements can be grabbed correctly.
* `SCALE_PRESERVE` (preserve ratio)
* `SCALE` (vertical, horizontal or both)
There is a third transformation, `SCALE_ANGLE`, that is not used because it causes problems to the `elementFinder`. Probably a bug of Cairo.inStroke that do no consider scales.
* 'Shapes' -> 'Tools' ('Shapes' + 'Manipulations')
* 'TextState' -> 'TextStates'
* Rotation centers are now computed dynamically (when building Cairo or SVG paths).
* Text rotation center is now located at the beginning of the text.
* Text elements gain a 'lineIndex' attribute to retrieve the rotation center of the first line.
```
JS WARNING: [/home/.../draw.js 997]: reference to undefined property "state"
```
The state property is undefined if the element is loaded from json file.