Text Gallery
text-gallery demonstrates the text rendering side of the library in one interactive full-screen page set. It
combines framed panels, wrapped paragraphs, mixed-width Unicode text, animated bitmap-font titles, and compact footer
prompts.
Use This Demo When You Need…
A support example for alignment, wrapping, and mixed-width Unicode text inside framed panels.
A practical reference for bitmap-font text via
Font::defaultAscii().A single demo that shows several text-rendering techniques working together in one retained buffer.
Run the Demo
Start the demo from the build directory:
$ ./cmake-build-debug/demo-apps/text-gallery
Use the left and right arrow keys to switch pages. Press Q to quit.
Captured Output (80x25)
╭──────────────────────────────────────────────────────────────────────────────╮ │ Text Gallery | alignment, wrapping, wide characters, and bitmap fonts │ │ │ │ ┌─────────────Top Left──────────────┐ ┏━━━━━━━━━━━━━━Center━━━━━━━━━━━━━━━┓ │ │ │Small panels are an easy way to │ ┃ ┃ │ │ │compare alignment and wrapping side│ ┃ ┃ │ │ │by side. │ ┃The same paragraph can be centered ┃ │ │ │ │ ┃ without a custom layout engine. ┃ │ │ │ │ ┃ ┃ │ │ │ │ ┃ ┃ │ │ └───────────────────────────────────┘ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │ │ │ │ ╔═══════════Bottom Right════════════╗ ╭────────────Top Center─────────────╮ │ │ ║ ║ │ Wrapping respects the box width, │ │ │ ║ ║ │while alignment still decides where│ │ │ ║ ║ │ each line starts. │ │ │ ║ ║ │ │ │ │ ║ Right and bottom alignment stay║ │ │ │ │ ║readable even inside narrow frames.║ │ │ │ │ ╚═══════════════════════════════════╝ ╰───────────────────────────────────╯ │ │ │ │ │ │ [←][→] switch pages [Q] quit page 1/3 │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯
The capture may not show the terminal output correctly. Here a screenshot:
Features Demonstrated
Text layout using
Texttogether with multipleAlignmentmodes.Unicode-aware wrapping and centering of mixed-width characters.
Bitmap-font rendering using
Font::defaultAscii().Animated title coloring with
ColorSequenceandTextAnimation.Colored footer prompts assembled from
StringandCharelements.
Relevant Source Files
If you want to explore the implementation, start with demo/text-gallery/src/TextGalleryApp.cpp.
This file contains the complete layout logic for the panels, titles, and footer prompts shown in the demo.