Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: Shell Input is totally out of shell.cc/h

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;
14
15
16//! A class for ...
17class ShellInput : public Text,  public EventListener {
18
19 public:
20  ShellInput();
21  virtual ~ShellInput();
22
23
24  // InputLine
25  void flush();
26  void addCharacter(char character);
27  void addCharacters(const char* characters);
28  void removeCharacters(unsigned int characterCount = 1);
29  void setRepeatDelay(float repeatDelay, float repeatRate);
30  bool executeCommand();
31  void help() const;
32  const char* getInputString() const { return this->inputLine; };
33
34
35  virtual void tick(float dt);
36  virtual void process(const Event &event);
37
38 private:
39    // HANDLING TEXT INPUT
40   char*                    inputLine;              //!< the Char-Array of the Buffer
41   float                    repeatRate;             //!< The Repeat-Delay.
42   float                    repeatDelay;            //!< The delay of the first Character of a given Character.
43   float                    delayed;                //!< how much of the delay is remaining.
44   int                      pressedKey;             //!< the pressed key that will be repeated.
45
46   tList<char>*             inputHistory;           //!< The history of given commands.
47
48};
49
50#endif /* _SHELL_INPUT_H */
Note: See TracBrowser for help on using the repository browser.