console.h

Go to the documentation of this file.
00001 /* MAINATINER: Bernard CURENT_EDITOR: Bernard */
00002 
00003 #ifndef _CONSOLE_H
00004 #define _CONSOLE_H
00005 
00006 #include <string>
00007 #include <list>
00008 
00009 #include "inputacceptor.h"
00010 #include "mutex.h"
00011 #include "log.h"
00012 #include "inputstring.h"
00013 
00014 #include "font_manager.h"
00015 
00025 class Console : public InputAcceptor, public LogAcceptor
00026 {
00027 public:
00028         Console();
00029         ~Console();
00030         
00031         // from InputAcceptor
00035         virtual bool wantKey(const SDL_keysym &keysym);
00036         virtual bool keyDown(const SDL_keysym &keysym);
00037 
00038         // from LogAcceptor
00039         
00046          virtual void logLine(const std::string &line);
00047         
00048 
00055         void render();
00056 
00062         void init();
00063         
00068         void clean();
00069         
00070 
00077         void addConsoleMessage(const std::string &msg);
00078         
00079 private:        
00080         
00087         void processCommand(const std::string &cmd);
00088 
00095         void registerLog();
00096 
00097         int mInHistory; 
00098         
00099         std::list<std::string> mMessageHistory;  
00100         Mutex                  mHistoryMutex;    
00101 
00109         bool                   mHistoryIgnore;
00110 
00111         bool mLineWrap; 
00112         
00113         bool mActive; 
00114 
00115         InputString mInputLine; 
00116         
00117         FontRef  mFont;   
00118 
00119         bool    mLogForwarding; 
00120 
00121         int     mTitle; 
00122         
00123         // commands history?
00124 };
00125 
00126 #endif // _CONSOLE_H
00127 

Generated on Wed Apr 12 13:55:27 2006 for bjs by  doxygen 1.4.5