feat: Implement in-place MText editor with formatting toolbar and live preview

- Added SVG icons for text formatting options (bold, italic, underline, overline, strike, uppercase, lowercase).
- Introduced a new `MTextEditorState` struct to manage the state of the MText editor.
- Implemented functionality to open the MText editor from the command line and edit existing MText entities.
- Added message handling for various MText editor actions (formatting, height, style, font, justification, alignment, line spacing).
- Created a dedicated preview area for MText rendering within the editor.
- Updated the command structure to support opening the MText editor and handling text input.
- Refactored existing MText command logic to integrate with the new editor.
This commit is contained in:
Hakan Seven committed 2026-05-30 23:24:06 +03:00
1 parent e2507d5c54
commit de08bd598c
20 files changed
+871 -36

No files matched your search

+9
View File
@@ -126,6 +126,15 @@ pub enum CmdResult {
SetPlotWindow { p1: Vec3, p2: Vec3 },
/// Replace the text content of a Text/MText entity in-place.
DdeditEntity { handle: Handle, new_text: String },
/// Open the in-place MText editor (formatting toolbar + multi-line text
/// area with live viewport preview). `handle` is `Some` when editing an
/// existing MText, `None` when creating a new one at `pos`.
OpenMTextEditor {
pos: Vec3,
handle: Option<Handle>,
initial: String,
height: f64,
},
/// Apply new pattern/scale/angle to an existing hatch entity.
HatcheditApply {
handle: Handle,