Changeset 7343 in orxonox.OLD for trunk/src/lib/shell/shell_input.cc
- Timestamp:
- Apr 19, 2006, 4:26:27 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_input.cc
r7342 r7343 41 41 * this also generates a ShellCompletion automatically. 42 42 */ 43 ShellInput::ShellInput () : Text ("") 43 ShellInput::ShellInput () 44 : Text ("") 44 45 { 45 46 this->pressedKey = SDLK_FIRST; … … 66 67 evh->unsubscribe(ES_SHELL, SDLK_PAGEDOWN); 67 68 68 this->completion = new ShellCompletion(this); 69 } 70 71 /** 72 * standard deconstructor 73 */ 69 } 70 71 /** 72 * @brief standard deconstructor 73 */ 74 74 ShellInput::~ShellInput () 75 75 { 76 // delete what has to be deleted here 77 delete this->completion; 78 79 while (!this->history.empty()) 80 { 81 this->history.pop_front(); 82 } 83 } 84 85 /** 86 * sets the Repeate-delay and rate 76 } 77 78 /** 79 * @brief sets the Repeate-delay and rate 87 80 * @param repeatDelay the Delay it takes, to repeate a key 88 81 * @param repeatRate the rate to repeate a pressed key … … 95 88 96 89 /** 97 * deletes the InputLine90 * @brief deletes the InputLine 98 91 */ 99 92 void ShellInput::flush() … … 104 97 105 98 /** 106 * sets the entire text of the InputLine to text99 * @brief sets the entire text of the InputLine to text 107 100 * @param text the new Text to set as InputLine 108 101 */ … … 115 108 116 109 /** 117 * adds one character to the inputLine110 * @brief adds one character to the inputLine 118 111 * @param character the character to add to the inputLine 119 112 */ … … 131 124 132 125 /** 133 * adds multiple Characters to thr inputLine126 * @brief adds multiple Characters to thr inputLine 134 127 * @param characters a \\0 terminated char-array to add to the InputLine 135 128 */ … … 147 140 148 141 /** 149 * removes characterCount characters from the InputLine142 * @brief removes characterCount characters from the InputLine 150 143 * @param characterCount the count of Characters to remove from the input Line 151 144 */ … … 165 158 166 159 /** 167 * executes the command stored in the inputLine160 * @brief executes the command stored in the inputLine 168 161 * @return true if the command was commited successfully, false otherwise 169 162 */ … … 198 191 199 192 /** 200 * moves one entry up in the history.193 * @brief moves one entry up in the history. 201 194 */ 202 195 void ShellInput::historyMoveUp() … … 223 216 224 217 /** 225 * moves one entry down in the history218 * @brief moves one entry down in the history 226 219 */ 227 220 void ShellInput::historyMoveDown() … … 244 237 245 238 /** 246 * prints out some nice help about the Shell239 * @brief prints out some nice help about the Shell 247 240 */ 248 241 void ShellInput::help(const std::string& className, const std::string& functionName) … … 267 260 268 261 /** 269 * ticks the ShellInput262 * @brief ticks the ShellInput 270 263 * @param dt the time passed since the last update 271 264 */ … … 298 291 299 292 /** 300 * listens for some event293 * @brief listens for some event 301 294 * @param event the Event happened 302 295 */ … … 323 316 } 324 317 else if (event.type == SDLK_TAB) 325 this->completion->autoComplete(); 318 { 319 this->completion.autoComplete(this->inputLine); 320 this->setText(this->inputLine); 321 } 326 322 else if (event.type == SDLK_BACKSPACE) 327 323 {
Note: See TracChangeset
for help on using the changeset viewer.