Last change
on this file since 5185 was
5185,
checked in by bensch, 20 years ago
|
orxonox/trunk: half-faulty object Completion…. fixing
|
File size:
1.5 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" |
---|
[5180] | 10 | #include "event_listener.h" |
---|
[5179] | 11 | |
---|
[4838] | 12 | // FORWARD DECLARATION |
---|
[5178] | 13 | template<class T> class tList; |
---|
[5181] | 14 | class ShellCompletion; |
---|
[3543] | 15 | |
---|
| 16 | |
---|
[3955] | 17 | //! A class for ... |
---|
[5180] | 18 | class ShellInput : public Text, public EventListener { |
---|
[1853] | 19 | |
---|
[1904] | 20 | public: |
---|
[5178] | 21 | ShellInput(); |
---|
| 22 | virtual ~ShellInput(); |
---|
[1853] | 23 | |
---|
[5185] | 24 | /** @returns the inputLine */ |
---|
| 25 | const char* getInput() const { return this->inputLine; }; |
---|
[3245] | 26 | |
---|
[5178] | 27 | // InputLine |
---|
| 28 | void flush(); |
---|
| 29 | void addCharacter(char character); |
---|
| 30 | void addCharacters(const char* characters); |
---|
| 31 | void removeCharacters(unsigned int characterCount = 1); |
---|
| 32 | void setRepeatDelay(float repeatDelay, float repeatRate); |
---|
[5179] | 33 | bool executeCommand(); |
---|
[5180] | 34 | void help() const; |
---|
[5178] | 35 | |
---|
[5180] | 36 | virtual void tick(float dt); |
---|
| 37 | virtual void process(const Event &event); |
---|
| 38 | |
---|
[3245] | 39 | private: |
---|
[5178] | 40 | // HANDLING TEXT INPUT |
---|
[5181] | 41 | ShellCompletion* completion; //!< The Completion Interface. |
---|
| 42 | |
---|
| 43 | char* inputLine; //!< the Char-Array of the Buffer @todo not needed anymore |
---|
[5178] | 44 | float repeatRate; //!< The Repeat-Delay. |
---|
| 45 | float repeatDelay; //!< The delay of the first Character of a given Character. |
---|
| 46 | float delayed; //!< how much of the delay is remaining. |
---|
| 47 | int pressedKey; //!< the pressed key that will be repeated. |
---|
[3245] | 48 | |
---|
[5178] | 49 | tList<char>* inputHistory; //!< The history of given commands. |
---|
[1853] | 50 | }; |
---|
| 51 | |
---|
[5178] | 52 | #endif /* _SHELL_INPUT_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.