Console Class Reference

#include <console.hpp>

List of all members.

Public Member Functions

 Console ()
 ~Console ()
void init_graphics ()
void input (char c)
 add character to inputBuffer
void backspace ()
 delete character left of inputBufferPosition
void eraseChar ()
 delete character at inputBufferPosition
void enter ()
 process and clear input stream
void scroll (int offset)
 scroll console text up or down by offset lines
void autocomplete ()
 autocomplete current command
void show_history (int offset)
 move offset lines forward through history; Negative offset moves backward
void move_cursor (int offset)
 move the cursor offset chars to the right; Negative offset moves backward; 0xFFFF moves to the end
void draw (DrawingContext &context)
 draw the console in a DrawingContext
void update (float elapsed_time)
void show ()
 display the console
void open ()
 open the console for viewing for 6 seconds
void hide ()
 hide the console
void toggle ()
 display the console if hidden, hide otherwise
bool hasFocus ()
 true if characters should be sent to the console instead of their normal target

Static Public Member Functions

template<typename T>
static bool string_is (std::string s)
template<typename T>
static T string_to (std::string s)

Static Public Attributes

static Consoleinstance
static std::ostream output
 stream of characters to output to the console.

Private Member Functions

void addLines (std::string s)
 display a string of (potentially) multiple lines in the console
void addLine (std::string s)
 display a line in the console
void parse (std::string s)
 react to a given command
void ready_vm ()
 ready a virtual machine instance, creating a new thread and loading default .nut files if needed
void execute_script (const std::string &s)
 execute squirrel script and output result
bool consoleCommand (std::string command, std::vector< std::string > arguments)
 process internal command; return false if command was unknown, true otherwise
void flush (ConsoleStreamBuffer *buffer)
 act upon changes in a ConsoleStreamBuffer
 Console (const Console &)
Consoleoperator= (const Console &)

Private Attributes

std::list< std::string > history
 command history.
std::list< std::string
>::iterator 
history_position
 item of command history that is currently displayed
std::list< std::string > lines
 backbuffer of lines sent to the console.
SurfacePtr background
 console background image
SurfacePtr background2
 second, moving console background image
HSQUIRRELVM vm
 squirrel thread for the console (with custom roottable)
HSQOBJECT vm_object
int backgroundOffset
 current offset of scrolling background image
float height
 height of the console in px
float alpha
int offset
 decrease to scroll text up
bool focused
 true if console has input focus
