efl/src/lib/elementary/efl_ui_text_interactive.eo

64 lines
2.2 KiB
Plaintext

import efl_text_types;
struct Efl.Ui.Text.Interactive.Change_Info {
[[This structure includes all the information about content changes.
It's meant to be used to implement undo/redo.
]]
content: string; [[The content added/removed]]
position: size; [[The position where it was added/removed]]
length: size; [[The length of content in characters (not bytes, actual unicode characters)]]
insert: bool; [[$true if the content was inserted, $false if removei]]
merge: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]]
}
interface Efl.Ui.Text.Interactive (Efl.Text, Efl.Text.Font,
Efl.Text.Format, Efl.Text.Style)
{
[[This is an interface interactive text inputs should implement]]
methods {
@property selection_allowed {
[[Whether or not selection is allowed on this object]]
set {}
get {}
values {
allowed: bool; [[$true if enabled, $false otherwise]]
}
}
@property selection_cursors {
[[The cursors used for selection handling.
If the cursors are equal, there is
no selection.
You are allowed to retain and modify them. Modifying them modifies
the selection of the object.
]]
get {}
values {
start: ptr(Efl.Text.Cursor.Cursor); [[The start of the selection]]
end: ptr(Efl.Text.Cursor.Cursor); [[The end of the selection]]
}
}
@property editable {
[[Whether the entry is editable.
By default text interactives are editable. However, setting this
property to $false will make it so key input will be disregarded.
]]
set {
}
get {
}
values {
editable: bool; [[If $true, user input will be inserted in the entry,
if not, the entry is read-only and no user input is allowed.]]
}
}
}
events {
changed,user: Efl.Ui.Text.Interactive.Change_Info; [[The text object has changed due to user interaction]]
selection,changed; [[The selection on the object has changed. Query using @.selection_cursors]]
}
}