summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_text_interactive.eo
blob: 9e917ca7ec15e694887b24185bbe9176393e5ae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import efl_text_types;

interface Efl.Text_Interactive extends Efl.Text, Efl.Text_Font_Properties,
   Efl.Text_Format, Efl.Text_Style
{
   [[Interface for interactive (editable) text inputs (text entries).

     It handles cursors, edition and selection.
     @since 1.24
   ]]
   methods {
      @property main_cursor {
         [[The cursor used to insert new text, the one that's visible to the user.]]
         get {}
         values {
            cursor: Efl.Text.Cursor; [[The cursor visible to the user.]]
         }
      }
      @property selection_allowed {
         [[Whether or not text selection is allowed on this object.]]
         set {}
         get {}
         values {
            allowed: bool; [[$true if enabled.]]
         }
      }
      @property selection_cursors {
         [[The cursors used for selection handling.
           If the cursors are equal there's no selection.
         ]]
         get {
            [[You are allowed to retain and modify them. Modifying them modifies
              the selection of the object (recommended to extend selection range).]]
         }
         set {
           [[The positions of passed cursors will be used to set selection cursors positions.
             Further modification for passed @Efl.Text.Cursor objects, will not affect selection.
             Setter is recommended to set new range for selection.]]
         }
         values {
            start: Efl.Text.Cursor; [[The start of the selection.]]
            end: Efl.Text.Cursor; [[The end of the selection.]]
         }
      }
      @property editable {
         [[Whether the entry is editable.

           By default interactive text objects are editable. Setting this
           property to $false will disregard all keyboard input.
         ]]
         set {
         }
         get {
         }
         values {
            editable: bool; [[If $true, user input can modify the text.
                              Otherwise, the entry is read-only and no user input is allowed.]]
         }
      }
      all_unselect {
         [[Clears the selection.]]
      }
      all_select {
         [[Select all the content.]]
      }
      @property have_selection {
         [[Whether the entry has a selected text.
         ]]
         get {
         }
         values {
            selected: bool; [[If $true, entry has selected text.]]
         }
      }
   }
   events {
      preedit,changed: void; [[Emitted when key presses do not result in a new character being added.
                               Multiple key presses are needed to produce a character in some languages like
                               Korean, for example. Each of these key presses will emit a @[.preedit,changed]
                               event but only the last one will emit a @[.changed,user] event.
                             ]]
      have_selection,changed: bool; [[Emitted when the @.have_selection property value changes.]]
      selection,changed: Eina.Range; [[Emitted when selection has changed. Query using @.selection_cursors.]]
      redo,request: void; [[Emitted when a redo operation is requested.]]
      undo,request: void; [[Emitted when a undo operation is requested.]]
      changed,user: Efl.Text_Change_Info; [[Emitted when the text content has changed due to user interaction.]]
   }
}