Frame Weaver

frame-weaver demonstrates how the frame drawing system resolves intersections while multiple frames with varying sizes, colors, and styles are added over time. It is the best showcase for mixed line styles, custom frame tiles, and automatic frame combination behavior.

Use This Demo When You Need…

  • A support example for frame intersections and overlapping panels.

  • A place to compare predefined FrameStyle values with custom Char16Style tiles.

  • A full-screen animation that makes frame composition behavior easy to inspect over time.

Run the Demo

Start the demo from the build directory:

$ ./cmake-build-debug/demo-apps/frame-weaver

Use F and S to change the pacing, C to clear the scene, the number keys to switch style groups, and Q to quit.

Captured Output (80x25)

Frame Weaver | frames 01/20 | interval 1.00s | mode heavy





                   ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛


[Q] quit [F]/[S] speed [C] clear [1] light [2] double [3] heavy [4] mixed [5]

The capture may not show the terminal output correctly. Here a screenshot:

../../_images/frame-weaver3.jpg

Features Demonstrated

  • Predefined FrameStyle values and a custom Char16Style frame tile set.

  • Automatic frame intersection handling via CharCombinationStyle::commonBoxFrame().

  • Repeated full-screen redraws with palette-driven color variations.

  • Randomized frame placement that stresses mixed styles and crossing borders.

Relevant Source Files

If you want to explore the implementation, start with demo/frame-weaver/src/FrameWeaverApp.cpp.

This file contains the render loop, random frame placement, and the custom style definition used by the demo.