summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_table.eo
blob: 5f300f9bca3c087ff563564135fa43bb9027a5cc (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
class Elm.Table (Elm.Widget)
{
   legacy_prefix: elm_table;
   eo_prefix: elm_obj_table;
   data: null;
   methods {
      @property homogeneous {
         [[Control the homogenous state in a table.]]
         set {}
         get {}
         values {
            homogeneous: bool; [[A boolean to set if the layout is
                                 homogeneous in the table.]]
         }
      }
      @property padding {
         set {
            [[Set padding between cells. Default value is 0.]]
         }
         get {
            [[Get padding between cells.]]
         }
         values {
            horizontal: Evas.Coord; [[The horizontal padding.]]
            vertical: Evas.Coord; [[The vertical padding.]]
         }
      }
      @property align {
         set {
            [[Set alignment of table. Default value is 0.5.

              @since 1.13
            ]]
         }
         get {
            [[Get alignment of table.

              @since 1.13
            ]]
         }
         values {
            horizontal: double; [[The horizontal alignment.]]
            vertical: double; [[The vertical alignment.]]
         }
      }
      clear {
         [[Faster way to remove all child objects from a table object.]]
         params {
            @in clear: bool; [[If true, will delete children, else just remove from table.]]
         }
      }
      child_get @const {
         [[Get child object of table at given coordinates.]]
         return: Efl.Canvas.Object; [[Child of object if find if not return $null.]]
         params {
            @in col: int; [[Column number of child object.]]
            @in row: int; [[Row number of child object.]]
         }
      }
      pack_set {
         [[Set the packing location of an existing child of the table

           Modifies the position of an object already in the table.

           Note: All positioning inside the table is relative to rows and
           columns, so a value of 0 for col and row, means the top left
           cell of the table, and a value of 1 for colspan and rowspan
           means only takes that 1 cell.
         ]]
         params {
            @in subobj: Efl.Canvas.Object; [[The subobject to be modified in the table.]]
            @in column: int; [[Column number.]]
            @in row: int; [[Row number.]]
            @in colspan: int; [[Columns span.]]
            @in rowspan: int; [[Rows span.]]
         }
         legacy: null;
      }
      pack_get {
         [[Get the packing location of an existing child of the table.]]
         params {
            @in subobj: Efl.Canvas.Object; [[The subobject to be modified in the table.]]
            @out column: int; [[Column number.]]
            @out row: int; [[Row number.]]
            @out colspan: int; [[Columns span.]]
            @out rowspan: int; [[Rows span.]]
         }
         legacy: null;
      }
      unpack {
         [[Remove child from table.]]
         params {
            @in subobj: Efl.Canvas.Object; [[The subobject.]]
         }
      }
      pack {
         [[Add a subobject on the table with the coordinates passed.

           Note: All positioning inside the table is relative to rows and
           columns, so a value of 0 for x and y, means the top left cell of
           the table, and a value of 1 for w and h means $subobj only takes
           that 1 cell.

           Note: Columns and rows only guarantee 16bit unsigned values
           at best. That means that col + colspan AND row + rowspan must fit
           inside 16bit unsigned values cleanly. You will be warned once
           values exceed 15bit storage, and attempting to use values not
           able to fit in 16bits will result in failure.
         ]]
         params {
            @in subobj: Efl.Canvas.Object; [[The subobject to be added to the table.]]
            @in column: int; [[Column number.]]
            @in row: int; [[Row number.]]
            @in colspan: int; [[Columns span.]]
            @in rowspan: int; [[Rows span.]]
         }
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Efl.Canvas.Group.group_add;
      Efl.Canvas.Group.group_del;
      Efl.Canvas.Group.group_calculate;
      Elm.Widget.focus_direction;
      Elm.Widget.focus_next_manager_is;
      Elm.Widget.focus_next;
      Elm.Widget.focus_direction_manager_is;
      Elm.Widget.theme_apply;
      Elm.Widget.sub_object_del;
   }

}