FontPtr font
float fontheight
 height of the font (this is a separate var, because the font could not be initialized yet but is needed in the addLine message
float stayOpen

Static Private Attributes

static int inputBufferPosition
 position in inputBuffer before which to append new characters
static std::string inputBuffer
 string used for keyboard input
static ConsoleStreamBuffer outputBuffer
 stream buffer used by output stream

Friends

class ConsoleStreamBuffer


Detailed Description

Definition at line 34 of file console.hpp.


Constructor & Destructor Documentation

Console::Console (  ) 

Definition at line 31 of file console.cpp.

References fontheight.

00031                  :
00032   history(),
00033   history_position(history.end()), 
00034   lines(),
00035   background(),
00036   background2(),
00037   vm(NULL), 
00038   vm_object(),
00039   backgroundOffset(0),
00040   height(0),
00041   alpha(1.0), 
00042   offset(0), 
00043   focused(false), 
00044   font(),
00045   fontheight(),
00046   stayOpen(0) 
00047 {
00048   fontheight = 8;
00049 }

Console::~Console (  ) 

Definition at line 51 of file console.cpp.

References scripting::global_vm, vm, and vm_object.

00052 {
00053   if(vm != NULL) {
00054     sq_release(scripting::global_vm, &vm_object);
00055   }
00056 }

Console::Console ( const Console  )  [private]


Member Function Documentation

void Console::init_graphics (  ) 

Definition at line 59 of file console.cpp.

References background, background2, Surface::create(), Font::FIXED, font, and fontheight.

Referenced by Main::run().

00060 {
00061   font.reset(new Font(Font::FIXED,"fonts/andale12.stf",1));
00062   fontheight = font->get_height();
00063   background = Surface::create("images/engine/console.png");
00064   background2 = Surface::create("images/engine/console2.png");
00065 }

void Console::input ( char  c  ) 

add character to inputBuffer

Definition at line 147 of file console.cpp.

References inputBuffer, and inputBufferPosition.

Referenced by JoystickKeyboardController::process_console_key_event().

00148 {
00149   inputBuffer.insert(inputBufferPosition, 1, c);
00150   inputBufferPosition++;
00151 }

void Console::backspace (  ) 

delete character left of inputBufferPosition

Definition at line 154 of file console.cpp.

References inputBuffer, and inputBufferPosition.

Referenced by JoystickKeyboardController::process_console_key_event().

00155 {
00156   if ((inputBufferPosition > 0) && (inputBuffer.length() > 0)) {
00157     inputBuffer.erase(inputBufferPosition-1, 1);
00158     inputBufferPosition--;
00159   }
00160 }

void Console::eraseChar (  ) 

delete character at inputBufferPosition

Definition at line 163 of file console.cpp.

References inputBuffer, and inputBufferPosition.

00164 {
00165   if (inputBufferPosition < (int)inputBuffer.length()) {
00166     inputBuffer.erase(inputBufferPosition, 1);
00167   }
00168 }

void Console::enter (  ) 

process and clear input stream

Definition at line 171 of file console.cpp.

References addLines(), inputBuffer, inputBufferPosition, and parse().

Referenced by JoystickKeyboardController::process_console_key_event().

00172 {
00173   addLines("> "+inputBuffer);
00174   parse(inputBuffer);
00175   inputBuffer = "";
00176   inputBufferPosition = 0;
00177 }

void Console::scroll ( int  offset  ) 

scroll console text up or down by offset lines

Definition at line 180 of file console.cpp.

References offset.

Referenced by JoystickKeyboardController::process_console_key_event().

00181 {
00182   offset += numLines;
00183   if (offset > 0) offset = 0;
00184 }

void Console::autocomplete (  ) 

autocomplete current command

Definition at line 282 of file console.cpp.

References addLines(), inputBuffer, inputBufferPosition, ready_vm(), sq_insert_commands(), and vm.

Referenced by JoystickKeyboardController::process_console_key_event().

00283 {
00284   //int autocompleteFrom = inputBuffer.find_last_of(" ();+", inputBufferPosition);
00285   int autocompleteFrom = inputBuffer.find_last_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_->.", inputBufferPosition);
00286   if (autocompleteFrom != (int)std::string::npos) {
00287     autocompleteFrom += 1;
00288   } else {
00289     autocompleteFrom = 0;
00290   }
00291   std::string prefix = inputBuffer.substr(autocompleteFrom, inputBufferPosition - autocompleteFrom);
00292   addLines("> "+prefix);
00293 
00294   std::list<std::string> cmds;
00295 
00296   ready_vm();
00297 
00298   // append all keys of the current root table to list
00299   sq_pushroottable(vm); // push root table
00300   while(true) {
00301     // check all keys (and their children) for matches
00302     sq_insert_commands(cmds, vm, "", prefix);
00303 
00304     // cycle through parent(delegate) table
00305     SQInteger oldtop = sq_gettop(vm);
00306     if(SQ_FAILED(sq_getdelegate(vm, -1)) || oldtop == sq_gettop(vm)) {
00307       break;
00308     }
00309     sq_remove(vm, -2); // remove old table
00310   }
00311   sq_pop(vm, 1); // remove table
00312 
00313   // depending on number of hits, show matches or autocomplete
00314   if (cmds.size() == 0) addLines("No known command starts with \""+prefix+"\"");
00315   if (cmds.size() == 1) {
00316     // one match: just replace input buffer with full command
00317     std::string replaceWith = cmds.front();
00318     inputBuffer.replace(autocompleteFrom, prefix.length(), replaceWith);
00319     inputBufferPosition += (replaceWith.length() - prefix.length());
00320   }
00321   if (cmds.size() > 1) {
00322     // multiple matches: show all matches and set input buffer to longest common prefix
00323     std::string commonPrefix = cmds.front();
00324     while (cmds.begin() != cmds.end()) {
00325       std::string cmd = cmds.front();
00326       cmds.pop_front();
00327       addLines(cmd);
00328       for (int n = commonPrefix.length(); n >= 1; n--) {
00329         if (cmd.compare(0, n, commonPrefix) != 0) commonPrefix.resize(n-1); else break;
00330       }
00331     }
00332     std::string replaceWith = commonPrefix;
00333     inputBuffer.replace(autocompleteFrom, prefix.length(), replaceWith);
00334     inputBufferPosition += (replaceWith.length() - prefix.length());
00335   }
00336 }

void Console::show_history ( int  offset  ) 

move offset lines forward through history; Negative offset moves backward

Definition at line 187 of file console.cpp.

References history, history_position, inputBuffer, and inputBufferPosition.

Referenced by JoystickKeyboardController::process_console_key_event().

00188 {
00189   while ((offset > 0) && (history_position != history.end())) {
00190     history_position++;
00191     offset--;
00192   }
00193   while ((offset < 0) && (history_position != history.begin())) {
00194     history_position--;
00195     offset++;
00196   }
00197   if (history_position == history.end()) {
00198     inputBuffer = "";
00199     inputBufferPosition = 0;
00200   } else {
00201     inputBuffer = *history_position;
00202     inputBufferPosition = inputBuffer.length();
00203   }
00204 }

void Console::move_cursor ( int  offset  ) 

move the cursor offset chars to the right; Negative offset moves backward; 0xFFFF moves to the end

Definition at line 207 of file console.cpp.

References inputBuffer, and inputBufferPosition.

Referenced by JoystickKeyboardController::process_console_key_event().

00208 {
00209   if (offset == -65535) inputBufferPosition = 0;
00210   if (offset == +65535) inputBufferPosition = inputBuffer.length();
00211   inputBufferPosition+=offset;
00212   if (inputBufferPosition < 0) inputBufferPosition = 0;
00213   if (inputBufferPosition > (int)inputBuffer.length()) inputBufferPosition = inputBuffer.length();
00214 }

void Console::draw ( DrawingContext context  ) 

draw the console in a DrawingContext

Definition at line 485 of file console.cpp.

References ALIGN_LEFT, alpha, background, background2, backgroundOffset, DrawingContext::draw_surface(), DrawingContext::draw_text(), focused, font, height, inputBuffer, inputBufferPosition, LAYER_GUI, lines, offset, DrawingContext::pop_transform(), DrawingContext::push_transform(), SCREEN_WIDTH, and DrawingContext::set_alpha().

Referenced by ScreenManager::draw().

00486 {
00487   if (height == 0)
00488     return;
00489 
00490   int layer = LAYER_GUI + 1;
00491 
00492   context.push_transform();
00493   context.set_alpha(alpha);
00494   context.draw_surface(background2, Vector(SCREEN_WIDTH/2 - background->get_width()/2 - background->get_width() + backgroundOffset, height - background->get_height()), layer);
00495   context.draw_surface(background2, Vector(SCREEN_WIDTH/2 - background->get_width()/2 + backgroundOffset, height - background->get_height()), layer);
00496   for (int x = (SCREEN_WIDTH/2 - background->get_width()/2 - (static_cast<int>(ceilf((float)SCREEN_WIDTH / (float)background->get_width()) - 1) * background->get_width())); x < SCREEN_WIDTH; x+=background->get_width()) {
00497     context.draw_surface(background, Vector(x, height - background->get_height()), layer);
00498   }
00499   backgroundOffset+=10;
00500   if (backgroundOffset > (int)background->get_width()) backgroundOffset -= (int)background->get_width();
00501 
00502   int lineNo = 0;
00503 
00504   if (focused) {
00505     lineNo++;
00506     float py = height-4-1 * font->get_height();
00507     context.draw_text(font, "> "+inputBuffer, Vector(4, py), ALIGN_LEFT, layer);
00508     if (SDL_GetTicks() % 1000 < 750) {
00509       int cursor_px = 2 + inputBufferPosition;
00510       context.draw_text(font, "_", Vector(4 + (cursor_px * font->get_text_width("X")), py), ALIGN_LEFT, layer);
00511     }
00512   }
00513 
00514   int skipLines = -offset;
00515   for (std::list<std::string>::iterator i = lines.begin(); i != lines.end(); i++) {
00516     if (skipLines-- > 0) continue;
00517     lineNo++;
00518     float py = height - 4 - lineNo*font->get_height();
00519     if (py < -font->get_height()) break;
00520     context.draw_text(font, *i, Vector(4, py), ALIGN_LEFT, layer);
00521   }
00522   context.pop_transform();
00523 }

void Console::update ( float  elapsed_time  ) 

Definition at line 469 of file console.cpp.

References alpha, FADE_SPEED, focused, height, and stayOpen.

Referenced by ScreenManager::update_gamelogic().

00470 {
00471   if(stayOpen > 0) {
00472     stayOpen -= elapsed_time;
00473     if(stayOpen < 0)
00474       stayOpen = 0;
00475   } else if(!focused && height > 0) {
00476     alpha -= elapsed_time * FADE_SPEED;
00477     if(alpha < 0) {
00478       alpha = 0;
00479       height = 0;
00480     }
00481   }
00482 }

void Console::show (  ) 

display the console

Definition at line 426 of file console.cpp.

References alpha, Config::console_enabled, focused, g_config, and height.

Referenced by toggle().

00427 {
00428   if(!g_config->console_enabled)
00429     return;
00430 
00431   focused = true;
00432   height = 256;
00433   alpha = 1.0;
00434   SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
00435 }

void Console::open (  ) 

open the console for viewing for 6 seconds

Definition at line 438 of file console.cpp.

References stayOpen.

00439 {
00440   if(stayOpen < 2)
00441     stayOpen += 1.5;
00442 }

void Console::hide (  ) 

hide the console

Definition at line 445 of file console.cpp.

References focused, height, inputBuffer, inputBufferPosition, and stayOpen.

Referenced by toggle().

00446 {
00447   focused = false;
00448   height = 0;
00449   stayOpen = 0;
00450 
00451   // clear input buffer
00452   inputBuffer = "";
00453   inputBufferPosition = 0;
00454   SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL);
00455 }

