Display All Attributes

display-all-attributes gives you a compact visual overview of the ANSI character attributes supported by the library. It prints one row per attribute together with backend support information, sample text, and a few practical combinations.

Use This Demo When You Need…

  • A fast support checklist for attributes like italic, blink, hidden text, or strikethrough.

  • A real-terminal comparison between what the backend can emit and what the emulator actually renders.

  • A small reference for applying CharAttributes directly in line-oriented output.

Run the Demo

Start the demo from the build directory:

$ ./cmake-build-debug/demo-apps/display-all-attributes

The demo prints the table and waits for Enter in an interactive terminal.

Captured Output (80x25)

Display All Attributes
Visual differences depend on your terminal emulator and theme. If a sample looks
 unchanged, that attribute is likely ignored.
The backend support column shows what the library backend can emit, not what you
r terminal actually renders.

Attribute       Backend   ANSI      Sample
         Note
--------------------------------------------------------------------------------
-------------------
Bold           yes       1 / 22     The quick brown fox 0123  stronger emphasis
Dim            yes       2 / 22     The quick brown fox 0123  reduced intensity
Italic         yes       3 / 23     The quick brown fox 0123  often unsupported
in basic terminals
Underline      yes       4 / 24     The quick brown fox 0123  classic link-style
 emphasis
Blink          yes       5 / 25     The quick brown fox 0123  often disabled by
terminal emulators
Reverse        yes       7 / 27     The quick brown fox 0123  swaps foreground a
nd background
Hidden         yes       8 / 28     |hidden sample| text should disappear betwee
n the markers
Strikethrough  yes       9 / 29     The quick brown fox 0123  ANSI crossed-out t
ext

Common Combinations
These examples help spot interactions between attributes, especially reset handl
ing for bold and dim.
Bold + Underline            Highlighted heading sample
Italic + Strikethrough      Edited-out annotation sample
Bold + Blink + Reverse      High-attention sample

Press Enter to close the demo.

Features Demonstrated

  • Individual CharAttributes flags such as bold, dim, italic, underline, blink, reverse, hidden, and strikethrough.

  • Backend-reported support checks via Terminal::supportedCharAttributes().

  • Side-by-side display of ANSI SGR enable and disable codes.

  • Practical combination rows that make reset behavior easier to inspect.

Relevant Source Files

If you want to explore the implementation, start with demo/display-all-attributes/src/DisplayAllAttributesApp.cpp.

This file contains the attribute table generation and the direct use of CharAttributes with terminal print calls.