Changeset 5175 in orxonox.OLD for trunk/src/lib/shell/shell.h
- Timestamp:
- Sep 11, 2005, 11:21:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell.h
r5174 r5175 39 39 /** @returns a Pointer to the only object of this Class */ 40 40 inline static Shell* getInstance() { if (!Shell::singletonRef) Shell::singletonRef = new Shell(); return Shell::singletonRef; }; 41 /** @returns true if this class is instanciated, false otherwise */ 42 inline static bool isInstanciated() { return (Shell::singletonRef == NULL)?true:false; }; 41 43 42 44 void activate(); … … 46 48 void rebuildText(); 47 49 48 // BUFFER // 49 /** @param bufferSize the new Buffer-Size */ 50 void setBufferSize(unsigned int bufferSize) { this->bufferSize = bufferSize; }; 50 // BUFFERS 51 51 void setBufferDisplaySize(unsigned int bufferDisplaySize); 52 void flushBuffers(); 53 static bool addBufferLineStatic(const char* line, ...); 54 void addBufferLine(const char* line, va_list arg); 52 void flush(); 55 53 void printToDisplayBuffer(const char* text); 56 void moveBuffer(unsigned int lineCount);57 // void moveBufferTo(unsigned int lineNumber);58 const char* getBufferLine(unsigned int lineNumber);59 54 60 55 // InputLine … … 103 98 static Shell* singletonRef; //!< The singleton-reference to the only memeber of this class. 104 99 105 unsigned int bufferSize; //!< The Size of the buffer106 100 unsigned int bufferDisplaySize; //!< The Size of the Display-buffer, in lines (not in characters) 107 101 102 // HANDLING TEXT INPUT 108 103 Text* inputLineText; //!< The inputLine of the Shell 109 104 char* inputLine; //!< the Char-Array of the Buffer … … 112 107 float delayed; //!< how much of the delay is remaining. 113 108 int pressedKey; //!< the pressed key that will be repeated. 114 115 tList<char>* buffer; //!< A list of stored char-arrays(strings) to store the history116 tIterator<char>* bufferIterator; //!< An iterator for the Shells main buffer.117 109 118 110 tList<char>* inputHistory; //!< The history of given commands. … … 124 116 bool bActive; //!< if the shell is active; 125 117 126 char bufferArray[SHELL_BUFFER_SIZE]; //!< a BUFFER for fast writing127 char keepBufferArray[SHELL_BUFFER_SIZE]; //!< a BUFFER to have multi-non-newLine commands be copied into the shell.128 bool keepBuffer; //!< if the keepbuffer contains unfinished lines.129 130 118 // completion 131 119 tList<const char>* completionList; //!< A list of completions, that are io.
Note: See TracChangeset
for help on using the changeset viewer.