A user interface widget for the console, used for logging and displaying messages.
More...
#include <ConsoleWidget.hpp>
|
virtual void | draw () override |
| Implementation of the abstract draw method to render the console widget. More...
|
|
| Widget (std::string name) |
| Constructor to create a widget with a specified name. More...
|
|
| Widget (std::string name) |
| Constructor to create a widget with a specified name. More...
|
|
|
static constexpr size_t | MAX_LOGS = 50 |
| The maximum number of logs to keep in the console. More...
|
|
A user interface widget for the console, used for logging and displaying messages.
◆ clear()
void shkyera::ConsoleWidget::clear |
( |
| ) |
|
|
static |
Clear all logs from the console widget.
◆ disableVerbose()
void shkyera::ConsoleWidget::disableVerbose |
( |
| ) |
|
|
static |
Disable verbose logging mode.
◆ draw()
void shkyera::ConsoleWidget::draw |
( |
| ) |
|
|
overridevirtual |
Implementation of the abstract draw
method to render the console widget.
Implements shkyera::Widget.
◆ drawInfoBar()
void shkyera::ConsoleWidget::drawInfoBar |
( |
| ) |
const |
|
private |
Draw the information bar of the console widget.
◆ enableVerbose()
void shkyera::ConsoleWidget::enableVerbose |
( |
| ) |
|
|
static |
Enable verbose logging mode.
◆ logError()
void shkyera::ConsoleWidget::logError |
( |
std::string |
text | ) |
|
|
static |
Log an error message to the console.
- Parameters
-
text | The error message to log. |
◆ logInfo()
void shkyera::ConsoleWidget::logInfo |
( |
std::string |
text | ) |
|
|
static |
Log an informational message to the console.
- Parameters
-
text | The informational message to log. |
◆ logSuccess()
void shkyera::ConsoleWidget::logSuccess |
( |
std::string |
text | ) |
|
|
static |
Log a success message to the console.
- Parameters
-
text | The success message to log. |
◆ logVerbose()
void shkyera::ConsoleWidget::logVerbose |
( |
std::string |
text | ) |
|
|
static |
Log a verbose message to the console.
- Parameters
-
text | The verbose message to log. |
◆ Widget()
Constructor to create a widget with a specified name.
- Parameters
-
name | The name of the widget. |
◆ _logs
std::vector< std::shared_ptr< Log > > shkyera::ConsoleWidget::_logs = {} |
|
staticprivate |
A collection of logs in the console.
◆ _totalError
size_t shkyera::ConsoleWidget::_totalError = 0 |
|
staticprivate |
The total number of error logs.
◆ _totalInfo
size_t shkyera::ConsoleWidget::_totalInfo = 0 |
|
staticprivate |
The total number of informational logs.
◆ _totalSuccess
size_t shkyera::ConsoleWidget::_totalSuccess = 0 |
|
staticprivate |
The total number of success logs.
◆ _totalVerbose
size_t shkyera::ConsoleWidget::_totalVerbose = 0 |
|
staticprivate |
The total number of verbose logs.
◆ _verbose
bool shkyera::ConsoleWidget::_verbose = true |
|
staticprivate |
A flag indicating verbose logging mode.
◆ MAX_LOGS
constexpr size_t shkyera::ConsoleWidget::MAX_LOGS = 50 |
|
staticconstexpr |
The maximum number of logs to keep in the console.
The documentation for this class was generated from the following files: