|
LLDB mainline
|
#include <Statusline.h>
Public Types | |
| using | Context = std::pair<ExecutionContextRef, SymbolContext> |
Public Member Functions | |
| Statusline (Debugger &debugger) | |
| ~Statusline () | |
| void | Enable (std::optional< ExecutionContextRef > exe_ctx_ref) |
| Reduce the scroll window and draw the statusline. | |
| void | Disable () |
| Hide the statusline and extend the scroll window. | |
| void | Redraw (std::optional< ExecutionContextRef > exe_ctx_ref) |
| Redraw the statusline. | |
| void | TerminalSizeChanged () |
| Inform the statusline that the terminal dimensions have changed. | |
Private Types | |
| enum | ScrollWindowMode { EnableStatusline , DisableStatusline , ResizeStatusline } |
Private Member Functions | |
| void | Draw (std::string msg) |
| Draw the statusline with the given text. | |
| void | UpdateScrollWindow (ScrollWindowMode mode) |
| Set the scroll window for the given mode. | |
Private Attributes | |
| Debugger & | m_debugger |
| ExecutionContextRef | m_exe_ctx_ref |
| Cached copy of the execution context that allows us to redraw the statusline. | |
| uint64_t | m_terminal_width = 0 |
| uint64_t | m_terminal_height = 0 |
Definition at line 19 of file Statusline.h.
| using lldb_private::Statusline::Context = std::pair<ExecutionContextRef, SymbolContext> |
Definition at line 24 of file Statusline.h.
|
private |
| Enumerator | |
|---|---|
| EnableStatusline | |
| DisableStatusline | |
| ResizeStatusline | |
Definition at line 42 of file Statusline.h.
| Statusline::Statusline | ( | Debugger & | debugger | ) |
Definition at line 36 of file Statusline.cpp.
References m_debugger, m_terminal_height, and m_terminal_width.
| Statusline::~Statusline | ( | ) |
Definition at line 40 of file Statusline.cpp.
References Disable().
| void Statusline::Disable | ( | ) |
Hide the statusline and extend the scroll window.
Definition at line 60 of file Statusline.cpp.
References DisableStatusline, and UpdateScrollWindow().
Referenced by ~Statusline().
|
private |
Draw the statusline with the given text.
Definition at line 65 of file Statusline.cpp.
References ANSI_NORMAL, ANSI_RESTORE_CURSOR, ANSI_REVERSE_VIDEO, ANSI_SAVE_CURSOR, ANSI_TO_START_OF_ROW, m_debugger, m_terminal_height, m_terminal_width, lldb_private::Stream::Printf(), and lldb_private::ansi::TrimAndPad().
Referenced by Redraw().
| void Statusline::Enable | ( | std::optional< ExecutionContextRef > | exe_ctx_ref | ) |
Reduce the scroll window and draw the statusline.
Definition at line 52 of file Statusline.cpp.
References EnableStatusline, Redraw(), and UpdateScrollWindow().
| void Statusline::Redraw | ( | std::optional< ExecutionContextRef > | exe_ctx_ref | ) |
Redraw the statusline.
Definition at line 126 of file Statusline.cpp.
References Draw(), lldb_private::FormatEntity::Format(), lldb_private::GetStoppedExecutionContext(), lldb_private::StreamString::GetString(), m_debugger, and m_exe_ctx_ref.
Referenced by Enable(), and TerminalSizeChanged().
| void Statusline::TerminalSizeChanged | ( | ) |
Inform the statusline that the terminal dimensions have changed.
Definition at line 42 of file Statusline.cpp.
References m_debugger, m_terminal_height, m_terminal_width, Redraw(), ResizeStatusline, and UpdateScrollWindow().
|
private |
Set the scroll window for the given mode.
Definition at line 87 of file Statusline.cpp.
References ANSI_CLEAR_BELOW, ANSI_CLEAR_SCREEN, ANSI_RESTORE_CURSOR, ANSI_SAVE_CURSOR, ANSI_SET_SCROLL_ROWS, ANSI_UP_ROWS, DisableStatusline, EnableStatusline, m_debugger, m_terminal_height, m_terminal_width, lldb_private::Stream::Printf(), and ResizeStatusline.
Referenced by Disable(), Enable(), and TerminalSizeChanged().
|
private |
Definition at line 51 of file Statusline.h.
Referenced by Draw(), Redraw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().
|
private |
Cached copy of the execution context that allows us to redraw the statusline.
Definition at line 55 of file Statusline.h.
Referenced by Redraw().
|
private |
Definition at line 58 of file Statusline.h.
Referenced by Draw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().
|
private |
Definition at line 57 of file Statusline.h.
Referenced by Draw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().