Skip to content
This repository has been archived by the owner on Apr 10, 2022. It is now read-only.

Curve/fancypp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

fancypp

Features

  • Single header only
  • Print colors and modifiers
  • Print basic stl Containers (everything that has .begin() and .end())
  • Print Tuples and Pairs
  • Print basic chrono types
  • Print booleans (true and false insteaod of 1 and 0)
  • Customizable

Requirements

  • C++17

Compatibility

Should work on all terminals that support ansi escape codes.
(Requires ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows)

Installation

Drop fancy.hpp into your project.

Preview

preview

Example

// Printing STL containers
std::vector<int> someInts = {1, 2, 3};
fancy << "SomeInts: " << someInts << std::endl;

// Printing custom colors
fancy << Fancy::ForegroundColor(255,100,120) << "Test" << std::endl;
fancy << Fancy::BackgroundColor(255,100,120) << "Test" << std::endl;

// Printing modifiers
fancy << Effect<EffectType::Underline> << Effect<EffectType::Blinking> << "Test" << std::endl;

// Simple highlight
fancy >> "Something that gets highlighted" << std::endl;

// More examples can be found in "src/example.cpp"

Customize

Create your Fancy::Stream instance with a custom Fancy::Config.

Fancy::Config config;
// Modify values of config

Fancy::Stream fancy(config);