Clean project structure.
This commit is contained in:
parent
78a4fa99ff
commit
947bf937fd
496 changed files with 206 additions and 137 deletions
34
src/ui/ui_controls/Label.h
Normal file
34
src/ui/ui_controls/Label.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#pragma once
|
||||
|
||||
#include "Widget.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class TextNode;
|
||||
|
||||
class Label : public Widget
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
Label();
|
||||
|
||||
virtual ~Label() = default;
|
||||
|
||||
static std::unique_ptr<Label> Create();
|
||||
|
||||
void setLabel(const std::string& text);
|
||||
|
||||
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};
|
||||
|
||||
};
|
||||
|
||||
using LabelUPtr = std::unique_ptr<Label>;
|
Loading…
Add table
Add a link
Reference in a new issue