You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
669 B

13 years ago
#ifndef UILABEL_H
#define UILABEL_H
#include "uiwidget.h"
13 years ago
class UILabel : public UIWidget
13 years ago
{
public:
virtual void setup();
virtual void render();
void resizeToText();
13 years ago
void setText(const std::string& text);
13 years ago
void setAlign(AlignmentFlag align) { m_align = align; }
13 years ago
void setOffset(const Point& offset) { m_offset = offset; }
13 years ago
std::string getText() const { return m_text; }
AlignmentFlag getAlign() const { return m_align; }
13 years ago
Point getOffset() const { return m_offset; }
13 years ago
protected:
virtual void onStyleApply(const OTMLNodePtr& styleNode);
private:
std::string m_text;
13 years ago
Point m_offset;
13 years ago
AlignmentFlag m_align;
13 years ago
};
#endif