SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ConsoleWindow Struct Reference

A window for Console (from Imgui example.) More...

#include <consoleWindow.h>

Public Member Functions

 ConsoleWindow ()
 Construct a new ConsoleWindow.
 
 ~ConsoleWindow ()
 
void clearLog ()
 Clear the ConsoleWindow's log.
 
void addLog (const char *fmt,...) IM_FMTARGS(2)
 Add a const char * to the log.
 
void addLog (std::string s)
 Add a string to the log.
 
void draw (const char *title, Console &console)
 Draw the console window.
 
void execCommand (const char *command_line, Console &console)
 Execute a console command.
 
int textEditCallback (ImGuiInputTextCallbackData *data)
 

Static Public Member Functions

static int Stricmp (const char *s1, const char *s2)
 
static int Strnicmp (const char *s1, const char *s2, int n)
 
static charStrdup (const char *s)
 
static void Strtrim (char *s)
 
static int TextEditCallbackStub (ImGuiInputTextCallbackData *data)
 

Public Attributes

char InputBuf [256]
 
ImVector< char * > Items
 
ImVector< const char * > Commands
 
ImVector< char * > History
 
int HistoryPos
 
ImGuiTextFilter Filter
 
bool AutoScroll
 
bool ScrollToBottom
 
bool focussed
 
const unsigned logLineSize = 2048
 
std::streambuf * ocout
 
std::streambuf * ocerr
 
std::stringstream out
 
std::stringstream err
 
const charbanner
 The text banner.
 

Detailed Description

A window for Console (from Imgui example.)

Constructor & Destructor Documentation

◆ ConsoleWindow()

ConsoleWindow::ConsoleWindow ( )
inline

Construct a new ConsoleWindow.

Remarks
redirects cout and cerr to the console window.

◆ ~ConsoleWindow()

ConsoleWindow::~ConsoleWindow ( )
inline

Member Function Documentation

◆ addLog() [1/2]

void ConsoleWindow::addLog ( const char fmt,
  ... 
)
inline

Add a const char * to the log.

◆ addLog() [2/2]

void ConsoleWindow::addLog ( std::string  s)
inline

Add a string to the log.

Parameters
sthe string to add.

◆ clearLog()

void ConsoleWindow::clearLog ( )
inline

Clear the ConsoleWindow's log.

◆ draw()

void ConsoleWindow::draw ( const char title,
Console console 
)
inline

Draw the console window.

Parameters
titlethe name of the window.
consolethe Console to execute commands with.

◆ execCommand()

void ConsoleWindow::execCommand ( const char command_line,
Console console 
)
inline

Execute a console command.

Parameters
command_linethe command.
consolethe Console to execute with.

◆ Strdup()

static char * ConsoleWindow::Strdup ( const char s)
inlinestatic

◆ Stricmp()

static int ConsoleWindow::Stricmp ( const char s1,
const char s2 
)
inlinestatic

◆ Strnicmp()

static int ConsoleWindow::Strnicmp ( const char s1,
const char s2,
int  n 
)
inlinestatic

◆ Strtrim()

static void ConsoleWindow::Strtrim ( char s)
inlinestatic

◆ textEditCallback()

int ConsoleWindow::textEditCallback ( ImGuiInputTextCallbackData data)
inline

◆ TextEditCallbackStub()

static int ConsoleWindow::TextEditCallbackStub ( ImGuiInputTextCallbackData data)
inlinestatic

Member Data Documentation

◆ AutoScroll

bool ConsoleWindow::AutoScroll

◆ banner

const char* ConsoleWindow::banner
Initial value:
= R"( ________ ________ ________ ________ ___ ___
|\ ____\|\ _____\\ __ \|\ __ \|\ \ / /|
\ \ \___|\ \ \__/\ \ \|\ \ \ \|\ \ \ \ / / /
\ \_____ \ \ __\\ \ \\\ \ \ __ \ \ \/ / /
\|____|\ \ \ \_| \ \ \\\ \ \ \ \ \ \ / /
____\_\ \ \__\ \ \_______\ \__\ \__\ \__/ /
|\_________\|__| \|_______|\|__|\|__|\|__|/
\|_________| SimpleFastOpenAtomicVisualiser
Copyright (C) 2025 Jerboa
SimpleFastOpenAtomicVisualiser comes with ABSOLUTELY NO WARRANTY; for details run GPL.
This is free software, and you are welcome to redistribute it under certain conditions.)"

The text banner.

◆ Commands

ImVector<const char*> ConsoleWindow::Commands

◆ err

std::stringstream ConsoleWindow::err

◆ Filter

ImGuiTextFilter ConsoleWindow::Filter

◆ focussed

bool ConsoleWindow::focussed

◆ History

ImVector<char*> ConsoleWindow::History

◆ HistoryPos

int ConsoleWindow::HistoryPos

◆ InputBuf

char ConsoleWindow::InputBuf[256]

◆ Items

ImVector<char*> ConsoleWindow::Items

◆ logLineSize

const unsigned ConsoleWindow::logLineSize = 2048

◆ ocerr

std::streambuf* ConsoleWindow::ocerr

◆ ocout

std::streambuf* ConsoleWindow::ocout

◆ out

std::stringstream ConsoleWindow::out

◆ ScrollToBottom

bool ConsoleWindow::ScrollToBottom

The documentation for this struct was generated from the following file: