DDraceNetwork Docs
CGameConsole::CInstance Class Reference
Collaboration diagram for CGameConsole::CInstance:
[legend]

Classes

struct  CBacklogEntry
 
struct  SSearchMatch
 

Public Member Functions

CStaticRingBuffer< CBacklogEntry, 1024 *1024, CRingBufferBase::FLAG_RECYCLE > m_BacklogPending GUARDED_BY (m_BacklogPendingLock)
 
 CInstance (int t)
 
void Init (CGameConsole *pGameConsole)
 
void ClearBacklog () REQUIRES(!m_BacklogPendingLock)
 
void UpdateBacklogTextAttributes ()
 
void PumpBacklogPending () REQUIRES(!m_BacklogPendingLock)
 
void ClearHistory ()
 
void Reset ()
 
void ExecuteLine (const char *pLine)
 
bool OnInput (const IInput::CEvent &Event)
 
void PrintLine (const char *pLine, int Len, ColorRGBA PrintColor) REQUIRES(!m_BacklogPendingLock)
 
int GetLinesToScroll (int Direction, int LinesToScroll)
 
void ScrollToCenter (int StartLine, int EndLine)
 
void ClearSearch ()
 
void Dump () REQUIRES(!m_BacklogPendingLock)
 
const char * GetString () const
 
void GetCommand (const char *pInput, char(&aCmd)[IConsole::CMDLINE_LENGTH])
 
void UpdateEntryTextAttributes (CBacklogEntry *pEntry) const
 

Static Public Member Functions

static void PossibleCommandsCompleteCallback (int Index, const char *pStr, void *pUser)
 
static void PossibleArgumentsCompleteCallback (int Index, const char *pStr, void *pUser)
 

Public Attributes

CStaticRingBuffer< CBacklogEntry, 1024 *1024, CRingBufferBase::FLAG_RECYCLEm_Backlog
 
CLock m_BacklogPendingLock
 
CStaticRingBuffer< char, 64 *1024, CRingBufferBase::FLAG_RECYCLEm_History
 
char * m_pHistoryEntry
 
CLineInputBuffered< IConsole::CMDLINE_LENGTHm_Input
 
const char * m_pName
 
int m_Type
 
int m_BacklogCurLine
 
int m_BacklogLastActiveLine = -1
 
int m_LinesRendered
 
STextBoundingBox m_BoundingBox = {0.0f, 0.0f, 0.0f, 0.0f}
 
float m_LastInputHeight = 0.0f
 
bool m_MouseIsPress = false
 
vec2 m_MousePress = vec2(0.0f, 0.0f)
 
vec2 m_MouseRelease = vec2(0.0f, 0.0f)
 
int m_CurSelStart = 0
 
int m_CurSelEnd = 0
 
bool m_HasSelection = false
 
int m_NewLineCounter = 0
 
CGameConsolem_pGameConsole
 
char m_aCompletionBuffer [IConsole::CMDLINE_LENGTH]
 
int m_CompletionChosen
 
char m_aCompletionBufferArgument [IConsole::CMDLINE_LENGTH]
 
int m_CompletionChosenArgument
 
int m_CompletionFlagmask
 
float m_CompletionRenderOffset
 
float m_CompletionRenderOffsetChange
 
int m_CompletionArgumentPosition
 
int m_CompletionCommandStart = 0
 
int m_CompletionCommandEnd = 0
 
char m_aUser [32]
 
bool m_UserGot
 
bool m_UsernameReq
 
bool m_IsCommand
 
const char * m_pCommandName
 
const char * m_pCommandHelp
 
const char * m_pCommandParams
 
bool m_Searching = false
 
int m_CurrentMatchIndex
 
char m_aCurrentSearchString [IConsole::CMDLINE_LENGTH]
 
std::vector< SSearchMatchm_vSearchMatches
 

Private Member Functions

void UpdateSearch ()
 

Friends

class CGameConsole
 

Constructor & Destructor Documentation

◆ CInstance()

CGameConsole::CInstance::CInstance ( int  t)

Member Function Documentation

◆ ClearBacklog()

void CGameConsole::CInstance::ClearBacklog ( )

◆ ClearHistory()

void CGameConsole::CInstance::ClearHistory ( )

◆ ClearSearch()

void CGameConsole::CInstance::ClearSearch ( )

◆ Dump()

void CGameConsole::CInstance::Dump ( )

◆ ExecuteLine()

void CGameConsole::CInstance::ExecuteLine ( const char *  pLine)

◆ GetCommand()

void CGameConsole::CInstance::GetCommand ( const char *  pInput,
char(&)  aCmd[IConsole::CMDLINE_LENGTH] 
)

Gets the command at the current cursor including surrounding spaces. Commands are split by semicolons.

So if the current console input is for example "hello; world ;foo" ^ and the cursor is here ----------—/ The result would be " world "

Parameters
pInputthe console input line
aCmdthe command the cursor is at

◆ GetLinesToScroll()

int CGameConsole::CInstance::GetLinesToScroll ( int  Direction,
int  LinesToScroll 
)

◆ GetString()

const char * CGameConsole::CInstance::GetString ( ) const
inline

◆ GUARDED_BY()

CStaticRingBuffer< CBacklogEntry, 1024 *1024, CRingBufferBase::FLAG_RECYCLE > m_BacklogPending CGameConsole::CInstance::GUARDED_BY ( m_BacklogPendingLock  )

◆ Init()

void CGameConsole::CInstance::Init ( CGameConsole pGameConsole)

◆ OnInput()

bool CGameConsole::CInstance::OnInput ( const IInput::CEvent Event)

◆ PossibleArgumentsCompleteCallback()

void CGameConsole::CInstance::PossibleArgumentsCompleteCallback ( int  Index,
const char *  pStr,
void *  pUser 
)
static

◆ PossibleCommandsCompleteCallback()

void CGameConsole::CInstance::PossibleCommandsCompleteCallback ( int  Index,
const char *  pStr,
void *  pUser 
)
static

◆ PrintLine()

void CGameConsole::CInstance::PrintLine ( const char *  pLine,
int  Len,
ColorRGBA  PrintColor 
)

◆ PumpBacklogPending()

void CGameConsole::CInstance::PumpBacklogPending ( )

◆ Reset()

void CGameConsole::CInstance::Reset ( )

◆ ScrollToCenter()

void CGameConsole::CInstance::ScrollToCenter ( int  StartLine,
int  EndLine 
)

◆ UpdateBacklogTextAttributes()

void CGameConsole::CInstance::UpdateBacklogTextAttributes ( )

◆ UpdateEntryTextAttributes()

void CGameConsole::CInstance::UpdateEntryTextAttributes ( CBacklogEntry pEntry) const

◆ UpdateSearch()

void CGameConsole::CInstance::UpdateSearch ( )
private

Friends And Related Function Documentation

◆ CGameConsole

friend class CGameConsole
friend

Member Data Documentation

◆ m_aCompletionBuffer

char CGameConsole::CInstance::m_aCompletionBuffer[IConsole::CMDLINE_LENGTH]

◆ m_aCompletionBufferArgument

char CGameConsole::CInstance::m_aCompletionBufferArgument[IConsole::CMDLINE_LENGTH]

◆ m_aCurrentSearchString

char CGameConsole::CInstance::m_aCurrentSearchString[IConsole::CMDLINE_LENGTH]

◆ m_aUser

char CGameConsole::CInstance::m_aUser[32]

◆ m_Backlog

CStaticRingBuffer<CBacklogEntry, 1024 * 1024, CRingBufferBase::FLAG_RECYCLE> CGameConsole::CInstance::m_Backlog

◆ m_BacklogCurLine

int CGameConsole::CInstance::m_BacklogCurLine

◆ m_BacklogLastActiveLine

int CGameConsole::CInstance::m_BacklogLastActiveLine = -1

◆ m_BacklogPendingLock

CLock CGameConsole::CInstance::m_BacklogPendingLock

◆ m_BoundingBox

STextBoundingBox CGameConsole::CInstance::m_BoundingBox = {0.0f, 0.0f, 0.0f, 0.0f}

◆ m_CompletionArgumentPosition

int CGameConsole::CInstance::m_CompletionArgumentPosition

◆ m_CompletionChosen

int CGameConsole::CInstance::m_CompletionChosen

◆ m_CompletionChosenArgument

int CGameConsole::CInstance::m_CompletionChosenArgument

◆ m_CompletionCommandEnd

int CGameConsole::CInstance::m_CompletionCommandEnd = 0

◆ m_CompletionCommandStart

int CGameConsole::CInstance::m_CompletionCommandStart = 0

◆ m_CompletionFlagmask

int CGameConsole::CInstance::m_CompletionFlagmask

◆ m_CompletionRenderOffset

float CGameConsole::CInstance::m_CompletionRenderOffset

◆ m_CompletionRenderOffsetChange

float CGameConsole::CInstance::m_CompletionRenderOffsetChange

◆ m_CurrentMatchIndex

int CGameConsole::CInstance::m_CurrentMatchIndex

◆ m_CurSelEnd

int CGameConsole::CInstance::m_CurSelEnd = 0

◆ m_CurSelStart

int CGameConsole::CInstance::m_CurSelStart = 0

◆ m_HasSelection

bool CGameConsole::CInstance::m_HasSelection = false

◆ m_History

CStaticRingBuffer<char, 64 * 1024, CRingBufferBase::FLAG_RECYCLE> CGameConsole::CInstance::m_History

◆ m_Input

CLineInputBuffered<IConsole::CMDLINE_LENGTH> CGameConsole::CInstance::m_Input

◆ m_IsCommand

bool CGameConsole::CInstance::m_IsCommand

◆ m_LastInputHeight

float CGameConsole::CInstance::m_LastInputHeight = 0.0f

◆ m_LinesRendered

int CGameConsole::CInstance::m_LinesRendered

◆ m_MouseIsPress

bool CGameConsole::CInstance::m_MouseIsPress = false

◆ m_MousePress

vec2 CGameConsole::CInstance::m_MousePress = vec2(0.0f, 0.0f)

◆ m_MouseRelease

vec2 CGameConsole::CInstance::m_MouseRelease = vec2(0.0f, 0.0f)

◆ m_NewLineCounter

int CGameConsole::CInstance::m_NewLineCounter = 0

◆ m_pCommandHelp

const char* CGameConsole::CInstance::m_pCommandHelp

◆ m_pCommandName

const char* CGameConsole::CInstance::m_pCommandName

◆ m_pCommandParams

const char* CGameConsole::CInstance::m_pCommandParams

◆ m_pGameConsole

CGameConsole* CGameConsole::CInstance::m_pGameConsole

◆ m_pHistoryEntry

char* CGameConsole::CInstance::m_pHistoryEntry

◆ m_pName

const char* CGameConsole::CInstance::m_pName

◆ m_Searching

bool CGameConsole::CInstance::m_Searching = false

◆ m_Type

int CGameConsole::CInstance::m_Type

◆ m_UserGot

bool CGameConsole::CInstance::m_UserGot

◆ m_UsernameReq

bool CGameConsole::CInstance::m_UsernameReq

◆ m_vSearchMatches

std::vector<SSearchMatch> CGameConsole::CInstance::m_vSearchMatches

The documentation for this class was generated from the following files: