Changeset 8688 in orxonox.OLD for branches/gui/src/lib/gui/gl/specials/glgui_imagebutton.h
- Timestamp:
- Jun 21, 2006, 10:33:24 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/specials/glgui_imagebutton.h
r8686 r8688 7 7 */ 8 8 9 #ifndef _GLGUI_ NOTIFIER_H10 #define _GLGUI_ NOTIFIER_H9 #ifndef _GLGUI_IMAGEBUTTON_H 10 #define _GLGUI_IMAGEBUTTON_H 11 11 12 12 #include "glgui_widget.h" … … 15 15 #include <stack> 16 16 17 // FORWARD DECLARATION 18 class MultiLineText; 19 class Text; 20 21 //! Namespace of the GLGuiNotifier of ORXONOX. 17 //! Namespace of the GLGuiImageButton of ORXONOX. 22 18 namespace OrxGui 23 19 { 24 class GLGui Notifier: public GLGuiWidget20 class GLGuiImageButton : public GLGuiWidget 25 21 { 26 22 public: 27 GLGuiNotifier(); 28 virtual ~GLGuiNotifier(); 29 30 void pushNotifyMessage(const std::string& message); 31 32 /// Setup 33 void setDisplayLineCount(unsigned int count); 34 void setFadeAge(float fadeAge); 35 void setHideAge(float hideAge); 36 37 /** @returns the beginning of the Hiding process */ 38 inline float fadeAge() const { return _fadeAge; }; 39 /** @returns at what age elements should be fully hidden */ 40 inline float hideAge() const { return _hideAge; }; 41 42 void clear(); 43 44 // Element2D-functions 45 virtual void tick(float dt); 46 virtual void draw() const; 23 GLGuiImageButton(); 24 virtual ~GLGuiImageButton(); 47 25 48 26 void debug() const; … … 52 30 53 31 private: 54 void repositionText();55 void applyTextSettings(MultiLineText* text);56 void applySettings();57 // helpers //58 Vector2D calculateLinePosition(unsigned int lineNumber);59 60 61 32 62 33 private: 63 //! structure that defines a Displayed line.64 typedef struct65 {66 float age;67 MultiLineText* text;68 69 } DisplayLine;70 71 72 float _fadeAge;73 float _hideAge;74 float _transformAge;75 76 unsigned int lineSpacing; //!< The Spacing between lines.77 78 // BUFFER79 unsigned int bufferDisplaySize; //!< The Size of the Display-buffer, in lines (not in characters).80 std::list<DisplayLine> displayLines; //!< A list of stored bufferTexts for the display of the buffer.81 82 std::stack<MultiLineText*> hiddenText; //!< Text that is not shown, and not used is thrown in here83 84 85 unsigned long linesProcessed; //!< How many Lines have been processed so far.86 std::list<std::string> inputBuffer; //!< The input buffer for lines that were not yet printet out, because there is too much input.87 34 88 35 }; … … 90 37 } 91 38 92 #endif /* _GLGUI_ NOTIFIER_H */39 #endif /* _GLGUI_IMAGEBUTTON_H */
Note: See TracChangeset
for help on using the changeset viewer.