LLDB mainline
|
#include <Statusline.h>
Public Member Functions | |
Statusline (Debugger &debugger) | |
~Statusline () | |
void | Enable () |
Reduce the scroll window and draw the statusline. | |
void | Disable () |
Hide the statusline and extend the scroll window. | |
void | Redraw (bool update=true) |
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 |
std::string | m_last_str |
uint64_t | m_terminal_width = 0 |
uint64_t | m_terminal_height = 0 |
Definition at line 17 of file Statusline.h.
|
private |
Enumerator | |
---|---|
EnableStatusline | |
DisableStatusline | |
ResizeStatusline |
Definition at line 39 of file Statusline.h.
Statusline::Statusline | ( | Debugger & | debugger | ) |
Definition at line 36 of file Statusline.cpp.
References Enable(), m_debugger, m_terminal_height, and m_terminal_width.
Statusline::~Statusline | ( | ) |
Definition at line 42 of file Statusline.cpp.
References Disable().
void Statusline::Disable | ( | ) |
Hide the statusline and extend the scroll window.
Definition at line 62 of file Statusline.cpp.
References DisableStatusline, and UpdateScrollWindow().
Referenced by ~Statusline().
|
private |
Draw the statusline with the given text.
Definition at line 67 of file Statusline.cpp.
References ANSI_NORMAL, ANSI_RESTORE_CURSOR, ANSI_REVERSE_VIDEO, ANSI_SAVE_CURSOR, ANSI_TO_START_OF_ROW, m_debugger, m_last_str, m_terminal_height, m_terminal_width, lldb_private::Stream::Printf(), and lldb_private::ansi::TrimAndPad().
Referenced by Redraw().
void Statusline::Enable | ( | ) |
Reduce the scroll window and draw the statusline.
Definition at line 54 of file Statusline.cpp.
References EnableStatusline, Redraw(), and UpdateScrollWindow().
Referenced by Statusline().
void Statusline::Redraw | ( | bool | update = true | ) |
Redraw the statusline.
If update is false, this will redraw the last string.
Definition at line 130 of file Statusline.cpp.
References Draw(), lldb_private::FormatEntity::Format(), lldb_private::ExecutionContext::GetFrameSP(), lldb_private::ExecutionContext::GetProcessSP(), lldb_private::StreamString::GetString(), lldb_private::ExecutionContext::HasTargetScope(), m_debugger, m_last_str, lldb_private::ExecutionContext::SetTargetPtr(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
Referenced by Enable(), and TerminalSizeChanged().
void Statusline::TerminalSizeChanged | ( | ) |
Inform the statusline that the terminal dimensions have changed.
Definition at line 44 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 91 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 48 of file Statusline.h.
Referenced by Draw(), Redraw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().
|
private |
Definition at line 49 of file Statusline.h.
|
private |
Definition at line 51 of file Statusline.h.
Referenced by Draw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().
|
private |
Definition at line 50 of file Statusline.h.
Referenced by Draw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().