![]() |
Consolix
|
Handles setting and retrieving the console window title. More...
#include <TitleComponent.hpp>
Public Member Functions | |
TitleComponent (const std::string &title=std::string()) | |
Constructs the component and optionally sets the console title. | |
virtual | ~TitleComponent () override=default |
Virtual destructor. | |
void | set_title (const std::string &title) |
Sets the console window title. | |
std::string | get_title () const |
Gets the last set console title. | |
bool | initialize () override |
Initializes the component (no-op). | |
bool | is_initialized () const override |
Checks if the component is initialized. | |
void | process () override |
Executes the component (no-op). | |
![]() | |
virtual | ~IAppComponent ()=default |
Virtual destructor for polymorphic usage. | |
Static Public Member Functions | |
static std::string | get_executable_name () |
Retrieves the executable name. | |
Private Attributes | |
std::string | m_title |
Stores the last set title. | |
Handles setting and retrieving the console window title.
This component provides a platform-independent way to change the console title.
SetConsoleTitleW()
.\033]0;TITLE\007
.Definition at line 20 of file TitleComponent.hpp.
|
inlineexplicit |
Constructs the component and optionally sets the console title.
title | The title to set for the console window. |
Definition at line 24 of file TitleComponent.hpp.
|
overridevirtualdefault |
Virtual destructor.
|
inlinestatic |
Retrieves the executable name.
Definition at line 53 of file TitleComponent.hpp.
|
inline |
Gets the last set console title.
Definition at line 47 of file TitleComponent.hpp.
|
inlineoverridevirtual |
Initializes the component (no-op).
Implements consolix::IAppComponent.
Definition at line 58 of file TitleComponent.hpp.
|
inlineoverridevirtual |
Checks if the component is initialized.
Implements consolix::IAppComponent.
Definition at line 63 of file TitleComponent.hpp.
|
inlineoverridevirtual |
Executes the component (no-op).
Implements consolix::IAppComponent.
Definition at line 68 of file TitleComponent.hpp.
|
inline |
Sets the console window title.
title | The new console title. |
Definition at line 35 of file TitleComponent.hpp.
|
private |
Stores the last set title.
Definition at line 71 of file TitleComponent.hpp.