LLDB mainline
lldb_private::Statusline Class Reference

#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 ClearExecutionContext ()
 Clear the cached execution context to discard stale pointers.
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

Debuggerm_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

Detailed Description

Definition at line 19 of file Statusline.h.

Member Typedef Documentation

◆ Context

Definition at line 24 of file Statusline.h.

Member Enumeration Documentation

◆ ScrollWindowMode

Enumerator
EnableStatusline 
DisableStatusline 
ResizeStatusline 

Definition at line 45 of file Statusline.h.

Constructor & Destructor Documentation

◆ Statusline()

Statusline::Statusline ( Debugger & debugger)

Definition at line 36 of file Statusline.cpp.

References m_debugger, m_terminal_height, and m_terminal_width.

◆ ~Statusline()

Statusline::~Statusline ( )

Definition at line 40 of file Statusline.cpp.

References Disable().

Member Function Documentation

◆ ClearExecutionContext()

void Statusline::ClearExecutionContext ( )

Clear the cached execution context to discard stale pointers.

Definition at line 128 of file Statusline.cpp.

References m_exe_ctx_ref.

◆ 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().

◆ Draw()

void Statusline::Draw ( std::string msg)
private

◆ Enable()

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().

◆ Redraw()

void Statusline::Redraw ( std::optional< ExecutionContextRef > exe_ctx_ref)

◆ 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().

◆ UpdateScrollWindow()

Member Data Documentation

◆ m_debugger

Debugger& lldb_private::Statusline::m_debugger
private

Definition at line 54 of file Statusline.h.

Referenced by Draw(), Redraw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().

◆ m_exe_ctx_ref

ExecutionContextRef lldb_private::Statusline::m_exe_ctx_ref
private

Cached copy of the execution context that allows us to redraw the statusline.

Definition at line 58 of file Statusline.h.

Referenced by ClearExecutionContext(), and Redraw().

◆ m_terminal_height

uint64_t lldb_private::Statusline::m_terminal_height = 0
private

Definition at line 61 of file Statusline.h.

Referenced by Draw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().

◆ m_terminal_width

uint64_t lldb_private::Statusline::m_terminal_width = 0
private

Definition at line 60 of file Statusline.h.

Referenced by Draw(), Statusline(), TerminalSizeChanged(), and UpdateScrollWindow().


The documentation for this class was generated from the following files: