Pyrogenesis  trunk
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
CConsole Class Reference

In-game console. More...

#include <CConsole.h>

Collaboration diagram for CConsole:
Collaboration graph
[legend]

Public Member Functions

 CConsole ()
 
 ~CConsole ()
 
void SetSize (float X=300, float Y=0, float W=800, float H=600)
 
void UpdateScreenSize (int w, int h)
 
void ToggleVisible ()
 
void SetVisible (bool visible)
 
void SetCursorBlinkRate (double rate)
 
void Update (const float deltaRealTime)
 
void Render ()
 
void InsertChar (const int szChar, const wchar_t cooked)
 
void InsertMessage (const std::string &message)
 
void SetBuffer (const wchar_t *szMessage)
 
void UseHistoryFile (const VfsPath &filename, int historysize)
 
const wchar_tGetBuffer ()
 
void FlushBuffer ()
 
bool IsActive ()
 

Public Attributes

int m_iFontHeight
 
int m_iFontWidth
 
int m_iFontOffset
 
size_t m_charsPerPage
 

Private Member Functions

 NONCOPYABLE (CConsole)
 
void DrawWindow (CShaderProgramPtr &shader)
 
void DrawHistory (CTextRenderer &textRenderer)
 
void DrawBuffer (CTextRenderer &textRenderer)
 
void DrawCursor (CTextRenderer &textRenderer)
 
bool IsEOB ()
 
bool IsBOB ()
 
bool IsFull ()
 
bool IsEmpty ()
 
void ProcessBuffer (const wchar_t *szLine)
 
void LoadHistory ()
 
void SaveHistory ()
 

Private Attributes

CMutex m_Mutex
 
float m_fX
 
float m_fY
 
float m_fHeight
 
float m_fWidth
 
float m_fVisibleFrac
 
std::deque< std::wstring > m_deqMsgHistory
 
std::deque< std::wstring > m_deqBufHistory
 
int m_iMsgHistPos
 
wchar_tm_szBuffer
 
int m_iBufferPos
 
int m_iBufferLength
 
VfsPath m_sHistoryFile
 
int m_MaxHistoryLines
 
bool m_bVisible
 
bool m_bToggle
 
double m_prevTime
 
bool m_bCursorVisState
 
double m_cursorBlinkRate
 

Detailed Description

In-game console.

Thread-safety:

Constructor & Destructor Documentation

CConsole::CConsole ( )
CConsole::~CConsole ( )

Member Function Documentation

void CConsole::DrawBuffer ( CTextRenderer textRenderer)
private
void CConsole::DrawCursor ( CTextRenderer textRenderer)
private
void CConsole::DrawHistory ( CTextRenderer textRenderer)
private
void CConsole::DrawWindow ( CShaderProgramPtr shader)
private
void CConsole::FlushBuffer ( )
const wchar_t * CConsole::GetBuffer ( )
void CConsole::InsertChar ( const int  szChar,
const wchar_t  cooked 
)
void CConsole::InsertMessage ( const std::string &  message)
bool CConsole::IsActive ( )
inline
bool CConsole::IsBOB ( )
inlineprivate
bool CConsole::IsEmpty ( )
inlineprivate
bool CConsole::IsEOB ( )
inlineprivate
bool CConsole::IsFull ( )
inlineprivate
void CConsole::LoadHistory ( )
private
CConsole::NONCOPYABLE ( CConsole  )
private
void CConsole::ProcessBuffer ( const wchar_t szLine)
private
void CConsole::Render ( )
void CConsole::SaveHistory ( )
private
void CConsole::SetBuffer ( const wchar_t szMessage)
void CConsole::SetCursorBlinkRate ( double  rate)
void CConsole::SetSize ( float  X = 300,
float  Y = 0,
float  W = 800,
float  H = 600 
)
void CConsole::SetVisible ( bool  visible)
void CConsole::ToggleVisible ( )
void CConsole::Update ( const float  deltaRealTime)
Parameters
deltaRealTimeElapsed real time since the last frame.
void CConsole::UpdateScreenSize ( int  w,
int  h 
)
void CConsole::UseHistoryFile ( const VfsPath filename,
int  historysize 
)

Member Data Documentation

bool CConsole::m_bCursorVisState
private
bool CConsole::m_bToggle
private
bool CConsole::m_bVisible
private
size_t CConsole::m_charsPerPage
double CConsole::m_cursorBlinkRate
private
std::deque<std::wstring> CConsole::m_deqBufHistory
private
std::deque<std::wstring> CConsole::m_deqMsgHistory
private
float CConsole::m_fHeight
private
float CConsole::m_fVisibleFrac
private
float CConsole::m_fWidth
private
float CConsole::m_fX
private
float CConsole::m_fY
private
int CConsole::m_iBufferLength
private
int CConsole::m_iBufferPos
private
int CConsole::m_iFontHeight
int CConsole::m_iFontOffset
int CConsole::m_iFontWidth
int CConsole::m_iMsgHistPos
private
int CConsole::m_MaxHistoryLines
private
CMutex CConsole::m_Mutex
private
double CConsole::m_prevTime
private
VfsPath CConsole::m_sHistoryFile
private
wchar_t* CConsole::m_szBuffer
private

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