docs: Polish Efl.Text_Interactive docs

Ref T8521
Ref D10711
This commit is contained in:
Xavi Artigas 2019-12-18 15:17:28 +01:00
parent f1ae8e0d98
commit 8e622e72df
1 changed files with 27 additions and 27 deletions

View File

@ -3,51 +3,53 @@ import efl_text_types;
interface @beta Efl.Text_Interactive extends Efl.Text, Efl.Text_Font, interface @beta Efl.Text_Interactive extends Efl.Text, Efl.Text_Font,
Efl.Text_Format, Efl.Text_Style Efl.Text_Format, Efl.Text_Style
{ {
[[This is an interface interactive text inputs should implement]] [[Interface for interactive (editable) text inputs (text entries).
It handles cursors, edition and selection.
]]
methods { methods {
@property main_cursor { @property main_cursor {
[[The user visible cursor.]] [[The cursor used to insert new text, the one that's visible to the user.]]
get {} get {}
values { values {
cursor: Efl.Text.Cursor; [[The user visible cursor.]] cursor: Efl.Text.Cursor; [[The cursor visible to the user.]]
} }
} }
@property selection_allowed { @property selection_allowed {
[[Whether or not selection is allowed on this object.]] [[Whether or not text selection is allowed on this object.]]
set {} set {}
get {} get {}
values { values {
allowed: bool; [[$true if enabled, $false otherwise.]] allowed: bool; [[$true if enabled.]]
} }
} }
@property selection_cursors { @property selection_cursors {
[[The cursors used for selection handling. [[The cursors used for selection handling.
If the cursors are equal there's If the cursors are equal there's no selection.
no selection.
You are allowed to retain and modify them. Modifying them modifies You are allowed to retain and modify them. Modifying them modifies
the selection of the object. the selection of the object.
]] ]]
get {} get {}
values { values {
start: Efl.Text.Cursor; [[The start of the selection]] start: Efl.Text.Cursor; [[The start of the selection.]]
end: Efl.Text.Cursor; [[The end of the selection]] end: Efl.Text.Cursor; [[The end of the selection.]]
} }
} }
@property editable { @property editable {
[[Whether the entry is editable. [[Whether the entry is editable.
By default text interactives are editable. However setting this By default interactive text objects are editable. Setting this
property to $false will make it so that key input will be disregarded. property to $false will disregard all keyboard input.
]] ]]
set { set {
} }
get { get {
} }
values { values {
editable: bool; [[If $true, user input will be inserted in the entry, editable: bool; [[If $true, user input can modify the text.
if not, the entry is read-only and no user input is allowed.]] Otherwise, the entry is read-only and no user input is allowed.]]
} }
} }
all_unselect { all_unselect {
@ -57,27 +59,25 @@ interface @beta Efl.Text_Interactive extends Efl.Text, Efl.Text_Font,
[[Select all the content.]] [[Select all the content.]]
} }
@property have_selection { @property have_selection {
[[Whether the entry have a selected text. [[Whether the entry has a selected text.
]] ]]
get { get {
} }
values { values {
selected: bool; [[If $true, entry have selected text, $false otherwise.]] selected: bool; [[If $true, entry has selected text.]]
} }
} }
} }
events { events {
preedit,changed: void; [[Called when entry preedit changed.]] preedit,changed: void; [[Emitted when key presses do not result in a new character being added.
have_selection,changed: bool; [[Called when @.have_selection property value changed.]] Multiple key presses are needed to produce a character in some languages like
selection,changed: Efl.Text_Range; [[Called when selection has changed. Query using @.selection_cursors.]] Korean, for example. Each of these key presses will emit a @[.preedit,changed]
redo,request: void; [[Called when redo is requested]] event but only the last one will emit a @[.changed,user] event.
undo,request: void; [[Called when undo is requested]] ]]
changed,user: Efl.Text_Change_Info; [[The content has changed due to user interaction.]] have_selection,changed: bool; [[Emitted when the @.have_selection property value changes.]]
// FIXME: efl_ui_text doesn't support anchor callbacks yet. selection,changed: Efl.Text_Range; [[Emitted when selection has changed. Query using @.selection_cursors.]]
//anchor,down: Elm.Entry_Anchor_Info; [[Called on anchor down]] redo,request: void; [[Emitted when a redo operation is requested.]]
//anchor,hover,opened: Elm.Entry_Anchor_Hover_Info; [[Called when hover opened]] undo,request: void; [[Emitted when a undo operation is requested.]]
//anchor,in: Elm.Entry_Anchor_Info; [[Called on anchor in]] changed,user: Efl.Text_Change_Info; [[Emitted when the text content has changed due to user interaction.]]
//anchor,out: Elm.Entry_Anchor_Info; [[Called on anchor out]]
//anchor,up: Elm.Entry_Anchor_Info; [[called on anchor up]]
} }
} }