void Console::toggle (  ) 

display the console if hidden, hide otherwise

Definition at line 458 of file console.cpp.

References hasFocus(), hide(), and show().

Referenced by ScreenManager::process_events(), and JoystickKeyboardController::process_key_event().

00459 {
00460   if (Console::hasFocus()) {
00461     Console::hide();
00462   }
00463   else {
00464     Console::show();
00465   }
00466 }

bool Console::hasFocus (  ) 

true if characters should be sent to the console instead of their normal target

Definition at line 420 of file console.cpp.

References focused.

Referenced by toggle().

00421 {
00422   return focused;
00423 }

template<typename T>
static bool Console::string_is ( std::string  s  )  [inline, static]

Definition at line 65 of file console.hpp.

00065                                                           {
00066     std::istringstream iss(s);
00067     T i;
00068     if ((iss >> i) && iss.eof()) {
00069       return true;
00070     } else {
00071       return false;
00072     }
00073   }

template<typename T>
static T Console::string_to ( std::string  s  )  [inline, static]

Definition at line 75 of file console.hpp.

00075                                                        {
00076     std::istringstream iss(s);
00077     T i;
00078     if ((iss >> i) && iss.eof()) {
00079       return i;
00080     } else {
00081       return T();
00082     }
00083   }

void Console::addLines ( std::string  s  )  [private]

