Skip to main content

Crate ferroui_designer_tools

Crate ferroui_designer_tools 

Source
Expand description

Portable editor tools that produce source transactions. A host supplies measured geometry; layout, property and selection commands never mutate preview objects directly.

Structs§

Affine
Row-vector affine transform: x’=xm11+ym21+dx, y’=xm12+ym22+dy.
ComponentCatalog
ComponentEntry
ComponentReference
ComponentResourceContext
The runtime’s active theme and its inheritance chain, nearest inherited variant first. None (or Default) looks only in Default dictionaries before merges. Keys are decoded string theme keys; custom expression keys remain uncertain.
ComponentResourceResolution
All declarations which might supply a resource in this context. With no theme context, this is a conservative union across theme variants and their fallbacks.
EditorRegistry
GridLines
GridTrackPlacement
Effective placement along one axis, supplied by a native host after resolving styles.
LayoutCapabilities
LayoutContext
Bounds and resolved slots use one common coordinate space. Grid boundaries use panel-local units.
LayoutGuide
LayoutHandle
LayoutHelperRequest
LayoutHelperScene
LayoutPlacement
LayoutRegistry
MoveGesture
An immutable drag start snapshot. Preview is pure geometry; commit refuses to apply a stale gesture after source or collaboration edits have changed the authored revision.
Point
PropertyDescriptor
PropertyRegistry
PropertyState
Rect
ResolvedLayout
Effective layout values supplied by the live host. A slot is the rectangle passed to the child’s arrange method, before its margins, alignment and render transform are applied.
Selection
SnapGuide
SnapIndex
Immutable, sorted guide geometry for repeated pointer updates. Prepare once when a gesture begins; each query examines only the nearest two guides for each anchor, independent of the number of objects on the artboard.
SnapResult
SnapSettings
ToolError

Enums§

Alignment
Axis
ComponentAction
Semantic commands suitable for UI controls, automation and alternative designer hosts.
ComponentKind
DockSide
ExpressionPolicy
GridLength
GridTrackChange
Indices refer to the current axis. Insertion is before index, including len() to append.
LayoutAction
LayoutGuideGeometry
LayoutGuideRole
LayoutHandleAction
PropertyKind
PropertyValueShape
RelativeRelation
SelectionMode

Traits§

LayoutAdapter
Third-party panels register source planners, with the same transactional validation as built-ins.
ValueEditor
Property validation is independent of native editor widgets. A host can register a custom value editor first and use its ID to choose an associated native control factory.

Functions§

align
component_fragment
A self-contained source fragment retaining original trivia and all inherited namespaces. Explicit namespace declarations on the element are kept exactly as authored.
component_property_attribute
Read the authored scalar/expression while preserving a qualified attribute’s prefix.
component_property_elements
Resolve a property’s authored object container by its expanded owner/member identity. Different application namespaces and attached-property owners remain independent.
component_property_object
Export a property’s object/collection content with independent namespace closure.
component_resource_expression
Build a scope-qualified StaticResource/DynamicResource expression without treating punctuation, quotes or a leading brace in the key as markup syntax.
component_resource_references
component_resource_resolution
Inspect resource lookup, including possible references which cannot safely be represented by a single NodeId. Authoring uses this conservative information to protect resources referenced only in some themes or behind external providers.
distribute
grid_track_values
Returns lexical lengths, including bindings on individual definitions. Inspectors can display such values without replacing an expression or discarding definition metadata.
outermost
Remove descendant selections and duplicates so moving a selected group does not move a child twice. Order remains the caller’s order; unknown IDs are rejected rather than silently ignored.
plan_component_action
plan_component_action_in_context
Plan resource application against an explicit runtime theme. All other actions, especially rename and deletion, retain conservative cross-theme reference checks. A host must revalidate the targets’ actual theme context before committing this plan.
plan_grid_track_change
Plans one atomic definition/cell edit. Inserts expand a child spanning the new track; removals shrink spans and move children in a removed track to its surviving neighbour. Bound cell positions are rejected because their future effective index is not knowable.
plan_grid_track_change_with_placements
Native variant: every authored child must have a measured placement. Hosts must reject active bindings before supplying these values, as a new local value would detach them.
plan_layout_attributes
Plan native layout attributes without changing attached-property namespace identity or overwriting bindings/property elements. Values must already be validated by the adapter. New native attached properties are qualified when the lexical default namespace is custom.
plan_property_object
Replace/reset a single object or collection property across a selection atomically. Input fragments may use namespaces inherited from the target, or declare their own.
resolve_component_resource
Resolve a resource without guessing an active theme. Local entries take precedence; then theme dictionaries and their Default fallback; then reverse-order merges and ancestors. Ambiguous theme variants and unindexed external providers return None.
resolve_component_resource_in_context
Resolve using the actual runtime theme and complete inherited-variant chain.
visible_component_resources
Visible string-key resources, with nearest scope and merge order already resolved.
visible_component_resources_in_context
Visible string-key resources for one concrete runtime theme, using the same resolution contract as plan_component_action_in_context resource application.

Type Aliases§

Result