Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/shell/shell_input.h @ 5182

Last change on this file since 5182 was 5182, checked in by bensch, 19 years ago

orxonox/trunk: completion works again :)
now it is time to go to bed again

File size: 1.4 KB
Line 
1/*!
2 * @file shell_input.h
3 * @brief Definition of ...
4*/
5
6#ifndef _SHELL_INPUT_H
7#define _SHELL_INPUT_H
8
9#include "text_engine.h"
10#include "event_listener.h"
11
12// FORWARD DECLARATION
13template<class T> class tList;
14class ShellCompletion;
15
16
17//! A class for ...
18class ShellInput : public Text,  public EventListener {
19
20 public:
21  ShellInput();
22  virtual ~ShellInput();
23
24
25  // InputLine
26  void flush();
27  void addCharacter(char character);
28  void addCharacters(const char* characters);
29  void removeCharacters(unsigned int characterCount = 1);
30  void setRepeatDelay(float repeatDelay, float repeatRate);
31  bool executeCommand();
32  void help() const;
33
34  virtual void tick(float dt);
35  virtual void process(const Event &event);
36
37 private:
38    // HANDLING TEXT INPUT
39   ShellCompletion*         completion;             //!< The Completion Interface.
40
41   char*                    inputLine;              //!< the Char-Array of the Buffer @todo not needed anymore
42   float                    repeatRate;             //!< The Repeat-Delay.
43   float                    repeatDelay;            //!< The delay of the first Character of a given Character.
44   float                    delayed;                //!< how much of the delay is remaining.
45   int                      pressedKey;             //!< the pressed key that will be repeated.
46
47   tList<char>*             inputHistory;           //!< The history of given commands.
48};
49
50#endif /* _SHELL_INPUT_H */
Note: See TracBrowser for help on using the repository browser.