doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ConsoleView Class Reference

View in the Material Editor that functions as a Doom III console. More...

#include <ConsoleView.h>

Inheritance diagram for ConsoleView:

Public Types

enum  { IDD = IDD_CONSOLE_FORM }
 

Public Member Functions

virtual ~ConsoleView ()
 Destructor for ConsoleView. More...
 
void AddText (const char *msg)
 Adds text to the end of the console output window. More...
 
void SetConsoleText (const idStr &text)
 Replaces the text in the console window with the specified text. More...
 
void ExecuteCommand (const idStr &cmd="")
 Executes the specified console command. More...
 

Public Attributes

CEdit editConsole
 
CEdit editInput
 
idStr consoleStr
 
idStrList consoleHistory
 
idStr currentCommand
 
int currentHistoryPosition
 
bool saveCurrentCommand
 

Protected Member Functions

 ConsoleView ()
 Constructor for ConsoleView. More...
 
virtual BOOL PreTranslateMessage (MSG *pMsg)
 Handles keyboard input to process the "Enter" key to execute commands and command history. More...
 
virtual void DoDataExchange (CDataExchange *pDX)
 Transfers data to and from the controls in the console. More...
 
virtual void OnInitialUpdate ()
 Transfers data to and from the controls in the console. More...
 
afx_msg void OnSize (UINT nType, int cx, int cy)
 Windows message called when the window is resized. More...
 
const char * TranslateString (const char *buf)
 Replaces \n with \r\n for carriage returns in an edit control. More...
 

Detailed Description

View in the Material Editor that functions as a Doom III console.

It allows users to view console output as well as issue console commands to the engine.

Definition at line 37 of file ConsoleView.h.

Member Enumeration Documentation

anonymous enum
Enumerator
IDD 

Definition at line 41 of file ConsoleView.h.

Constructor & Destructor Documentation

ConsoleView::~ConsoleView ( )
virtual

Destructor for ConsoleView.

Definition at line 56 of file ConsoleView.cpp.

ConsoleView::ConsoleView ( )
protected

Constructor for ConsoleView.

Definition at line 49 of file ConsoleView.cpp.

Member Function Documentation

void ConsoleView::AddText ( const char *  msg)

Adds text to the end of the console output window.

Parameters
msgThe text to append.
Todo:
: BMatt Nerve: Fix scroll code so the output window will scroll as text is added if the cursor is at the end of the window.

Definition at line 65 of file ConsoleView.cpp.

void ConsoleView::DoDataExchange ( CDataExchange *  pDX)
protectedvirtual

Transfers data to and from the controls in the console.

Definition at line 238 of file ConsoleView.cpp.

void ConsoleView::ExecuteCommand ( const idStr cmd = "")

Executes the specified console command.

If the command is passed as a parameter then it is executed otherwise the command in the input box is executed.

Parameters
cmdThe text to execute. If this string is empty then the input edit box text is used.

Definition at line 107 of file ConsoleView.cpp.

void ConsoleView::OnInitialUpdate ( )
protectedvirtual

Transfers data to and from the controls in the console.

Definition at line 248 of file ConsoleView.cpp.

void ConsoleView::OnSize ( UINT  nType,
int  cx,
int  cy 
)
protected

Windows message called when the window is resized.

Definition at line 265 of file ConsoleView.cpp.

BOOL ConsoleView::PreTranslateMessage ( MSG *  pMsg)
protectedvirtual

Handles keyboard input to process the "Enter" key to execute commands and command history.

Definition at line 157 of file ConsoleView.cpp.

void ConsoleView::SetConsoleText ( const idStr text)

Replaces the text in the console window with the specified text.

Parameters
textThe text to place in the console window.

Definition at line 95 of file ConsoleView.cpp.

const char * ConsoleView::TranslateString ( const char *  buf)
protected

Replaces \n with \r\n for carriage returns in an edit control.

Definition at line 279 of file ConsoleView.cpp.

Member Data Documentation

idStrList ConsoleView::consoleHistory

Definition at line 47 of file ConsoleView.h.

idStr ConsoleView::consoleStr

Definition at line 46 of file ConsoleView.h.

idStr ConsoleView::currentCommand

Definition at line 48 of file ConsoleView.h.

int ConsoleView::currentHistoryPosition

Definition at line 49 of file ConsoleView.h.

CEdit ConsoleView::editConsole

Definition at line 43 of file ConsoleView.h.

CEdit ConsoleView::editInput

Definition at line 44 of file ConsoleView.h.

bool ConsoleView::saveCurrentCommand

Definition at line 50 of file ConsoleView.h.


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