Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: partial Completion in the ShellInput again (show but no Completion)

File size: 1.5 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  const char* getInputString() const { return this->inputLine; };
34
35
36  virtual void tick(float dt);
37  virtual void process(const Event &event);
38
39 private:
40    // HANDLING TEXT INPUT
41   ShellCompletion*         completion;             //!< The Completion Interface.
42
43   char*                    inputLine;              //!< the Char-Array of the Buffer @todo not needed anymore
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.
48
49   tList<char>*             inputHistory;           //!< The history of given commands.
50
51};
52
53#endif /* _SHELL_INPUT_H */
Note: See TracBrowser for help on using the repository browser.