Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/graphics/text_engine/multi_line_text.h @ 7450

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

orxonox/trunk: added MultiLineText a Text for multiple line-input, that should automatically shilft position

File size: 1.1 KB
Line 
1/*!
2 * @file multi_line_text.h
3 * @brief Definition of a text Class, that is able to render text.
4 */
5
6#ifndef _MULTI_LINE_TEXT_H
7#define _MULTI_LINE_TEXT_H
8
9#include "text.h"
10
11#include <vector>
12
13//! Represents one textElement.
14class MultiLineText : public Text
15{
16  public:
17    MultiLineText(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE);
18
19    // Setup:
20    void setLineWidth(float lineWidth);
21    /** @param lineSpacing: the Spacing between the lines */
22    void setLineSpacing(float lineSpacing) { this->lineSpacing = lineSpacing; };
23
24    // Retrieve:
25    /** @returns the LineWidth (maximum distance from the left to the right */
26    inline float getLineWidth() const { return this->lineWidth; };
27    /** @returns the LineSpacing */
28    inline float getLineSpacing() const { return this->lineSpacing; };
29
30    virtual void draw() const;
31
32  protected:
33    virtual void setupTextWidth();
34
35  private:
36    float                      lineWidth;
37    float                      lineSpacing;
38    std::vector<unsigned int>  lineEnds;
39};
40
41#endif /* _MULTI_LINE_TEXT_H */
Note: See TracBrowser for help on using the repository browser.