Skip to content

Commit fd7fe26

Browse files
committed
Use special character \x1B escape to clear messenger widget
1 parent d771bd7 commit fd7fe26

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/property/Property.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ Property::Property()
5555

5656
}
5757

58+
/******************************************************************************
59+
CONST
60+
******************************************************************************/
61+
namespace PropertyActions
62+
{
63+
const String CLEAR = "\x1B";
64+
}
65+
5866
/******************************************************************************
5967
PUBLIC MEMBER FUNCTIONS
6068
******************************************************************************/

src/property/Property.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@
5151
#define appendAttribute(x) appendAttributeReal(x, getAttributeName(#x, '.'), encoder)
5252
#define setAttribute(x) setAttributeReal(x, getAttributeName(#x, '.'))
5353

54+
/******************************************************************************
55+
CONST
56+
******************************************************************************/
57+
namespace PropertyActions
58+
{
59+
extern const String CLEAR;
60+
}
61+
5462
/******************************************************************************
5563
ENUM
5664
******************************************************************************/

src/property/types/CloudString.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ class CloudString : public Property {
8383
friend CloudString operator+(CloudString cs, String v) {
8484
return cs += v;
8585
}
86+
void clear() {
87+
_value = PropertyActions::CLEAR;
88+
}
8689
};
8790

8891

0 commit comments

Comments
 (0)