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

@@ -23,6 +23,16 @@ namespace Ndk
m_multiLineEnabled = enable;
}
inline void TextAreaWidget::EnableTabWriting(bool enable)
{
m_tabEnabled = enable;
}
inline void TextAreaWidget::Erase(std::size_t glyphPosition)
{
Erase(glyphPosition, glyphPosition + 1U);
}
inline TextAreaWidget::CharacterFilter TextAreaWidget::GetCharacterFilter() const
{
return m_characterFilter;
@@ -102,6 +112,11 @@ namespace Ndk
return m_multiLineEnabled;
}
inline bool TextAreaWidget::IsTabWritingEnabled() const
{
return m_tabEnabled;
}
inline bool TextAreaWidget::IsReadOnly() const
{
return m_readOnly;
@@ -233,4 +248,14 @@ namespace Ndk
m_textSprite->Update(m_drawer);
}
inline void TextAreaWidget::Write(const Nz::String& text)
{
Write(text, GetGlyphIndex(m_cursorPositionBegin));
}
inline void TextAreaWidget::Write(const Nz::String& text, const Nz::Vector2ui& glyphPosition)
{
Write(text, GetGlyphIndex(glyphPosition));
}
}