display a string of (potentially) multiple lines in the console

Definition at line 339 of file console.cpp.

References addLine().

Referenced by autocomplete(), enter(), execute_script(), flush(), and parse().

00340 {
00341   std::istringstream iss(s);
00342   std::string line;
00343   while (std::getline(iss, line, '\n')) addLine(line);
00344 }

void Console::addLine ( std::string  s  )  [private]

display a line in the console

Definition at line 347 of file console.cpp.

References alpha, fontheight, height, lines, stayOpen, and Font::wrap_to_chars().

Referenced by addLines().

00348 {
00349   // output line to stderr
00350   std::cerr << s << std::endl;
00351 
00352   // wrap long lines
00353   std::string overflow;
00354   unsigned int line_count = 0;
00355   do {
00356     lines.push_front(Font::wrap_to_chars(s, 99, &overflow));
00357     line_count++;
00358     s = overflow;
00359   } while (s.length() > 0);
00360 
00361   // trim scrollback buffer
00362   while (lines.size() >= 1000)
00363     lines.pop_back();
00364 
00365   // increase console height if necessary
00366   if ((stayOpen > 0) && (height < 64)) {
00367     if(height < 4)
00368       height = 4;
00369     height += fontheight * line_count;
00370   }
00371 
00372   // reset console to full opacity
00373   alpha = 1.0;
00374 }

void Console::parse ( std::string  s  )  [private]

react to a given command

Definition at line 377 of file console.cpp.

References addLines(), consoleCommand(), execute_script(), history, and history_position.

Referenced by enter().

