2019-02-14 08:37:02 -08:00
|
|
|
class @beta Efl.Text_Markup_Util {
|
2017-09-25 09:21:21 -07:00
|
|
|
[[Utility class for markup, such as conversions
|
|
|
|
]]
|
|
|
|
data: null;
|
|
|
|
methods {
|
2019-08-16 07:27:00 -07:00
|
|
|
text_to_markup @static {
|
2017-09-25 09:21:21 -07:00
|
|
|
[[Converts a given (UTF-8) text to a markup-compatible string.
|
2019-10-02 02:31:19 -07:00
|
|
|
This is used mainly to set a plain text with @Efl.Text_Markup.markup.set.
|
2017-09-25 09:21:21 -07:00
|
|
|
]]
|
|
|
|
params {
|
2019-10-02 02:31:19 -07:00
|
|
|
@in text: string; [[The text (UTF-8) to convert to markup.]]
|
2017-09-25 09:21:21 -07:00
|
|
|
}
|
2019-10-02 02:31:19 -07:00
|
|
|
return: mstring @move; [[The markup representation of given text.]]
|
2017-09-25 09:21:21 -07:00
|
|
|
}
|
2019-08-16 07:27:00 -07:00
|
|
|
markup_to_text @static {
|
2019-10-02 02:31:19 -07:00
|
|
|
[[Converts a markup string to a (UTF-8) plain text.
|
|
|
|
This is used mainly to set a markup text with the @Efl.Text.text.set.
|
2017-09-25 09:21:21 -07:00
|
|
|
]]
|
|
|
|
params {
|
2019-10-02 02:31:19 -07:00
|
|
|
@in text: string; [[The markup-text to convert to text (UTF-8).]]
|
2017-09-25 09:21:21 -07:00
|
|
|
}
|
2019-10-02 02:31:19 -07:00
|
|
|
return: mstring @move; [[The text representation of given markup string.]]
|
2017-09-25 09:21:21 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|