Add Keyboard input and enter support for text editor.
This commit is contained in:
parent
cf9bace272
commit
9301769d58
23 changed files with 315 additions and 121 deletions
|
@ -20,12 +20,25 @@ public:
|
|||
std::string getContent() const;
|
||||
std::string getFontLabel() const;
|
||||
|
||||
unsigned getWidth() const;
|
||||
unsigned getHeight() const;
|
||||
|
||||
void setWidth(unsigned width);
|
||||
void setHeight(unsigned height);
|
||||
|
||||
void setContent(const std::string& content);
|
||||
|
||||
void update(FontsManager* fontsManager) override;
|
||||
private:
|
||||
std::string mContent;
|
||||
|
||||
void updateLines(FontsManager* fontsManager);
|
||||
|
||||
TextData mTextData;
|
||||
bool mContentIsDirty{true};
|
||||
bool mLinesAreDirty{true};
|
||||
|
||||
unsigned mWidth{1};
|
||||
unsigned mHeight{1};
|
||||
};
|
||||
|
||||
using TextNodetr = std::unique_ptr<TextNode>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue