Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: first fruits of valgrind…. delete[] are fine now :)

File size: 1.7 KB
RevLine 
[4838]1/*!
[5178]2 * @file shell_input.h
[4838]3 * @brief Definition of ...
[5208]4 * @todo AutoCompletion should print nice output
5 * @todo move up and down in Buffer
6 * @todo display old shell Commands
[3245]7*/
[1853]8
[5178]9#ifndef _SHELL_INPUT_H
10#define _SHELL_INPUT_H
[1853]11
[5179]12#include "text_engine.h"
[5180]13#include "event_listener.h"
[5179]14
[4838]15// FORWARD DECLARATION
[5178]16template<class T> class tList;
[5181]17class ShellCompletion;
[3543]18
19
[3955]20//! A class for ...
[5180]21class ShellInput : public Text,  public EventListener {
[1853]22
[1904]23 public:
[5178]24  ShellInput();
25  virtual ~ShellInput();
[1853]26
[5185]27  /** @returns the inputLine */
28  const char* getInput() const { return this->inputLine; };
[3245]29
[5178]30  // InputLine
31  void flush();
32  void addCharacter(char character);
33  void addCharacters(const char* characters);
34  void removeCharacters(unsigned int characterCount = 1);
35  void setRepeatDelay(float repeatDelay, float repeatRate);
[5179]36  bool executeCommand();
[5204]37  void help(const char* className = "", const char* function = "");
[5178]38
[5180]39  virtual void tick(float dt);
40  virtual void process(const Event &event);
41
[3245]42 private:
[5178]43    // HANDLING TEXT INPUT
[5181]44   ShellCompletion*         completion;             //!< The Completion Interface.
45
46   char*                    inputLine;              //!< the Char-Array of the Buffer @todo not needed anymore
[5178]47   float                    repeatRate;             //!< The Repeat-Delay.
48   float                    repeatDelay;            //!< The delay of the first Character of a given Character.
49   float                    delayed;                //!< how much of the delay is remaining.
50   int                      pressedKey;             //!< the pressed key that will be repeated.
[3245]51
[5178]52   tList<char>*             inputHistory;           //!< The history of given commands.
[1853]53};
54
[5178]55#endif /* _SHELL_INPUT_H */
Note: See TracBrowser for help on using the repository browser.