[refactor] More post-NSS WebCrypto cleanups (utility functions).
[chromium-blink-merge.git] / tools / gn / standard_out.h
blob9ccbe52b4e4343ef091f5ee1cba8f1be74fdfdf0
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef TOOLS_GN_STANDARD_OUT_H_
6 #define TOOLS_GN_STANDARD_OUT_H_
8 #include <string>
10 enum TextDecoration {
11 DECORATION_NONE = 0,
12 DECORATION_DIM,
13 DECORATION_RED,
14 DECORATION_GREEN,
15 DECORATION_BLUE,
16 DECORATION_YELLOW
19 void OutputString(const std::string& output,
20 TextDecoration dec = DECORATION_NONE);
22 // Prints a line for a command, assuming there is a colon. Everything before
23 // the colon is the command (and is highlighted). After the colon if there is
24 // a square bracket, the contents of the bracket is dimmed.
26 // The line is indented 2 spaces.
27 void PrintShortHelp(const std::string& line);
29 // Rules:
30 // - Lines beginning with non-whitespace are highlighted up to the first
31 // colon (or the whole line if not).
32 // - Lines whose first non-whitespace character is a # are dimmed.
33 void PrintLongHelp(const std::string& text);
35 #endif // TOOLS_GN_STANDARD_OUT_H_