summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_layout.eo
blob: 99920ee7be04b09b265dfc72a12d682a4dfe3b34 (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
import edje_types;

class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
                  Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Ui.Model.Factory.Connect,
                  Efl.Canvas.Layout_Calc, Efl.Canvas.Layout_Signal)
{
   [[Elementary layout class]]
   legacy_prefix: elm_layout;
   eo_prefix: elm_obj_layout;
   event_prefix: elm_layout;
   data: Elm_Layout_Smart_Data;
   methods {
      @property theme {
         [[The theme of this widget, defines which edje group will be used.

           Based on the type of widget ($klass), a given $group and a
           $style (usually "default"), the edje group name will be formed
           for this object.
         ]]
         set {
            [[Sets the edje group from the elementary theme that will be used
              as layout.

              Note that $style will be the new style of this object, as in an
              @Elm.Widget.style.

              If this returns $false the widget is very likely to become
              non-functioning.
            ]]
            return: bool; [[$true on success, $false otherwise]]
         }
         values {
            klass: string; [[The class of the group, eg. "button".]]
            group: string("base"); [[The group, eg. "base".]]
            style: string("default"); [[The style to used, eg "default".]]
         }
      }
      sizing_eval {
         [[Eval sizing.

           Manually forces a sizing re-evaluation. This is useful when the
           minimum size required by the edje theme of this layout has
           changed. The change on the minimum size required by the edje
           theme is not immediately reported to the elementary layout,
           so one needs to call this function in order to tell the widget
           (layout) that it needs to reevaluate its own size.

           The minimum size of the theme is calculated based on minimum
           size of parts, the size of elements inside containers like box
           and table, etc. All of this can change due to state changes,
           and that's when this function should be called.

           Also note that a standard signal of "size,eval" "elm" emitted
           from the edje object will cause this to happen too.
         ]]
      }
      sizing_restricted_eval {
         [[Request sizing reevaluation, restricted to current width and/or
           height.

           Useful mostly when there are TEXTBLOCK parts defining the height
           of the object and nothing else restricting it to a minimum width.
           Calling this function will restrict the minimum size in the Edje
           calculation to whatever size it the layout has at the moment.

           @since 1.8
         ]]
         params {
            @in width: bool; [[Restrict minimum size to the current width.]]
            @in height: bool; [[Restrict minimum size ot the current height.]]
         }
      }
      data_get @const {
         [[Get the edje data from the given layout.

           This function fetches data specified inside the edje theme of
           this layout. This function return NULL if data is not found.

           In EDC this comes from a data block within the group block that
           $obj was loaded from.
         ]]
         return: string; [[The edje data string.]]
         params {
            @in key: string; [[The data key.]]
         }
      }
   }
   implements {
      class.constructor;
      Efl.Object.constructor;
      Efl.File.file { get; set; }
      Efl.File.mmap { get; set; }
      Efl.Canvas.Group.group_calculate;
      Efl.Canvas.Layout_Calc.calc_freeze;
      Efl.Canvas.Layout_Calc.calc_thaw;
      Efl.Canvas.Layout_Signal.signal_callback_add;
      Efl.Canvas.Layout_Signal.signal_callback_del;
      Efl.Canvas.Layout_Signal.signal_emit;
      //Efl.Canvas.Layout_Signal.message_send;
      //Efl.Canvas.Layout_Signal.signal_process;
      Elm.Widget.focus_direction;
      Elm.Widget.sub_object_add;
      Elm.Widget.theme_apply;
      Elm.Widget.focus_direction_manager_is;
      Elm.Widget.focus_next_manager_is;
      Elm.Widget.focus_next;
      Elm.Widget.disable;
      Elm.Widget.sub_object_del;
      Elm.Widget.on_focus;
      Efl.Container.content_count;
      Efl.Container.content_remove;
      Efl.Container.content_iterate;
      Efl.Container.content { get; set; }
      Efl.Container.content_unset;
      Efl.Part.part;
      Efl.Ui.View.model { get; set; }
      Efl.Ui.Model.Connect.connect;
      Efl.Ui.Model.Factory.Connect.connect;
   }
   events {
      theme,changed; [[Called when theme changed]]
   }
}