00378 {
00379   // make sure we actually have something to parse
00380   if (s.length() == 0) return;
00381 
00382   // add line to history
00383   history.push_back(s);
00384   history_position = history.end();
00385 
00386   // split line into list of args
00387   std::vector<std::string> args;
00388   size_t start = 0;
00389   size_t end = 0;
00390   while (1) {
00391     start = s.find_first_not_of(" ,", end);
00392     end = s.find_first_of(" ,", start);
00393     if (start == s.npos) break;
00394     args.push_back(s.substr(start, end-start));
00395   }
00396 
00397   // command is args[0]
00398   if (args.size() == 0) return;
00399   std::string command = args.front();
00400   args.erase(args.begin());
00401 
00402   // ignore if it's an internal command
00403   if (consoleCommand(command,args)) return;
00404 
00405   try {
00406     execute_script(s);
00407   } catch(std::exception& e) {
00408     addLines(e.what());
00409   }
00410 
00411 }

void Console::ready_vm (  )  [private]

ready a virtual machine instance, creating a new thread and loading default .nut files if needed

Definition at line 81 of file console.cpp.

References scripting::compile_and_run(), scripting::global_vm, log_warning, vm, and vm_object.

Referenced by autocomplete(), and execute_script().

00082 {
00083   if(vm == NULL) {
00084     vm = scripting::global_vm;
00085     HSQUIRRELVM new_vm = sq_newthread(vm, 16);
00086     if(new_vm == NULL)
00087       throw scripting::SquirrelError(vm, "Couldn't create new VM thread for console");
00088 
00089     // store reference to thread
00090     sq_resetobject(&vm_object);
00091     if(SQ_FAILED(sq_getstackobj(vm, -1, &vm_object)))
00092       throw scripting::SquirrelError(vm, "Couldn't get vm object for console");
00093     sq_addref(vm, &vm_object);
00094     sq_pop(vm, 1);
00095 
00096     // create new roottable for thread
00097     sq_newtable(new_vm);
00098     sq_pushroottable(new_vm);
00099     if(SQ_FAILED(sq_setdelegate(new_vm, -2)))
00100       throw scripting::SquirrelError(new_vm, "Couldn't set console_table delegate");
00101 
00102     sq_setroottable(new_vm);
00103 
00104     vm = new_vm;
00105 
00106     try {
00107       std::string filename = "scripts/console.nut";
00108       IFileStream stream(filename);
00109       scripting::compile_and_run(vm, stream, filename);
00110     } catch(std::exception& e) {
00111       log_warning << "Couldn't load console.nut: " << e.what() << std::endl;
00112     }
00113   }
00114 }

void Console::execute_script ( const std::string &  s  )  [private]

execute squirrel script and output result

Definition at line 117 of file console.cpp.

References addLines(), log_fatal, ready_vm(), scripting::squirrel2string(), and vm.

Referenced by parse().

00118 {
00119   using namespace scripting;
00120 
00121   ready_vm();
00122 
00123   SQInteger oldtop = sq_gettop(vm);
00124   try {
00125     if(SQ_FAILED(sq_compilebuffer(vm, command.c_str(), command.length(),
00126                                   "", SQTrue)))
00127       throw SquirrelError(vm, "Couldn't compile command");
00128 
00129     sq_pushroottable(vm);
00130     if(SQ_FAILED(sq_call(vm, 1, SQTrue, SQTrue)))
00131       throw SquirrelError(vm, "Problem while executing command");
00132 
00133     if(sq_gettype(vm, -1) != OT_NULL)
00134       addLines(squirrel2string(vm, -1));
00135   } catch(std::exception& e) {
00136     addLines(e.what());
00137   }
00138   SQInteger newtop = sq_gettop(vm);
00139   if(newtop < oldtop) {
00140     log_fatal << "Script destroyed squirrel stack..." << std::endl;
00141   } else {
00142     sq_settop(vm, oldtop);
00143   }
00144 }

bool Console::consoleCommand ( std::string  command,
std::vector< std::string >  arguments 
) [private]

process internal command; return false if command was unknown, true otherwise

Definition at line 414 of file console.cpp.

Referenced by parse().

00415 {
00416   return false;
00417 }

void Console::flush ( ConsoleStreamBuffer buffer  )  [private]

act upon changes in a ConsoleStreamBuffer

Definition at line 68 of file console.cpp.

References addLines(), and outputBuffer.

Referenced by ConsoleStreamBuffer::sync().

