From eba7ee1d70d02c937eb01efa10d4f94674940e98 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 31 Oct 2016 23:06:47 +0100 Subject: [PATCH] textbox: add clear() function Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/0b504f8c60b453c5546291c19467525545f68bb4 Author: vanhofen Date: 2016-10-31 (Mon, 31 Oct 2016) Origin message was: ------------------ - textbox: add clear() function --- src/gui/widget/textbox.cpp | 10 ++++++++++ src/gui/widget/textbox.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 7120b7a16..10e04b023 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -836,6 +836,16 @@ void CTextBox::hide (void) frameBuffer = NULL; } +void CTextBox::clear(void) +{ + //TRACE("[CTextBox] %s Line %d\r\n", __FUNCTION__, __LINE__); + if (frameBuffer == NULL) + return; + + std::string clear(" "); + setText(&clear); +} + bool CTextBox::clearScreenBuffer() { if(m_bgpixbuf){ diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h index d2213db78..c062b62e7 100644 --- a/src/gui/widget/textbox.h +++ b/src/gui/widget/textbox.h @@ -210,6 +210,7 @@ class CTextBox : public sigc::trackable inline int getTextMode() {return m_nMode;}; void paint (void); void hide (void); + void clear(void); bool clearScreenBuffer(); sigc::signal OnAfterRefresh; sigc::signal OnAfterScrollPage;