Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/gui/src/lib/gui/gl/specials/notifier.h @ 8498

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

notifier added (does not compile)

File size: 1.5 KB
Line 
1/*!
2 * @file shell.h
3 * Definition of a on-screen-shell
4 *
5 * @todo Buffer Display in different Colors for different debug mode.
6 * @todo choose color of the Font and the background.
7 */
8
9#ifndef _SHELL_H
10#define _SHELL_H
11
12#include "glgui_widget.h"
13#include "event_listener.h"
14
15// FORWARD DECLARATION
16class MultiLineText;
17
18//! Namespace of the Shell of ORXONOX.
19namespace OrxGui
20{
21  class Shell : public GLGuiWidget
22  {
23
24  public:
25    Shell();
26    virtual ~Shell();
27
28    void pushNotifyMessage(const std::string& message);
29
30    // BUFFERS
31    void setBufferDisplaySize(unsigned int bufferDisplaySize);
32    void printToDisplayBuffer(const std::string& text);
33
34    void clear();
35
36    // EventListener
37    virtual void processEvents(const Event &event);
38    // Element2D-functions
39    virtual void tick(float dt);
40    virtual void draw() const;
41
42
43    void debug() const;
44
45  private:
46    void updateResolution(unsigned int width);
47    void repositionText();
48    void applyTextSettings(Text* text);
49    void applySettings();
50    // helpers //
51    Vector2D calculateLinePosition(unsigned int lineNumber);
52
53  private:
54    unsigned int                lineSpacing;            //!< The Spacing between lines.
55
56    // BUFFER
57    unsigned int                bufferDisplaySize;      //!< The Size of the Display-buffer, in lines (not in characters).
58    std::list<MultiLineText*>   bufferText;             //!< A list of stored bufferTexts for the display of the buffer.
59
60    unsigned long               linesProcessed;         //!< How many Lines have been processed.
61  };
62
63}
64
65#endif /* _SHELL_H */
Note: See TracBrowser for help on using the repository browser.