00069 {
00070   if (buffer == &outputBuffer) {
00071     std::string s = outputBuffer.str();
00072     if ((s.length() > 0) && ((s[s.length()-1] == '\n') || (s[s.length()-1] == '\r'))) {
00073       while ((s[s.length()-1] == '\n') || (s[s.length()-1] == '\r')) s.erase(s.length()-1);
00074       addLines(s);
00075       outputBuffer.str(std::string());
00076     }
00077   }
00078 }

Console& Console::operator= ( const Console  )  [private]


Friends And Related Function Documentation

friend class ConsoleStreamBuffer [friend]

Definition at line 122 of file console.hpp.


Member Data Documentation

Console * Console::instance [static]

Definition at line 40 of file console.hpp.

Referenced by ScreenManager::draw(), get_logging_instance(), JoystickKeyboardController::process_console_key_event(), ScreenManager::process_events(), JoystickKeyboardController::process_key_event(), Main::run(), ConsoleStreamBuffer::sync(), and ScreenManager::update_gamelogic().

std::ostream Console::output [static]

stream of characters to output to the console.

Do not forget to send std::endl or to flush the stream.

Definition at line 42 of file console.hpp.

Referenced by scripting::display(), get_logging_instance(), and scripting::printfunc().

std::list<std::string> Console::history [private]

command history.

New lines get added to back.

Definition at line 86 of file console.hpp.

Referenced by parse(), and show_history().

std::list<std::string>::iterator Console::history_position [private]

item of command history that is currently displayed

Definition at line 87 of file console.hpp.

Referenced by parse(), and show_history().

std::list<std::string> Console::lines [private]

backbuffer of lines sent to the console.

New lines get added to front.

Definition at line 88 of file console.hpp.

Referenced by addLine(), and draw().

SurfacePtr Console::background [private]

console background image

Definition at line 90 of file console.hpp.

Referenced by draw(), and init_graphics().

SurfacePtr Console::background2 [private]

second, moving console background image

Definition at line 91 of file console.hpp.

Referenced by draw(), and init_graphics().

HSQUIRRELVM Console::vm [private]

squirrel thread for the console (with custom roottable)

Definition at line 93 of file console.hpp.

Referenced by autocomplete(), execute_script(), ready_vm(), and ~Console().

HSQOBJECT Console::vm_object [private]

Definition at line 94 of file console.hpp.

Referenced by ready_vm(), and ~Console().

int Console::backgroundOffset [private]

current offset of scrolling background image

Definition at line 96 of file console.hpp.

Referenced by draw().

float Console::height [private]

height of the console in px

Definition at line 97 of file console.hpp.

Referenced by addLine(), draw(), hide(), show(), and update().

float Console::alpha [private]

Definition at line 98 of file console.hpp.

Referenced by addLine(), draw(), show(), and update().

int Console::offset [private]

decrease to scroll text up

Definition at line 99 of file console.hpp.

Referenced by draw(), and scroll().

bool Console::focused [private]

true if console has input focus

Definition at line 100 of file console.hpp.

Referenced by draw(), hasFocus(), hide(), show(), and update().

FontPtr Console::font [private]

Definition at line 101 of file console.hpp.

Referenced by draw(), and init_graphics().

float Console::fontheight [private]

height of the font (this is a separate var, because the font could not be initialized yet but is needed in the addLine message

Definition at line 102 of file console.hpp.

Referenced by addLine(), Console(), and init_graphics().

float Console::stayOpen [private]

Definition at line 104 of file console.hpp.

Referenced by addLine(), hide(), open(), and update().

int Console::inputBufferPosition [static, private]

position in inputBuffer before which to append new characters

Definition at line 106 of file console.hpp.

Referenced by autocomplete(), backspace(), draw(), enter(), eraseChar(), hide(), input(), move_cursor(), and show_history().

std::string Console::inputBuffer [static, private]

string used for keyboard input

Definition at line 107 of file console.hpp.

Referenced by autocomplete(), backspace(), draw(), enter(), eraseChar(), hide(), input(), move_cursor(), and show_history().

ConsoleStreamBuffer Console::outputBuffer [static, private]

stream buffer used by output stream

Definition at line 108 of file console.hpp.

Referenced by flush().


The documentation for this class was generated from the following files:
Generated on Mon Jun 9 03:38:29 2014 for SuperTux by  doxygen 1.5.1