Efl.Text.Attribute_Factory
Summary:
Implementation of new Efl.Text.Attribute_Factory class which replace the annotation interface.
Currently, we have two public methods:
```
void efl_text_attribute_factory_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
unsigned int efl_text_attribute_factory_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end);
```
Other methods will be internal methods, for the time being, we will redesign internal methods
Reviewers: woohyun, tasn, segfaultxavi, bu5hm4n, zmike
Subscribers: zmike, q66, cedric, segfaultxavi, bu5hm4n, a.srour, #committers, #reviewers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10646
2019-11-26 20:04:31 -08:00
|
|
|
import efl_text_types;
|
|
|
|
|
2020-01-31 07:11:57 -08:00
|
|
|
abstract Efl.Text.Formatter extends Efl.Object {
|
2019-12-20 03:35:13 -08:00
|
|
|
[[Text Formatter API to manage text formatting(attributes).
|
Efl.Text.Attribute_Factory
Summary:
Implementation of new Efl.Text.Attribute_Factory class which replace the annotation interface.
Currently, we have two public methods:
```
void efl_text_attribute_factory_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
unsigned int efl_text_attribute_factory_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end);
```
Other methods will be internal methods, for the time being, we will redesign internal methods
Reviewers: woohyun, tasn, segfaultxavi, bu5hm4n, zmike
Subscribers: zmike, q66, cedric, segfaultxavi, bu5hm4n, a.srour, #committers, #reviewers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10646
2019-11-26 20:04:31 -08:00
|
|
|
Use it to insert and remove style attributes (font, size, color, ...) using @Efl.Text.Cursor on EFL Widgets.
|
|
|
|
|
|
|
|
Attributes can be assigned to character ranges, selected using two @Efl.Text.Cursor instances.
|
|
|
|
Cursor instances are already bound to a text object so there's no need to provide it to this class.
|
2019-12-10 00:39:59 -08:00
|
|
|
Style is specified using format strings as described in @Efl.Canvas.Textblock.style_apply.
|
Efl.Text.Attribute_Factory
Summary:
Implementation of new Efl.Text.Attribute_Factory class which replace the annotation interface.
Currently, we have two public methods:
```
void efl_text_attribute_factory_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
unsigned int efl_text_attribute_factory_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end);
```
Other methods will be internal methods, for the time being, we will redesign internal methods
Reviewers: woohyun, tasn, segfaultxavi, bu5hm4n, zmike
Subscribers: zmike, q66, cedric, segfaultxavi, bu5hm4n, a.srour, #committers, #reviewers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10646
2019-11-26 20:04:31 -08:00
|
|
|
|
2020-01-31 07:11:57 -08:00
|
|
|
There is no need to instantiate this class. Use directly the @.attribute_insert and @.attribute_clear static methods.
|
|
|
|
|
|
|
|
@since 1.24
|
|
|
|
]]
|
Efl.Text.Attribute_Factory
Summary:
Implementation of new Efl.Text.Attribute_Factory class which replace the annotation interface.
Currently, we have two public methods:
```
void efl_text_attribute_factory_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
unsigned int efl_text_attribute_factory_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end);
```
Other methods will be internal methods, for the time being, we will redesign internal methods
Reviewers: woohyun, tasn, segfaultxavi, bu5hm4n, zmike
Subscribers: zmike, q66, cedric, segfaultxavi, bu5hm4n, a.srour, #committers, #reviewers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10646
2019-11-26 20:04:31 -08:00
|
|
|
methods {
|
|
|
|
attribute_insert @static {
|
|
|
|
[[Inserts an attribute format in a specified range [$start, $end - 1].
|
|
|
|
|
|
|
|
The $format will be applied to the given range.
|
2019-12-18 07:10:17 -08:00
|
|
|
The passed cursors must belong to same text object, otherwise insertion will be ignored.
|
Efl.Text.Attribute_Factory
Summary:
Implementation of new Efl.Text.Attribute_Factory class which replace the annotation interface.
Currently, we have two public methods:
```
void efl_text_attribute_factory_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
unsigned int efl_text_attribute_factory_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end);
```
Other methods will be internal methods, for the time being, we will redesign internal methods
Reviewers: woohyun, tasn, segfaultxavi, bu5hm4n, zmike
Subscribers: zmike, q66, cedric, segfaultxavi, bu5hm4n, a.srour, #committers, #reviewers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10646
2019-11-26 20:04:31 -08:00
|
|
|
]]
|
|
|
|
params {
|
|
|
|
start: const(Efl.Text.Cursor); [[Start of range.]]
|
|
|
|
end: const(Efl.Text.Cursor); [[End of range.]]
|
2019-12-27 02:36:24 -08:00
|
|
|
format: string; [[Format string. Uses same format as $style in @Efl.Canvas.Textblock.style_apply.]]
|
Efl.Text.Attribute_Factory
Summary:
Implementation of new Efl.Text.Attribute_Factory class which replace the annotation interface.
Currently, we have two public methods:
```
void efl_text_attribute_factory_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
unsigned int efl_text_attribute_factory_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end);
```
Other methods will be internal methods, for the time being, we will redesign internal methods
Reviewers: woohyun, tasn, segfaultxavi, bu5hm4n, zmike
Subscribers: zmike, q66, cedric, segfaultxavi, bu5hm4n, a.srour, #committers, #reviewers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10646
2019-11-26 20:04:31 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
attribute_clear @static {
|
2019-12-18 07:10:17 -08:00
|
|
|
[[Clear (remove) attributes in the specified range [$start, $end - 1].
|
Efl.Text.Attribute_Factory
Summary:
Implementation of new Efl.Text.Attribute_Factory class which replace the annotation interface.
Currently, we have two public methods:
```
void efl_text_attribute_factory_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
unsigned int efl_text_attribute_factory_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end);
```
Other methods will be internal methods, for the time being, we will redesign internal methods
Reviewers: woohyun, tasn, segfaultxavi, bu5hm4n, zmike
Subscribers: zmike, q66, cedric, segfaultxavi, bu5hm4n, a.srour, #committers, #reviewers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10646
2019-11-26 20:04:31 -08:00
|
|
|
]]
|
|
|
|
params {
|
|
|
|
start: const(Efl.Text.Cursor); [[Start of range.]]
|
|
|
|
end: const(Efl.Text.Cursor); [[End of range.]]
|
|
|
|
}
|
|
|
|
return: uint; [[Number of removed attributes.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|