Rework TextDrawer interface

This commit is contained in:
SirLynix
2023-08-24 17:47:20 +02:00
parent 9579eba43d
commit 557da10dc6
17 changed files with 293 additions and 299 deletions

View File

@@ -13,7 +13,7 @@ namespace Nz
Layout();
}
void RichTextAreaWidget::AppendText(const std::string& text)
void RichTextAreaWidget::AppendText(std::string_view text)
{
//m_text += text;
switch (m_echoMode)
@@ -132,7 +132,7 @@ namespace Nz
UpdateDisplayText();
}
void RichTextAreaWidget::Write(const std::string& text, std::size_t glyphPosition)
void RichTextAreaWidget::Write(std::string_view text, std::size_t glyphPosition)
{
if (m_drawer.HasBlocks())
{

View File

@@ -39,7 +39,7 @@ namespace Nz
Layout();
}
void TextAreaWidget::AppendText(const std::string& text)
void TextAreaWidget::AppendText(std::string_view text)
{
m_text += text;
@@ -113,7 +113,7 @@ namespace Nz
SetText(newText);
}
void TextAreaWidget::Write(const std::string& text, std::size_t glyphPosition)
void TextAreaWidget::Write(std::string_view text, std::size_t glyphPosition)
{
if (glyphPosition >= m_drawer.GetGlyphCount())
{