Expand description
What an editor exchanges with an operation while a step is edited: the
Presentation it shows, a Dialog of fields and the Visuals it
draws, and the Events of what the user did. Fields say what a value
means, never how it is edited, so a pick, a selection or a drag means
the same in every operation.
Re-exports§
pub use gizmo::Axis;pub use gizmo::Change;pub use gizmo::Gizmo;pub use gizmo::GizmoDrag;pub use gizmo::GizmoPart;pub use gizmo::GizmoView;pub use gizmo::Orientation;
Modules§
- gizmo
Gizmo: moving, turning and scaling something in the viewport by dragging a manipulator drawn at it — the one way every operation offers a drag in three dimensions.- hit
- Hit tests: which
VisualaPointeris over, shared by every operation so a click means the same thing whatever is being edited.
Structs§
- Action
- Something to do or to choose, as an
Control::Actionsoffers it. - Cell
- One cell of a
Table: what it holds, as text, and what is said of it. - Choice
- One option of a
Control::Select. - Column
- A column of a
Table. - Dialog
- The fields an operation shows for a step, in order: an ordered
dictionary from key to control, serialized as a list, so a UI renders it
with one
mapand keys each element by it. Keys are unique. - Extent
- How far a sheet reaches: a square of
sizeaboutcenter. - Field
- A control, and the key the events it sends carry.
- File
Entry - A file a
Control::Fileshows: by its path as the program names it,/-separated —../parts/bolt.geop, a shared library’s by its scheme,std:hex_nut.geop— and whether the field takes it. - Form
- What an operation shows for a step: the fields of its dialog and what
it draws, and what the editor needs to know to edit it the same way as
every other step — what is selected, what the operation has in hand,
what it drags. Plain data: what a field does when it is set is the
operation’s to say when it is sent the
Event. - List
Item - One entry of a
Control::List, with its own key: pressing it sendssuper::Value::Press, removing itRemove, editing its valueNumber. - Number
- A number field — of a plain number, or of one that may also be given
as a formula of the part’s parameters (see
Number::text). - Picked
- An element a
Referenceholds, and what the operation says of it. - Pointer
- Where the pointer is: the ray from the eye through it, how far from that ray it reaches, and which of what lies under it it means.
- Presentation
- What an editor shows for a step being edited: the operation’s
super::Form, and what the editor adds to it — what is picked, selected and hovered, what a click would pick, and the handles of number fields. - Preview
- What a click on an element would pick for a reference field, in the
part a reader reads, lit and drawn as it would be held (see
crate::selectable::previewed); none if it would pick nothing. It follows from what the field picks (seeReference::accepts), so two previews count as equal: a function’s address says nothing. - Prompt
- A value asked for in place, at
atin the viewport: a field of the dialog’s, bykey, typed into as text — what is typed sent back assuper::Value::Text— starting fromvalue. - Reference
- Elements of the part a step builds on, picked in the viewport: any
element of one of the kinds
accepts(seegeop_core_program::element::Kind::NAME). One element, or —multiple— any number, a pick adding or taking out one. Which of them the step can use is the operation’s to say, in what it holds (Picked::tone). - Table
- A table edited in place: columns with headers and kinds, rows of cells,
rows added, taken out and moved, cells typed into one at a time or
pasted as a block. Everything done to it is sent back as one
super::Value::Tableedit (seesuper::TableEdit); the operation holds the data, and says what each edit does. - Table
Row - One row of a
Table: a cell per column. - Track
- Where a number is dragged in the viewport: a handle at
at, sliding alongdirection— moving it bydirectionadds one to the number. - Visual
- Something an operation draws in the viewport, under a key the hit tests
report (see
super::hit::hit_visuals) — and what the user can do with it, which the editor handles alike for every operation (see the step editor,crate::step_editor).
Enums§
- Canvas
Event - A pointer or key event the editor passes on to an operation, having
taken what is its own: picks, selecting, dragging handles (see
the step editor,
crate::step_editor). - Column
Kind - What the cells of a
Table’s column hold, which decides how they are edited. - Control
- A dialog primitive.
- Event
- What reaches an operation of what the user did, once the editor has done what it does alike for every operation: arming a reference field and picking for it, dragging a number’s handle, selecting.
- InHand
- What an operation has in hand while a step is edited (see
Form::tool). - Layout
- Where an editor shows a step’s dialog, as the operation asks (see
super::Form::layout). - Pull
- What a step asks of the state while it is edited, for the editor to solve the program with: an operation never sets the state itself, it says where it wants it pulled, and the constraints have the last word.
- Reach
- How far from its ray a
Pointerreaches: what counts as under it, at any distance along the ray. Everything a viewer draws at a constant size on screen — a handle, a label, a frame datum — is laid out in reaches, so it is hit where it is drawn however far away or zoomed in the view is. - Shape
- What a visual is.
- Step
Edit Event - One thing the user did while editing a step.
- Style
- What a visual means, which decides how it is drawn.
- Table
Edit - What is done to a
super::Table, one thing at a time; rows and columns are named by their index in the table as it was shown. - Tone
- How a text reads: plain, a hint, a problem, or good news.
- Unit
- What a number measures, which decides how it reads and steps.
- Value
- What a field was set to — or that it was pressed: in the dialog, by a pick in the viewport, or by dragging a handle.
Constants§
- DRAG_
SNAP - Dragged values snap to this: a drag is for rough shaping, a dialog for exact values.
- TRIAD
- How long a
Shape::Triad’s arrows are, in reaches.
Functions§
- is_
formula - Whether
text, as a number field holds it, is a formula rather than a plain number.