29 lines
499 B
C++
29 lines
499 B
C++
#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>;
|