diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-16 21:45:36 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-16 21:45:36 +0100 |
commit | 73598a9e7f49047d74ca439cb0f300099d8c03bf (patch) | |
tree | ef62148ac6769f169670a1e7f7fd8482045ef65f /src/crepe/util/LogColor.h | |
parent | d258fcc8efdb6a968a220c4590a204292a16ad42 (diff) | |
parent | 121b64b1cb6cfead5814070c8b0185d3d7308095 (diff) |
merge `master` into `loek/audio`
Diffstat (limited to 'src/crepe/util/LogColor.h')
-rw-r--r-- | src/crepe/util/LogColor.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/crepe/util/LogColor.h b/src/crepe/util/LogColor.h index 4b65127..132fb94 100644 --- a/src/crepe/util/LogColor.h +++ b/src/crepe/util/LogColor.h @@ -12,7 +12,13 @@ namespace crepe { */ class LogColor { public: - //! Get color code as stl string (or color content string) + /** + * \brief Get color code as STL string + * + * \param content If given, color this string and append a color reset escape sequence. + * + * \returns Color escape sequence + */ const std::string str(const std::string & content = "") const; public: @@ -20,6 +26,13 @@ public: LogColor & reset(); public: + /** + * \name Foreground colors + * + * These functions set the foreground (text) color. The \c bright parameter + * makes the color brighter, or bold on some terminals. + * \{ + */ LogColor & fg_black(bool bright = false); LogColor & fg_red(bool bright = false); LogColor & fg_green(bool bright = false); @@ -28,8 +41,16 @@ public: LogColor & fg_magenta(bool bright = false); LogColor & fg_cyan(bool bright = false); LogColor & fg_white(bool bright = false); + /// \} public: + /** + * \name Background colors + * + * These functions set the background color. The \c bright parameter makes + * the color brighter. + * \{ + */ LogColor & bg_black(bool bright = false); LogColor & bg_red(bool bright = false); LogColor & bg_green(bool bright = false); @@ -38,6 +59,7 @@ public: LogColor & bg_magenta(bool bright = false); LogColor & bg_cyan(bool bright = false); LogColor & bg_white(bool bright = false); + /// \} private: /** |