2019-12-10 16:47:50 -08:00
|
|
|
class @beta Efl.Ui.Textbox extends Efl.Ui.Layout_Base implements Efl.Input.Clickable,
|
Efl.Ui.Text : all related interfaces
Summary:
Change summary:
Removed :
- efl_ui_text_selectable.eo and add it functionality into efl_text_interactive.eo
- efl_ui_text_editable.eo because it is same as efl_ui_text.eo (just set one property by default)
Modifications:
- Move all Text Input enums and functionality from efl_ui_text class into its own interface, this interface will be implemented at efl_ui_internal_text_interactive class.
- Rename selection_allowed property to selectable (same as other "editable" property) in efl_text_interactive
- Add select_all function into efl_text_interactive interface
- Add have_selection property into efl_text_interactive interface
- Move user_change , selection_start/change/clear and undo/redo events into efl_text_interactive interface.
- Move methods and events of copy/paste/cut into efl_ui_text
- Fix password-related functionality
- Remove context menu clear and add_item methods. (these should be added later with better design)
- Remove Validation event from EFL_UI_TEXT. (these should be added later with better design)
Reviewers: woohyun, tasn, segfaultxavi, zmike, bu5hm4n
Subscribers: stefan_schmidt, a.srour, q66, zmike, segfaultxavi, cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10711
2019-12-08 17:58:39 -08:00
|
|
|
Efl.Access.Text, Efl.Access.Editable.Text, Efl.File, Efl.Input_Text
|
2019-09-19 08:32:56 -07:00
|
|
|
composites
|
Efl.Text.Cursor
Summary:
Implementation of new cursor text object.
This Patch Contains :
1- Remove Efl.Text.Cursor & Efl.Text_Markup_Interactive interfaces and replace them with one Class Efl.Text.Cursor
=> there are some modifications on cursor methods
2- Update all related classes to use Efl.Text.Cursor object instead of the old interfaces
3- If class uses Efl.Text_Cursor_Cursor (handle), mainly annotation it will stay as it is until we update other annotations into attribute_factory
4- Add main cursor property into efl.text.interactive
5- Add cursor_new method in efl.ui.text (I think we may move it into efl.text.interactive interface)
There still some parts that need discussion: especially cursor movement functionality, I prefer to move function with Enum, instead of special function for each movement.
```
enum @beta Efl.Text.Cursor_Move_Type
{
[[Text cursor movement types]]
char_next, [[Advances to the next character]]
char_prev, [[Advances to the previous character]]
cluster_next, [[Advances to the next grapheme cluster]]
cluster_prev, [[Advances to the previous grapheme cluster]]
paragraph_start, [[Advances to the first character in this paragraph]]
paragraph_end, [[Advances to the last character in this paragraph]]
word_start, [[Advance to current word start]]
word_end, [[Advance to current word end]]
line_start, [[Advance to current line first character]]
line_end, [[Advance to current line last character]]
paragraph_first, [[Advance to current paragraph first character]]
paragraph_last, [[Advance to current paragraph last character]]
paragraph_next, [[Advances to the start of the next text node]]
paragraph_prev [[Advances to the end of the previous text node]]
}
move {
[[Move the cursor]]
params {
@in type: Efl.Text.Cursor_Move_Type; [[The type of movement]]
}
return: bool; [[True if actually moved]]
}
```
or old way:
```
char_next {
[[Advances to the next character]]
// FIXME: Make the number of characters we moved by? Useful for all the other functions
return: bool; [[True if actually moved]]
}
char_prev {
[[Advances to the previous character]]
return: bool; [[True if actually moved]]
}
char_delete {
[[Deletes a single character from position pointed by given cursor.]]
}
cluster_next {
[[Advances to the next grapheme cluster]]
return: bool; [[True if actually moved]]
}
cluster_prev {
[[Advances to the previous grapheme cluster]]
return: bool; [[True if actually moved]]
}
// FIXME: paragraph_end is inconsistent with word_end. The one goes to the last character and the other after the last character.
paragraph_start {
[[Advances to the first character in this paragraph]]
return: bool; [[True if actually moved]]
}
paragraph_end {
[[Advances to the last character in this paragraph]]
return: bool; [[True if actually moved]]
}
word_start {
[[Advance to current word start]]
return: bool; [[True if actually moved]]
}
word_end {
[[Advance to current word end]]
return: bool; [[True if actually moved]]
}
line_start {
[[Advance to current line first character]]
return: bool; [[True if actually moved]]
}
line_end {
[[Advance to current line last character]]
return: bool; [[True if actually moved]]
}
paragraph_first {
[[Advance to current paragraph first character]]
return: bool; [[True if actually moved]]
}
paragraph_last {
[[Advance to current paragraph last character]]
return: bool; [[True if actually moved]]
}
paragraph_next {
[[Advances to the start of the next text node]]
return: bool; [[True if actually moved]]
}
paragraph_prev {
[[Advances to the end of the previous text node]]
return: bool; [[True if actually moved]]
}
```
Reviewers: woohyun, tasn, segfaultxavi
Reviewed By: woohyun
Subscribers: a.srour, bu5hm4n, segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10542
2019-11-22 00:35:54 -08:00
|
|
|
Efl.Text_Interactive, Efl.Text_Markup
|
2016-06-08 08:37:35 -07:00
|
|
|
{
|
2019-02-07 09:01:56 -08:00
|
|
|
[[A flexible text widget which can be static (as a label) or editable by
|
|
|
|
the user (as a text entry). It provides all sorts of editing facilities
|
|
|
|
like automatic scrollbars, virtual keyboard, clipboard, configurable
|
Efl.Ui.Text : all related interfaces
Summary:
Change summary:
Removed :
- efl_ui_text_selectable.eo and add it functionality into efl_text_interactive.eo
- efl_ui_text_editable.eo because it is same as efl_ui_text.eo (just set one property by default)
Modifications:
- Move all Text Input enums and functionality from efl_ui_text class into its own interface, this interface will be implemented at efl_ui_internal_text_interactive class.
- Rename selection_allowed property to selectable (same as other "editable" property) in efl_text_interactive
- Add select_all function into efl_text_interactive interface
- Add have_selection property into efl_text_interactive interface
- Move user_change , selection_start/change/clear and undo/redo events into efl_text_interactive interface.
- Move methods and events of copy/paste/cut into efl_ui_text
- Fix password-related functionality
- Remove context menu clear and add_item methods. (these should be added later with better design)
- Remove Validation event from EFL_UI_TEXT. (these should be added later with better design)
Reviewers: woohyun, tasn, segfaultxavi, zmike, bu5hm4n
Subscribers: stefan_schmidt, a.srour, q66, zmike, segfaultxavi, cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10711
2019-12-08 17:58:39 -08:00
|
|
|
context menus or autocapitalization, for example.]]
|
2016-06-08 08:37:35 -07:00
|
|
|
methods {
|
|
|
|
@property scrollable {
|
2019-02-07 09:01:56 -08:00
|
|
|
[[Enable or disable scrolling in the widget.
|
2016-06-08 08:37:35 -07:00
|
|
|
|
2019-02-07 09:01:56 -08:00
|
|
|
When scrolling is enabled scrollbars will appear if the text does
|
|
|
|
not fit the widget size.]]
|
|
|
|
set {}
|
|
|
|
get {}
|
2016-06-08 08:37:35 -07:00
|
|
|
values {
|
2019-02-07 09:01:56 -08:00
|
|
|
scroll: bool; [[$true to enable scrolling. Default is $false.]]
|
2016-06-08 08:37:35 -07:00
|
|
|
}
|
|
|
|
}
|
2019-12-20 05:04:18 -08:00
|
|
|
@property context_menu_enabled {
|
|
|
|
[[This enables or disables the entry's contextual (longpress) menu.]]
|
2016-06-08 08:37:35 -07:00
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-12-20 05:04:18 -08:00
|
|
|
enabled: bool; [[If $true, the menu is enabled.]]
|
2016-06-08 08:37:35 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property cnp_mode {
|
2018-12-21 13:46:06 -08:00
|
|
|
/* FIXME: Efl.Ui.Selection_Format does not allow markup without images! */
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Control pasting of text and images for the widget.
|
2016-06-08 08:37:35 -07:00
|
|
|
|
2019-09-13 03:25:49 -07:00
|
|
|
Normally the entry allows both text and images to be pasted.
|
2016-06-08 08:37:35 -07:00
|
|
|
|
2019-09-13 03:25:49 -07:00
|
|
|
Note: This only changes the behaviour of text.
|
|
|
|
]]
|
|
|
|
set {
|
2016-06-08 08:37:35 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2018-12-21 13:46:06 -08:00
|
|
|
format: Efl.Ui.Selection_Format; [[Format for copy & paste.]]
|
2016-06-08 08:37:35 -07:00
|
|
|
}
|
|
|
|
}
|
2019-12-20 05:04:18 -08:00
|
|
|
@property selection_handler_enabled {
|
|
|
|
[[This enables or disables the entry's selection handlers.]]
|
2016-06-08 08:37:35 -07:00
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-12-20 05:04:18 -08:00
|
|
|
enabled: bool; [[If $true, the selection handlers are enabled.]]
|
2016-06-08 08:37:35 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-09 07:53:20 -08:00
|
|
|
@property item_factory {
|
|
|
|
[[The factory that provides item in the text e.g.
|
|
|
|
"emoticon/happy" or "href=file://image.jpg" etc.
|
|
|
|
]]
|
|
|
|
values {
|
2019-12-10 00:39:59 -08:00
|
|
|
item_factory: Efl.Canvas.Textblock_Factory; [[Factory to create items]]
|
2016-06-08 08:37:35 -07:00
|
|
|
}
|
|
|
|
}
|
Efl.Text.Cursor
Summary:
Implementation of new cursor text object.
This Patch Contains :
1- Remove Efl.Text.Cursor & Efl.Text_Markup_Interactive interfaces and replace them with one Class Efl.Text.Cursor
=> there are some modifications on cursor methods
2- Update all related classes to use Efl.Text.Cursor object instead of the old interfaces
3- If class uses Efl.Text_Cursor_Cursor (handle), mainly annotation it will stay as it is until we update other annotations into attribute_factory
4- Add main cursor property into efl.text.interactive
5- Add cursor_new method in efl.ui.text (I think we may move it into efl.text.interactive interface)
There still some parts that need discussion: especially cursor movement functionality, I prefer to move function with Enum, instead of special function for each movement.
```
enum @beta Efl.Text.Cursor_Move_Type
{
[[Text cursor movement types]]
char_next, [[Advances to the next character]]
char_prev, [[Advances to the previous character]]
cluster_next, [[Advances to the next grapheme cluster]]
cluster_prev, [[Advances to the previous grapheme cluster]]
paragraph_start, [[Advances to the first character in this paragraph]]
paragraph_end, [[Advances to the last character in this paragraph]]
word_start, [[Advance to current word start]]
word_end, [[Advance to current word end]]
line_start, [[Advance to current line first character]]
line_end, [[Advance to current line last character]]
paragraph_first, [[Advance to current paragraph first character]]
paragraph_last, [[Advance to current paragraph last character]]
paragraph_next, [[Advances to the start of the next text node]]
paragraph_prev [[Advances to the end of the previous text node]]
}
move {
[[Move the cursor]]
params {
@in type: Efl.Text.Cursor_Move_Type; [[The type of movement]]
}
return: bool; [[True if actually moved]]
}
```
or old way:
```
char_next {
[[Advances to the next character]]
// FIXME: Make the number of characters we moved by? Useful for all the other functions
return: bool; [[True if actually moved]]
}
char_prev {
[[Advances to the previous character]]
return: bool; [[True if actually moved]]
}
char_delete {
[[Deletes a single character from position pointed by given cursor.]]
}
cluster_next {
[[Advances to the next grapheme cluster]]
return: bool; [[True if actually moved]]
}
cluster_prev {
[[Advances to the previous grapheme cluster]]
return: bool; [[True if actually moved]]
}
// FIXME: paragraph_end is inconsistent with word_end. The one goes to the last character and the other after the last character.
paragraph_start {
[[Advances to the first character in this paragraph]]
return: bool; [[True if actually moved]]
}
paragraph_end {
[[Advances to the last character in this paragraph]]
return: bool; [[True if actually moved]]
}
word_start {
[[Advance to current word start]]
return: bool; [[True if actually moved]]
}
word_end {
[[Advance to current word end]]
return: bool; [[True if actually moved]]
}
line_start {
[[Advance to current line first character]]
return: bool; [[True if actually moved]]
}
line_end {
[[Advance to current line last character]]
return: bool; [[True if actually moved]]
}
paragraph_first {
[[Advance to current paragraph first character]]
return: bool; [[True if actually moved]]
}
paragraph_last {
[[Advance to current paragraph last character]]
return: bool; [[True if actually moved]]
}
paragraph_next {
[[Advances to the start of the next text node]]
return: bool; [[True if actually moved]]
}
paragraph_prev {
[[Advances to the end of the previous text node]]
return: bool; [[True if actually moved]]
}
```
Reviewers: woohyun, tasn, segfaultxavi
Reviewed By: woohyun
Subscribers: a.srour, bu5hm4n, segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10542
2019-11-22 00:35:54 -08:00
|
|
|
cursor_add {
|
|
|
|
[[Add cursor that will manipulate and iterate content of the text object.
|
|
|
|
It is typically more convenient to obtain a cursor directly from the text object using @.cursor_create.]]
|
|
|
|
params {
|
|
|
|
cursor: Efl.Text.Cursor; [[Text cursor.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_create {
|
|
|
|
[[Creates and returns a new cursor for the text.]]
|
|
|
|
return: Efl.Text.Cursor @move; [[Text cursor.]]
|
|
|
|
}
|
2016-06-08 08:37:35 -07:00
|
|
|
selection_copy {
|
|
|
|
[[This executes a "copy" action on the selected text in the entry.]]
|
|
|
|
}
|
|
|
|
selection_paste {
|
|
|
|
[[This executes a "paste" action in the entry.]]
|
|
|
|
}
|
|
|
|
selection_cut {
|
|
|
|
[[This executes a "cut" action on the selected text in the entry.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.constructor;
|
2018-09-13 02:45:29 -07:00
|
|
|
Efl.Object.finalize;
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.destructor;
|
2018-04-05 01:47:26 -07:00
|
|
|
Efl.Gfx.Entity.visible { set; }
|
|
|
|
Efl.Gfx.Entity.position { set; }
|
|
|
|
Efl.Gfx.Entity.size { set; }
|
2016-06-17 01:26:08 -07:00
|
|
|
Efl.Canvas.Group.group_member_add;
|
2019-07-30 10:11:48 -07:00
|
|
|
Efl.Canvas.Group.group_calculate;
|
2017-12-04 21:39:20 -08:00
|
|
|
Efl.Layout.Signal.signal_callback_add;
|
|
|
|
Efl.Layout.Signal.signal_callback_del;
|
|
|
|
Efl.Layout.Signal.signal_emit;
|
2018-01-07 20:55:35 -08:00
|
|
|
Efl.Ui.Widget.on_access_activate;
|
|
|
|
Efl.Ui.Widget.theme_apply;
|
2018-01-19 00:25:47 -08:00
|
|
|
Efl.Ui.Focus.Object.on_focus_update;
|
2018-01-07 20:55:35 -08:00
|
|
|
Efl.Ui.Widget.interest_region { get; }
|
2019-02-27 11:00:14 -08:00
|
|
|
Efl.Ui.Widget.disabled {set;}
|
Efl.Ui.Text : all related interfaces
Summary:
Change summary:
Removed :
- efl_ui_text_selectable.eo and add it functionality into efl_text_interactive.eo
- efl_ui_text_editable.eo because it is same as efl_ui_text.eo (just set one property by default)
Modifications:
- Move all Text Input enums and functionality from efl_ui_text class into its own interface, this interface will be implemented at efl_ui_internal_text_interactive class.
- Rename selection_allowed property to selectable (same as other "editable" property) in efl_text_interactive
- Add select_all function into efl_text_interactive interface
- Add have_selection property into efl_text_interactive interface
- Move user_change , selection_start/change/clear and undo/redo events into efl_text_interactive interface.
- Move methods and events of copy/paste/cut into efl_ui_text
- Fix password-related functionality
- Remove context menu clear and add_item methods. (these should be added later with better design)
- Remove Validation event from EFL_UI_TEXT. (these should be added later with better design)
Reviewers: woohyun, tasn, segfaultxavi, zmike, bu5hm4n
Subscribers: stefan_schmidt, a.srour, q66, zmike, segfaultxavi, cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10711
2019-12-08 17:58:39 -08:00
|
|
|
Efl.Text_Format.password {set;}
|
2018-09-13 02:45:29 -07:00
|
|
|
//Efl.Ui.Widget.widget_sub_object_del;
|
|
|
|
//Elm.Interface_Scrollable.policy { set; }
|
|
|
|
//Elm.Interface_Scrollable.bounce_allow { set; }
|
2018-04-03 04:27:30 -07:00
|
|
|
Efl.Access.Object.state_set { get; }
|
|
|
|
Efl.Access.Object.i18n_name { get; }
|
2018-02-14 18:14:52 -08:00
|
|
|
Efl.Access.Text.access_text { get; }
|
2017-09-25 01:15:44 -07:00
|
|
|
Efl.Access.Text.string { get; }
|
|
|
|
Efl.Access.Text.attribute { get; }
|
2018-02-14 18:14:52 -08:00
|
|
|
Efl.Access.Text.text_attributes { get; }
|
2017-09-25 01:15:44 -07:00
|
|
|
Efl.Access.Text.default_attributes { get; }
|
|
|
|
Efl.Access.Text.caret_offset { get; set; }
|
|
|
|
Efl.Access.Text.character { get; }
|
|
|
|
Efl.Access.Text.character_extents { get; }
|
|
|
|
Efl.Access.Text.character_count { get; }
|
|
|
|
Efl.Access.Text.offset_at_point { get; }
|
|
|
|
Efl.Access.Text.bounded_ranges { get; }
|
|
|
|
Efl.Access.Text.range_extents { get; }
|
2018-02-14 18:14:52 -08:00
|
|
|
Efl.Access.Text.access_selection { get; set; }
|
2017-09-25 01:15:44 -07:00
|
|
|
Efl.Access.Text.selections_count { get; }
|
|
|
|
Efl.Access.Text.selection_add;
|
|
|
|
Efl.Access.Text.selection_remove;
|
2018-02-14 18:14:52 -08:00
|
|
|
Efl.Access.Editable.Text.text_content { set; }
|
2017-09-25 01:15:44 -07:00
|
|
|
Efl.Access.Editable.Text.insert;
|
|
|
|
Efl.Access.Editable.Text.copy;
|
|
|
|
Efl.Access.Editable.Text.cut;
|
|
|
|
Efl.Access.Editable.Text.delete;
|
|
|
|
Efl.Access.Editable.Text.paste;
|
2019-02-27 10:17:09 -08:00
|
|
|
Efl.File.file { set; }
|
|
|
|
Efl.File.load;
|
2019-08-29 06:26:15 -07:00
|
|
|
Efl.File.unload;
|
2018-04-06 04:30:40 -07:00
|
|
|
Efl.Text_Interactive.editable { set; }
|
2018-11-12 08:57:24 -08:00
|
|
|
Efl.Part.part_get;
|
2016-06-08 08:37:35 -07:00
|
|
|
}
|
|
|
|
events {
|
Efl.Ui.Text : all related interfaces
Summary:
Change summary:
Removed :
- efl_ui_text_selectable.eo and add it functionality into efl_text_interactive.eo
- efl_ui_text_editable.eo because it is same as efl_ui_text.eo (just set one property by default)
Modifications:
- Move all Text Input enums and functionality from efl_ui_text class into its own interface, this interface will be implemented at efl_ui_internal_text_interactive class.
- Rename selection_allowed property to selectable (same as other "editable" property) in efl_text_interactive
- Add select_all function into efl_text_interactive interface
- Add have_selection property into efl_text_interactive interface
- Move user_change , selection_start/change/clear and undo/redo events into efl_text_interactive interface.
- Move methods and events of copy/paste/cut into efl_ui_text
- Fix password-related functionality
- Remove context menu clear and add_item methods. (these should be added later with better design)
- Remove Validation event from EFL_UI_TEXT. (these should be added later with better design)
Reviewers: woohyun, tasn, segfaultxavi, zmike, bu5hm4n
Subscribers: stefan_schmidt, a.srour, q66, zmike, segfaultxavi, cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10711
2019-12-08 17:58:39 -08:00
|
|
|
selection,paste: void; [[Called when selection is pasted.]]
|
|
|
|
selection,copy: void; [[Called when selection is copied.]]
|
|
|
|
selection,cut: void; [[Called when selection is cut.]]
|
efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).
In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).
Test Plan: make with c# bindings works, make check and make examples work too.
Reviewers: cedric, q66, lauromoura
Subscribers: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6169
2018-05-11 08:20:40 -07:00
|
|
|
changed: void; [[Called when entry changes]]
|
|
|
|
context,open: void; [[Called when context menu was opened]]
|
2016-06-08 08:37:35 -07:00
|
|
|
}
|
|
|
|
}
|