mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 17:53:47 +00:00
9245bee717
mostly sign-related, but also some about commas after the last item in an enum list, usage of default in switches, implicit or old-style casts
23 lines
644 B
C++
23 lines
644 B
C++
#ifndef BASETEXT_H
|
|
#define BASETEXT_H
|
|
|
|
#include "RenderObject.h"
|
|
|
|
|
|
class BaseText : public RenderObject
|
|
{
|
|
public:
|
|
BaseText() { addType(SCO_TEXT); }
|
|
virtual ~BaseText() {}
|
|
virtual void setText(const std::string& text) = 0;
|
|
virtual void setWidth(float width) = 0;
|
|
virtual void setFontSize(float sz) = 0;
|
|
virtual void setAlign(Align a) = 0;
|
|
virtual float getLineHeight() = 0;
|
|
virtual size_t getNumLines() = 0;
|
|
virtual float getHeight() = 0; // total height
|
|
virtual float getStringWidth(const std::string& text) = 0; // width of string when not auto-wrapped
|
|
virtual float getActualWidth() = 0; // width of text after wrapping
|
|
};
|
|
|
|
#endif
|