TextAreaWidget: Make Tab writable (#175)

* TextAreaWidget: Make Tab writable

* Implement Tab ena/disabling, disable it by default

* Log change

* Rename Tab Enabling function

* Add useful Write/Delete functions

* Finished!

* whoops

* Fix everything

* whoops

* I don't know why but it works

* whoops

* I'M PUSHING.
This commit is contained in:
S6066
2018-08-14 20:53:26 +02:00
committed by Jérôme Leclercq
parent beca6e7dd5
commit d83c12c2d3
4 changed files with 128 additions and 41 deletions

View File

@@ -32,8 +32,12 @@ namespace Ndk
//virtual TextAreaWidget* Clone() const = 0;
inline void EnableMultiline(bool enable = true);
inline void EnableMultiline(bool enable = true);
inline void EnableTabWriting(bool enable = true);
inline void Erase(std::size_t glyphPosition);
void Erase(std::size_t firstGlyph, std::size_t lastGlyph);
void EraseSelection();
inline CharacterFilter GetCharacterFilter() const;
@@ -52,6 +56,7 @@ namespace Ndk
inline bool IsMultilineEnabled() const;
inline bool IsReadOnly() const;
inline bool IsTabWritingEnabled() const;
inline void MoveCursor(int offset);
inline void MoveCursor(const Nz::Vector2i& offset);
@@ -68,7 +73,9 @@ namespace Ndk
inline void SetText(const Nz::String& text);
inline void SetTextColor(const Nz::Color& text);
void Write(const Nz::String& text);
inline void Write(const Nz::String& text);
inline void Write(const Nz::String& text, const Nz::Vector2ui& glyphPosition);
void Write(const Nz::String& text, std::size_t glyphPosition);
TextAreaWidget& operator=(const TextAreaWidget&) = delete;
TextAreaWidget& operator=(TextAreaWidget&&) = default;
@@ -115,6 +122,7 @@ namespace Ndk
bool m_isMouseButtonDown;
bool m_multiLineEnabled;
bool m_readOnly;
bool m_tabEnabled; // writes (Shift+)Tab character if set to true
};
}