Last change
on this file since 5179 was
5179,
checked in by bensch, 19 years ago
|
orxonox/trunk: ShellInput is now almost perfectly extern.
ShellCompletion taken out.
Working again
|
File size:
1.2 KB
|
Rev | Line | |
---|
[4838] | 1 | /*! |
---|
[5178] | 2 | * @file shell_input.h |
---|
[4838] | 3 | * @brief Definition of ... |
---|
[3245] | 4 | */ |
---|
[1853] | 5 | |
---|
[5178] | 6 | #ifndef _SHELL_INPUT_H |
---|
| 7 | #define _SHELL_INPUT_H |
---|
[1853] | 8 | |
---|
[5179] | 9 | #include "text_engine.h" |
---|
| 10 | |
---|
[4838] | 11 | // FORWARD DECLARATION |
---|
[5178] | 12 | template<class T> class tList; |
---|
[3543] | 13 | |
---|
| 14 | |
---|
[3955] | 15 | //! A class for ... |
---|
[5179] | 16 | class ShellInput : public Text { |
---|
[1853] | 17 | |
---|
[1904] | 18 | public: |
---|
[5178] | 19 | ShellInput(); |
---|
| 20 | virtual ~ShellInput(); |
---|
[1853] | 21 | |
---|
[3245] | 22 | |
---|
[5178] | 23 | // InputLine |
---|
| 24 | void flush(); |
---|
| 25 | void addCharacter(char character); |
---|
| 26 | void addCharacters(const char* characters); |
---|
| 27 | void removeCharacters(unsigned int characterCount = 1); |
---|
| 28 | void setRepeatDelay(float repeatDelay, float repeatRate); |
---|
[5179] | 29 | bool executeCommand(); |
---|
| 30 | const char* getInputString() const { return this->inputLine; }; |
---|
[5178] | 31 | |
---|
| 32 | |
---|
[3245] | 33 | private: |
---|
[5178] | 34 | // HANDLING TEXT INPUT |
---|
| 35 | char* inputLine; //!< the Char-Array of the Buffer |
---|
| 36 | float repeatRate; //!< The Repeat-Delay. |
---|
| 37 | float repeatDelay; //!< The delay of the first Character of a given Character. |
---|
| 38 | float delayed; //!< how much of the delay is remaining. |
---|
| 39 | int pressedKey; //!< the pressed key that will be repeated. |
---|
[3245] | 40 | |
---|
[5178] | 41 | tList<char>* inputHistory; //!< The history of given commands. |
---|
| 42 | |
---|
[1853] | 43 | }; |
---|
| 44 | |
---|
[5178] | 45 | #endif /* _SHELL_INPUT_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.