/*! * @file shell.h * Definition of a on-screen-shell * * @todo Buffer Display in different Colors for different debug mode. * @todo choose color of the Font and the background. */ #ifndef _SHELL_H #define _SHELL_H #include "glgui_widget.h" #include "event_listener.h" // FORWARD DECLARATION class MultiLineText; //! Namespace of the Shell of ORXONOX. namespace OrxGui { class Shell : public GLGuiWidget { public: Shell(); virtual ~Shell(); void pushNotifyMessage(const std::string& message); // BUFFERS void setBufferDisplaySize(unsigned int bufferDisplaySize); void printToDisplayBuffer(const std::string& text); void clear(); // EventListener virtual void processEvents(const Event &event); // Element2D-functions virtual void tick(float dt); virtual void draw() const; void debug() const; private: void updateResolution(unsigned int width); void repositionText(); void applyTextSettings(Text* text); void applySettings(); // helpers // Vector2D calculateLinePosition(unsigned int lineNumber); private: unsigned int lineSpacing; //!< The Spacing between lines. // BUFFER unsigned int bufferDisplaySize; //!< The Size of the Display-buffer, in lines (not in characters). std::list bufferText; //!< A list of stored bufferTexts for the display of the buffer. unsigned long linesProcessed; //!< How many Lines have been processed. }; } #endif /* _SHELL_H */