raven/src/Label.hpp

26 lines
426 B
C++
Raw Normal View History

#pragma once
#include "Widget.hpp"
#include "PropMacros.hpp"
namespace Raven {
class Label : public Widget {
private:
std::string m_text;
public:
Label(std::string text)
: Widget()
, m_text(text) {}
~Label() {}
std::string &get_text() { return m_text; }
void set_text(std::string text) { m_text = text; wants_full_repaint(); }
protected:
void on_paint();
void on_init();
};
}