Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/gui/src/lib/gui/gl/glgui_inputline.h @ 8437

Last change on this file since 8437 was 8419, checked in by bensch, 18 years ago

Better coloring sceme

File size: 1.8 KB
RevLine 
[4838]1/*!
[7892]2 * @file glgui_inputline.h
3 * The gl_INPUTLINE widget of th openglGUI
[5360]4 *
5 */
[1853]6
[7892]7#ifndef _GLGUI_INPUTLINE_H
8#define _GLGUI_INPUTLINE_H
[1853]9
[5365]10#include "glgui_widget.h"
[7892]11#include "text.h"
[7893]12#include "event.h"
[1853]13
[4838]14// FORWARD DECLARATION
[7779]15namespace OrxGui
16{
[3543]17
[8035]18  //! This is InputLine part of the openglGUI class
[7779]19  /**
[8035]20   * The InputLine is a Widget, that displays a Line, that can be manipulated through
21   * Writing Text on it.
[7779]22   *
[8035]23   * Whenever the Text is changed the textChanged signal is emitted.
[7779]24   */
[7892]25  class GLGuiInputLine : public OrxGui::GLGuiWidget
[7779]26  {
[3543]27
[7779]28  public:
[7892]29    GLGuiInputLine();
30    virtual ~GLGuiInputLine();
[2036]31
[1853]32
[8035]33    /** @returns the text of the inputLine */
[8419]34    const std::string& _getText() const { return this->_text.getText(); };
[8035]35
[7892]36    void setText(const std::string& text);
37    void append(const std::string& appendText);
[7893]38    void appendCharacter(char character);
[7892]39    void removeCharacters(unsigned int chars);
[1853]40
[7896]41    virtual void removedFocus();
42
[7894]43    virtual void tick(float dt);
[7892]44    virtual void draw() const;
45
[7893]46    virtual bool processEvent(const Event& event);
47
[8035]48    DeclareSignal1(textChanged, const std::string&);
[7894]49
[8419]50  protected:
51    virtual void updateFrontColor();
52    virtual void hiding();
53    virtual void showing();
54
55
[8035]56  private:
57    void init();
58    void resize();
[7894]59
[7779]60  private:
[8419]61    Text                    _text;            //!< The Text to display inside of the InputLine.
[7894]62
63    Uint16                  pressedKey;       //!< the pressed key that will be repeated.
64    Uint16                  pressedKeyName;   //!< The Name of the Key, that was pressed.
65
66    float                   delayNext;        //!< How much time must pass before next output.
67
[8035]68    static float            repeatDelay;      //!< Repead Delay.
69    static float            repeatRate;       //!< Repeat Rate.
[7779]70  };
71}
[1853]72
[7892]73#endif /* _GLGUI_INPUTLINE_H */
Note: See TracBrowser for help on using the repository browser.