BitQuirky.Graph.GraphView.Layout
Public bit quirky graph: editor symbols in BitQuirky.Graph.GraphView.Layout.
Source snapshot ad0983d00d77.
On this page
Assembly: BitQuirky.Graph.GraphView.Editor
GraphLayoutContext
Section titled “GraphLayoutContext”Category: Low-level runtime
class BitQuirky.Graph.GraphView.Layout.GraphLayoutContextSource declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:91-117
Snapshot the host hands to anIGraphLayoutDecorator after the tidy-tree pass has produced positions.
Responsibilities:
- Carry the just-laid-outGraphDefinitionplus the LayoutStatea decorator should adjust.
- Stay a plain data-bag with no methods; positions are mutated throughPositionsby the decorator.
Does NOT:
- Capture interaction state (selection, hover) - decorators are a layout pass, not an interaction pass.
Remarks
Round Trip: this is the parameter object the post-layout pass receives; consumers may need to extend it with project-specific hooks if they require richer context. Today it is intentionally minimal.
Members
Section titled “Members”public BitQuirky.Graph.GraphDefinition Graph { get; }Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:96
The graph the decorator is being asked to adjust.
Layout
Section titled “Layout”public BitQuirky.Graph.GraphView.ViewModels.LayoutState Layout { get; }Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:99
Positions produced by the main layout strategy.
GraphLayoutContext(GraphDefinition graph, LayoutState layout)
Section titled “GraphLayoutContext(GraphDefinition graph, LayoutState layout)”public GraphLayoutContext(BitQuirky.Graph.GraphDefinition graph, BitQuirky.Graph.GraphView.ViewModels.LayoutState layout)Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:110-114
Bundles what a post-layout pass is given:graphthe graph being laid
out andlayoutthe positions the main strategy just produced, which
the decorator adjusts in place.
IGraphLayoutDecorator
Section titled “IGraphLayoutDecorator”Category: Low-level runtime
interface BitQuirky.Graph.GraphView.Layout.IGraphLayoutDecoratorSource declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:57-65
Optional post-layout pass exposed by the graph library so consumers can re-position a subset of nodes whose semantics fall outside the generic tidy-tree shape.
Responsibilities:
- Read the just-computed positions inLayout and mutate them in place (or write replacements) so a downstream render pass picks up the adjusted positions.
- Remain idempotent: calling DecorateLayout twice on the same GraphLayoutContextmust yield identical positions ( layout determinism extends to decorators).
Does NOT:
- Mutate node order, child lists, or edge data; this is a positions-only pass.
- Take a dependency on any domain-specific node kind. Consumers that need to recognise specific node kinds (decorators, note bubbles, etc.) inspectGraph’s node metadata and key off generic fields.
Remarks
Round Trip: implement this interface if Round Trip introduces any concept of “annotation nodes that should not occupy their own layout row” (for example note bubbles attached to a parent). Otherwise leaveLayoutDecoratorStrategy null and no post-pass runs. The interface keeps the graph library generic; BT-specific decorator stacking lives in the behavior package’s project-glue layer per .
Members
Section titled “Members”DecorateLayout(GraphLayoutContext context)
Section titled “DecorateLayout(GraphLayoutContext context)”void DecorateLayout(BitQuirky.Graph.GraphView.Layout.GraphLayoutContext context)Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:64
Called once after the tidy-tree pass writes positions into
context. Implementations adjust positions
in place; the host repaints when the call returns.
Source fingerprint: sha256:ad0983d00d773d882bc61865e18d8c5559e009d181e5891575cd7f262515b23e