2022-03-26 02:57:41 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Widget.hpp"
|
|
|
|
#include "PropMacros.hpp"
|
|
|
|
|
|
|
|
namespace Raven {
|
|
|
|
|
|
|
|
class Label : public Widget {
|
|
|
|
private:
|
2022-03-29 07:00:03 +03:00
|
|
|
std::string m_text;
|
2022-03-26 02:57:41 +02:00
|
|
|
public:
|
|
|
|
Label(std::string text)
|
|
|
|
: Widget()
|
|
|
|
, m_text(text) {}
|
|
|
|
|
|
|
|
~Label() {}
|
2022-03-29 07:00:03 +03:00
|
|
|
|
|
|
|
std::string &get_text() { return m_text; }
|
2022-03-30 09:53:09 +03:00
|
|
|
void set_text(std::string text) { m_text = text; wants_repaint(); }
|
2022-03-26 02:57:41 +02:00
|
|
|
protected:
|
2022-03-30 14:49:31 +03:00
|
|
|
WidgetType m_type { WidgetType::Label };
|
|
|
|
|
2022-03-26 02:57:41 +02:00
|
|
|
void on_paint();
|
|
|
|
void on_init();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|