summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_text_format.eo
blob: 7ecc8fead4d58793dbb4cda5ab7056c62c8045b3 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
enum @beta Efl.Text_Format_Wrap {
   [[Wrap mode of the text (not in effect if not multiline)]]
   none, [[No wrapping]]
   char, [[Wrap mode character]]
   word, [[Wrap mode word]]
   mixed, [[Wrap mode mixed]]
   hyphenation [[Wrap mode hyphenation]]
}

enum @beta Efl.Text_Format_Horizontal_Alignment_Auto_Type {
   [[Auto-horizontal alignment of the text]]
   none,   [[No auto-alignment rule]]
   normal, [[Respects LTR/RTL (bidirectional) settings]]
   locale, [[Respects locale's langauge settings]]
   end     [[Text is places at opposite side of LTR/RTL (bidirectional) settings]]
}

interface @beta Efl.Text_Format {
   [[The look and layout of the text

     The text format can affect the geometry of the text object, as well as
     how characters are presented.
   ]]
   c_prefix: efl_text;
   methods {
      @property ellipsis {
         [[Ellipsis value (number from -1.0 to 1.0)]]
         values
         {
            value: double; [[Ellipsis value]]
         }
      }

      @property wrap {
         [[Wrap mode for use in the text]]
         values {
            wrap: Efl.Text_Format_Wrap; [[Wrap mode]]
         }
      }

      @property multiline {
         [[Multiline is enabled or not]]
         values {
            enabled: bool; [[$true if multiline is enabled, $false otherwise]]
         }
      }

      @property horizontal_align_auto_type {
         [[Horizontal alignment of text]]
         values {
            value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Alignment type]]
         }
      }

      @property horizontal_align {
         [[Horizontal alignment of text]]
         values {
            value: double; [[Horizontal alignment value]]
         }
      }

      @property vertical_align {
         [[Vertical alignment of text]]
         values {
            value: double; [[Vertical alignment value]]
         }
      }

      @property linegap {
         [[Minimal line gap (top and bottom) for each line in the text

           $value is absolute size.
         ]]
         values
         {
            value: double; [[Line gap value]]
         }
      }

      @property linerelgap {
         [[Relative line gap (top and bottom) for each line in the text

           The original line gap value is multiplied by $value.
         ]]
         values
         {
            value: double; [[Relative line gap value]]
         }
      }

      @property tabstops {
         [[Tabstops value]]
         values
         {
            value: int; [[Tapstops value]]
         }
      }

      @property password {
         [[Whether text is a password]]
         values
         {
            enabled: bool; [[$true if the text is a password, $false otherwise]]
         }
      }

      @property replacement_char {
         [[The character used to replace characters that can't be displayed

           Currently only used to replace characters if @.password
           is enabled.
         ]]
         values {
            repch: string; [[Replacement character]]
         }
      }
   }
}