summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_text_interactive.eo
blob: d5c261f5a273f8fbd8226c7b6d169bf946443060 (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
import efl_text_types;

interface @beta Efl.Text_Interactive extends Efl.Text, Efl.Text_Font,
   Efl.Text_Format, Efl.Text_Style
{
   [[This is an interface interactive text inputs should implement]]
   methods {
      @property main_cursor {
         [[The user visible cursor.]]
         get {}
         values {
            cursor: Efl.Text.Cursor; [[The user visible cursor.]]
         }
      }
      @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's
           no selection.

           You are allowed to retain and modify them. Modifying them modifies
           the selection of the object.
         ]]
         get {}
         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 text interactives are editable. However setting this
           property to $false will make it so that 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.]]
         }
      }
      select_none {
         [[Clears the selection.]]
      }
   }
   events {
      text,selection,changed: void; [[The selection on the object has changed. Query using @.selection_cursors]]
   }
}