|
Nebula
|
#include <imguiconsole.h>
The ImGui console uses ImGui to produce a live interactive console.
Inherits Core::RefCounted.
Classes | |
| struct | LogEntry |
Public Types | |
| enum | LogMessageType { N_MESSAGE = 0 , N_INPUT = 1 , N_WARNING = 2 , N_ERROR = 3 , N_EXCEPTION = 4 , N_SYSTEM = 5 } |
| These are all the types of messages that can be printed in the console Depending on the type of the message, they are sorted into different categories by appending a type prefix to the message. More... | |
| enum | CommandMode { Python , CVar } |
Public Member Functions | |
| ImguiConsole () | |
| constructor | |
| virtual | ~ImguiConsole () |
| destructor | |
| void | Setup () |
| setup console, the ImguiAddon must be setup prior to this | |
| void | Discard () |
| discard console | |
| void | Render () |
| render, call this per-frame | |
| void | RenderContent () |
| render only content, You need to wrap this in ImGui::Begin and ImGui::End | |
| void | AppendToLog (const LogEntry &msg) |
| add line to the log | |
| bool | EvaluateCVar (Util::Array< Util::String > const &splits) |
Public Member Functions inherited from Core::RefCounted | |
| RefCounted () | |
| constructor | |
| int | GetRefCount () const |
| get the current refcount | |
| void | AddRef () |
| increment refcount by one | |
| void | Release () |
| decrement refcount and destroy object if refcount is zero | |
| bool | IsInstanceOf (const Rtti &rtti) const |
| return true if this object is instance of given class | |
| bool | IsInstanceOf (const Util::String &className) const |
| return true if this object is instance of given class by string | |
| bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
| return true if this object is instance of given class by fourcc | |
| bool | IsA (const Rtti &rtti) const |
| return true if this object is instance of given class, or a derived class | |
| bool | IsA (const Util::String &rttiName) const |
| return true if this object is instance of given class, or a derived class, by string | |
| bool | IsA (const Util::FourCC &rttiFourCC) const |
| return true if this object is instance of given class, or a derived class, by fourcc | |
| const Util::String & | GetClassName () const |
| get the class name | |
| Util::FourCC | GetClassFourCC () const |
| get the class FourCC code | |
Public Attributes | |
| Util::Array< Util::String > | previousCommands |
| int | previousCommandIndex |
| enum Dynui::ImguiConsole::CommandMode | cmdMode |
Private Member Functions | |
| __DeclareClass (ImguiConsole) | |
| __DeclareInterfaceSingleton (ImguiConsole) | |
| const char * | LogEntryTypeAsCharPtr (const LogMessageType &type) const |
| void | Execute (const Util::String &command) |
| run script command | |
Private Attributes | |
| bool | scrollToBottom |
| char | command [65535] |
| Util::RingBuffer< LogEntry > | consoleBuffer |
| IndexT | selectedSuggestion |
| Ptr< Scripting::ScriptServer > | scriptServer |
| bool | visible |
| Ptr< IO::TextWriter > | persistentHistory |
Additional Inherited Members | |
Static Public Member Functions inherited from Core::RefCounted | |
| static void | DumpRefCountingLeaks () |
| dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!) | |
Protected Member Functions inherited from Core::RefCounted | |
| virtual | ~RefCounted () |
| destructor (called when refcount reaches zero) | |
These are all the types of messages that can be printed in the console Depending on the type of the message, they are sorted into different categories by appending a type prefix to the message.
| Enumerator | |
|---|---|
| N_MESSAGE | Just plain white text. Adds [Message] prefix to the log message. |
| N_INPUT | User Input text. Appends nothing to the message. |
| N_WARNING | Warning text. Adds [Warning] to the message. |
| N_ERROR | Error message. Adds [Error] to the message. |
| N_EXCEPTION | Exception. Adds [FATAL ERROR] to the messsage. These are only used when the application encounters an assertion and needs to abort. |
| N_SYSTEM | default messages from system. Adds [SYSTEM] to the message |
| Dynui::ImguiConsole::ImguiConsole | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
private |
| void Dynui::ImguiConsole::AppendToLog | ( | const LogEntry & | msg | ) |
add line to the log
| void Dynui::ImguiConsole::Discard | ( | ) |
discard console
| bool Dynui::ImguiConsole::EvaluateCVar | ( | Util::Array< Util::String > const & | splits | ) |
|
private |
run script command
|
private |
| void Dynui::ImguiConsole::Render | ( | ) |
render, call this per-frame
| void Dynui::ImguiConsole::RenderContent | ( | ) |
render only content, You need to wrap this in ImGui::Begin and ImGui::End
| void Dynui::ImguiConsole::Setup | ( | ) |
setup console, the ImguiAddon must be setup prior to this
| enum Dynui::ImguiConsole::CommandMode Dynui::ImguiConsole::cmdMode |
|
private |
|
private |
|
private |
| int Dynui::ImguiConsole::previousCommandIndex |
| Util::Array<Util::String> Dynui::ImguiConsole::previousCommands |
|
private |
|
private |
|
private |
|
private |