Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.2 KB
RevLine 
[4838]1/*!
[7450]2 * @file multi_line_text.h
[5343]3 * @brief Definition of a text Class, that is able to render text.
[7355]4 */
[1853]5
[7450]6#ifndef _MULTI_LINE_TEXT_H
7#define _MULTI_LINE_TEXT_H
[1853]8
[7450]9#include "text.h"
[1853]10
[7450]11#include <vector>
[5343]12
13//! Represents one textElement.
[7450]14class MultiLineText : public Text
[5343]15{
[9869]16  ObjectListDeclaration(MultiLineText);
[5343]17  public:
[7757]18    MultiLineText(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE, float lineWidth = 100.0);
[3245]19
[7450]20    // Setup:
21    void setLineWidth(float lineWidth);
[7454]22    void setLineSpacing(float lineSpacing);
[5345]23
[7450]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; };
[7737]29    inline unsigned int getLineCount() const { return this->lineCount; };
[5367]30
[5343]31    virtual void draw() const;
32
[7757]33    void debug() const;
34
[7450]35  protected:
36    virtual void setupTextWidth();
[5343]37
38  private:
[7450]39    float                      lineWidth;
40    float                      lineSpacing;
41    std::vector<unsigned int>  lineEnds;
[7737]42    unsigned int               lineCount;
[1853]43};
44
[7450]45#endif /* _MULTI_LINE_TEXT_H */
Note: See TracBrowser for help on using the repository browser.