diff options
Diffstat (limited to 'anim/src/root.zig')
| -rw-r--r-- | anim/src/root.zig | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/anim/src/root.zig b/anim/src/root.zig index 5482285..bc807de 100644 --- a/anim/src/root.zig +++ b/anim/src/root.zig @@ -54,6 +54,8 @@ pub const Ties = tying.Ties; pub const Place = tying.Place; /// Says where a place is this frame, for a scene's own component the ties should find. pub const anchor = tying.anchor; +/// Where a place is this frame, in canvas pixels, if a panel said (`ties.find`). +pub const findPlace = tying.find; pub const Array = @import("array.zig").Array; pub const Loupe = @import("loupe.zig").Loupe; pub const syscalls = @import("syscalls.zig"); @@ -65,6 +67,10 @@ const words = @import("words.zig"); pub const Clock = words.Clock; pub const Caption = words.Caption; pub const Label = words.Label; +pub const Title = words.Title; +pub const ChapterLabel = words.ChapterLabel; +/// A `Ui` in the design's units that the camera does not move (`words.fixed`). +pub const fixed = words.fixed; pub const Veil = words.Veil; pub const Legend = words.Legend; /// The column (design/README.md, "column (an experiment)"): beat by beat, @@ -279,6 +285,9 @@ pub const Context = struct { /// (`graph.Blocks`), the map's drawing over the source; the /// disassembly beside it linear, its blocks ruled. graph: bool = false, + /// The registers the scene moves, where not its clock's way's + /// (`movedBy`): a scene in chapters has one set for all of them. + moves: ?u32 = null, }; /// The ties between the panes, drawn over everything added before. @@ -325,7 +334,7 @@ pub const Context = struct { pub fn context(s: *anim.Frame, cursor_: Cursor, options: Context.Options) Context { // The registers the scene moves keep their rows, the rest fold, chosen // once from its way; the panel is as tall as its rows, the stack has the rest. - const moves = contexts.movedBy(cursor_.rec, cursor_.by, .{ cursor_.first, cursor_.last }); + const moves = options.moves orelse contexts.movedBy(cursor_.rec, cursor_.by, .{ cursor_.first, cursor_.last }); const registers_rows: f32 = @floatFromInt(contexts.registerRows(moves)); const stage = Stage.init(s, layout.fit(options.split, registers_rows)); stage.registers_rows = registers_rows; @@ -352,6 +361,15 @@ pub fn context(s: *anim.Frame, cursor_: Cursor, options: Context.Options) Contex // The rest of the first two columns: no pane's. whole.addIn(s, map.Spare{ .cursor = at, .stage = whole.stage, .map = whole }, .map, .backtrace); map.current = whole; + // (Each frame anew: what a frame's `frame` made lives for that frame.) + if (map.maps_frame != s.in.frame) { + map.maps = @splat(null); + map.maps_frame = s.in.frame; + } + for (&map.maps) |*slot| if (slot.* == null) { + slot.* = whole; + break; + }; return .{ .stage = stage, .map = whole, |
