Move windows to uptr. Add simple text editing.
This commit is contained in:
parent
2bcc7b3d83
commit
b99708e7d3
55 changed files with 1257 additions and 994 deletions
29
src/ui_elements/widgets/TextBox.h
Normal file
29
src/ui_elements/widgets/TextBox.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include "Widget.h"
|
||||
|
||||
class TextBox : public Widget
|
||||
{
|
||||
private:
|
||||
|
||||
std::string mContent;
|
||||
bool mCaps;
|
||||
|
||||
public:
|
||||
|
||||
TextBox();
|
||||
|
||||
static std::unique_ptr<TextBox> Create();
|
||||
|
||||
void SetContent(const std::string& text);
|
||||
|
||||
std::string GetContent() const;
|
||||
|
||||
void AppendContent(const std::string& text);
|
||||
|
||||
void OnPaintEvent(const PaintEvent* event) override;
|
||||
|
||||
bool OnMyKeyboardEvent(const KeyboardEvent* event) override;
|
||||
};
|
||||
|
||||
using TextBoxUPtr = std::unique_ptr<TextBox>;
|
Loading…
Add table
Add a link
Reference in a new issue