raven/src/Label.hpp

28 lines
467 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_repaint(); }
protected:
2022-03-30 14:49:31 +03:00
WidgetType m_type { WidgetType::Label };
void on_paint();
void on_init();
};
}