Skip to content
Bit Quirky Behavior Trees and
State Machines

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v0.11.0
Menu

BitQuirky.Graph.GraphView.Layout

Public bit quirky graph: editor symbols in BitQuirky.Graph.GraphView.Layout.

Source snapshot 29003d8b1658.

Assembly: BitQuirky.Graph.GraphView.Editor

Category: Low-level runtime

C#
class BitQuirky.Graph.GraphView.Layout.GraphLayoutContext

Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:76-102

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.

C#
public BitQuirky.Graph.GraphDefinition Graph { get; }

Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:81

The graph the decorator is being asked to adjust.

C#
public BitQuirky.Graph.GraphView.ViewModels.LayoutState Layout { get; }

Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:84

Positions produced by the main layout strategy.

GraphLayoutContext(GraphDefinition graph, LayoutState layout)

Section titled “GraphLayoutContext(GraphDefinition graph, LayoutState layout)”
C#
public GraphLayoutContext(BitQuirky.Graph.GraphDefinition graph, BitQuirky.Graph.GraphView.ViewModels.LayoutState layout)

Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:95-99

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.

Category: Low-level runtime

C#
interface BitQuirky.Graph.GraphView.Layout.IGraphLayoutDecorator

Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:42-50

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 .

DecorateLayout(GraphLayoutContext context)

Section titled “DecorateLayout(GraphLayoutContext context)”
C#
void DecorateLayout(BitQuirky.Graph.GraphView.Layout.GraphLayoutContext context)

Source declaration: ../bitquirky-graph/Editor/GraphView/Layout/IGraphLayoutDecorator.cs:49

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:29003d8b1658b98a79bebcd93e3b4030caf8511268b96817ab764d63df8d6c3b

Full-size image