Convert visual layers to scene nodes.

This commit is contained in:
James Grogan 2022-11-16 15:06:08 +00:00
parent 798cb365d7
commit 3e53bd9e00
64 changed files with 863 additions and 551 deletions

View file

@ -4,6 +4,8 @@
#include <string>
class TextNode;
class Label : public Widget
{
@ -11,14 +13,21 @@ public:
Label();
virtual ~Label() = default;
static std::unique_ptr<Label> Create();
void setLabel(const std::string& text);
void onPaintEvent(const PaintEvent* event) override;
private:
bool isDirty() const override;
void doPaint(const PaintEvent* event) override;
void updateLabel(const PaintEvent* event);
std::string mLabel;
std::unique_ptr<TextNode> mTextNode;
bool mContentDirty{true};
};