LLDB mainline
Statusline.h
Go to the documentation of this file.
1//===-- Statusline.h -----------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_CORE_STATUSLINE_H
10#define LLDB_CORE_STATUSLINE_H
11
14#include "lldb/lldb-forward.h"
15#include <cstdint>
16#include <string>
17
18namespace lldb_private {
20public:
21 Statusline(Debugger &debugger);
23
24 using Context = std::pair<ExecutionContextRef, SymbolContext>;
25
26 /// Reduce the scroll window and draw the statusline.
27 void Enable(std::optional<ExecutionContextRef> exe_ctx_ref);
28
29 /// Hide the statusline and extend the scroll window.
30 void Disable();
31
32 /// Redraw the statusline.
33 void Redraw(std::optional<ExecutionContextRef> exe_ctx_ref);
34
35 /// Inform the statusline that the terminal dimensions have changed.
37
38private:
39 /// Draw the statusline with the given text.
40 void Draw(std::string msg);
41
47
48 /// Set the scroll window for the given mode.
50
52
53 /// Cached copy of the execution context that allows us to redraw the
54 /// statusline.
56
57 uint64_t m_terminal_width = 0;
58 uint64_t m_terminal_height = 0;
59};
60} // namespace lldb_private
61#endif // LLDB_CORE_STATUSLINE_H
A class to manage flag bits.
Definition Debugger.h:80
Execution context objects refer to objects in the execution of the program that is being debugged.
void UpdateScrollWindow(ScrollWindowMode mode)
Set the scroll window for the given mode.
void TerminalSizeChanged()
Inform the statusline that the terminal dimensions have changed.
void Enable(std::optional< ExecutionContextRef > exe_ctx_ref)
Reduce the scroll window and draw the statusline.
std::pair< ExecutionContextRef, SymbolContext > Context
Definition Statusline.h:24
Statusline(Debugger &debugger)
void Redraw(std::optional< ExecutionContextRef > exe_ctx_ref)
Redraw the statusline.
void Disable()
Hide the statusline and extend the scroll window.
ExecutionContextRef m_exe_ctx_ref
Cached copy of the execution context that allows us to redraw the statusline.
Definition Statusline.h:55
void Draw(std::string msg)
Draw the statusline with the given text.
A class that represents a running process on the host machine.