Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl_gui/glgui_inputline.h @ 7929

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

orxonox/trunk: merged the gui branche back
merged with command:
https://svn.orxonox.net/orxonox/branches/gui
no conflicts

File size: 1.4 KB
Line 
1/*!
2 * @file glgui_inputline.h
3 * The gl_INPUTLINE widget of th openglGUI
4 *
5 */
6
7#ifndef _GLGUI_INPUTLINE_H
8#define _GLGUI_INPUTLINE_H
9
10#include "glgui_widget.h"
11#include "text.h"
12#include "event.h"
13
14// FORWARD DECLARATION
15namespace OrxGui
16{
17
18  //! This is part of the openglGUI class
19  /**
20   *
21   */
22  class GLGuiInputLine : public OrxGui::GLGuiWidget
23  {
24
25  public:
26    GLGuiInputLine();
27    virtual ~GLGuiInputLine();
28
29    void init();
30
31    void setText(const std::string& text);
32    void append(const std::string& appendText);
33    void appendCharacter(char character);
34    void removeCharacters(unsigned int chars);
35    const std::string& getName() const { return this->text.getText(); };
36
37
38    virtual void removedFocus();
39
40    virtual void tick(float dt);
41    virtual void draw() const;
42
43    virtual bool processEvent(const Event& event);
44
45    private:
46      void resize();
47
48
49  private:
50    Text                    text;             //!< The Text to display inside of the InputLine.
51
52    Uint16                  pressedKey;       //!< the pressed key that will be repeated.
53    Uint16                  pressedKeyName;   //!< The Name of the Key, that was pressed.
54
55    float                   delayNext;        //!< How much time must pass before next output.
56
57    static float            repeatDelay;
58    static float            repeatRate;
59
60
61  };
62}
63
64#endif /* _GLGUI_INPUTLINE_H */
Note: See TracBrowser for help on using the repository browser.