|
LLDB mainline
|
Functions | |
| std::string | FormatAnsiTerminalCodes (llvm::StringRef format, bool do_color=true) |
| std::tuple< llvm::StringRef, llvm::StringRef, llvm::StringRef > | FindNextAnsiSequence (llvm::StringRef str) |
| std::string | StripAnsiTerminalCodes (llvm::StringRef str) |
| size_t | ColumnWidth (llvm::StringRef str) |
| std::string | TrimAtWordBoundary (llvm::StringRef str, size_t visible_length) |
| Trim the given string to the given visible length, at a word boundary. | |
| std::string | TrimAndPad (llvm::StringRef str, size_t visible_length, char padding=' ') |
| void | OutputWordWrappedLines (Stream &strm, llvm::StringRef text, uint32_t output_max_columns, bool use_color) |
|
inline |
Definition at line 246 of file AnsiTerminal.h.
References StripAnsiTerminalCodes().
Referenced by lldb_private::Editline::CountRowsForLine(), lldb_private::Editline::GetPromptWidth(), lldb_private::Editline::PromptForIndex(), and TrimAtWordBoundary().
|
inline |
Definition at line 206 of file AnsiTerminal.h.
References ANSI_ESC_START, and ANSI_ESC_START_LEN.
Referenced by StripAnsiTerminalCodes(), TrimAndPad(), and TrimAtWordBoundary().
|
inline |
Definition at line 113 of file AnsiTerminal.h.
References _TO_STR, ANSI_BG_COLOR_BLACK, ANSI_BG_COLOR_BLUE, ANSI_BG_COLOR_BRIGHT_BLACK, ANSI_BG_COLOR_BRIGHT_BLUE, ANSI_BG_COLOR_BRIGHT_CYAN, ANSI_BG_COLOR_BRIGHT_GREEN, ANSI_BG_COLOR_BRIGHT_PURPLE, ANSI_BG_COLOR_BRIGHT_RED, ANSI_BG_COLOR_BRIGHT_WHITE, ANSI_BG_COLOR_BRIGHT_YELLOW, ANSI_BG_COLOR_CYAN, ANSI_BG_COLOR_GREEN, ANSI_BG_COLOR_PURPLE, ANSI_BG_COLOR_RED, ANSI_BG_COLOR_WHITE, ANSI_BG_COLOR_YELLOW, ANSI_CTRL_BOLD, ANSI_CTRL_CONCEAL, ANSI_CTRL_CROSSED_OUT, ANSI_CTRL_FAINT, ANSI_CTRL_FAST_BLINK, ANSI_CTRL_IMAGE_NEGATIVE, ANSI_CTRL_ITALIC, ANSI_CTRL_NORMAL, ANSI_CTRL_SLOW_BLINK, ANSI_CTRL_UNDERLINE, ANSI_ESC_END, ANSI_ESC_START, ANSI_FG_COLOR_BLACK, ANSI_FG_COLOR_BLUE, ANSI_FG_COLOR_BRIGHT_BLACK, ANSI_FG_COLOR_BRIGHT_BLUE, ANSI_FG_COLOR_BRIGHT_CYAN, ANSI_FG_COLOR_BRIGHT_GREEN, ANSI_FG_COLOR_BRIGHT_PURPLE, ANSI_FG_COLOR_BRIGHT_RED, ANSI_FG_COLOR_BRIGHT_WHITE, ANSI_FG_COLOR_BRIGHT_YELLOW, ANSI_FG_COLOR_CYAN, ANSI_FG_COLOR_GREEN, ANSI_FG_COLOR_PURPLE, ANSI_FG_COLOR_RED, ANSI_FG_COLOR_WHITE, and ANSI_FG_COLOR_YELLOW.
Referenced by lldb_private::SourceManager::DisplaySourceLinesWithLineNumbersUsingLastFile(), lldb_private::Breakpoint::GetDescription(), lldb_private::Options::HandleOptionCompletion(), lldb_private::IOHandlerEditline::IOHandlerEditline(), lldb_private::Options::OutputFormattedUsageText(), lldb_private::Stream::PutCStringColorHighlighted(), lldb_private::HighlightStyle::ColorStyle::Set(), lldb_private::Debugger::SetPrompt(), lldb_private::IOHandlerEditline::SetPrompt(), lldb_private::Debugger::SetPropertyValue(), and lldb_private::IOHandlerEditline::SetUseColor().
|
inline |
Definition at line 410 of file AnsiTerminal.h.
References ANSI_CSI_CUF, lldb_private::Stream::EOL(), lldb_private::Stream::GetIndentLevel(), lldb_private::Stream::Indent(), and TrimAtWordBoundary().
Referenced by lldb_private::Options::OutputFormattedUsageText().
|
inline |
Definition at line 236 of file AnsiTerminal.h.
References FindNextAnsiSequence().
Referenced by ColumnWidth().
|
inline |
Definition at line 360 of file AnsiTerminal.h.
References FindNextAnsiSequence().
Referenced by lldb_private::Statusline::Draw().
|
inline |
Trim the given string to the given visible length, at a word boundary.
Visible length means its width when rendered to the terminal. The string can include ANSI codes and Unicode.
For a single word string, that word is returned in its entirety regardless of its visible length.
This function is similar to TrimAndPad, except that it must split on a word boundary. So there are some notable differences:
Definition at line 266 of file AnsiTerminal.h.
References ColumnWidth(), and FindNextAnsiSequence().
Referenced by OutputWordWrappedLines().