2017-05-29 04:28:08 -07:00
|
|
|
import edje_types;
|
|
|
|
|
2017-11-19 22:41:07 -08:00
|
|
|
class Efl.Canvas.Layout.Part_External (Efl.Canvas.Layout.Part, Efl.Content,
|
2017-09-12 21:58:38 -07:00
|
|
|
Efl.Canvas.Object)
|
2017-05-29 04:28:08 -07:00
|
|
|
{
|
|
|
|
[[Class representing an external part in Edje layouts.
|
|
|
|
|
2017-05-29 06:47:55 -07:00
|
|
|
An object of this type is an Efl.Part object, which means its lifecycle
|
2017-05-30 19:20:40 -07:00
|
|
|
is limited to one and only one function call.
|
2017-05-29 06:47:55 -07:00
|
|
|
|
2017-05-30 19:20:40 -07:00
|
|
|
An external part contains one object, which can be retrieved with
|
2017-11-19 22:41:07 -08:00
|
|
|
@Efl.Content.content.get(). Do not delete this object. Just like for
|
2017-05-30 19:20:40 -07:00
|
|
|
other parts, Edje is in charge of the visibility, geometry, clip, etc...
|
|
|
|
|
|
|
|
Common usage is then, in pseudo-C:
|
|
|
|
Eo *widget = efl_content_get(efl_part(layout, "extpartname"));
|
|
|
|
efl_text_set(widget, "hello");
|
|
|
|
|
|
|
|
Note that as a shortcut the widget's functions can be called directly on
|
2017-11-19 22:41:07 -08:00
|
|
|
this part object. In C++:
|
|
|
|
efl::eo::downcast<efl::Text>(layout.part("title")).text_set("hello");
|
2017-05-29 06:47:55 -07:00
|
|
|
Or in pseudo-C:
|
|
|
|
efl_text_set(efl_part(layout, "title"), "hello");
|
2017-05-30 19:20:40 -07:00
|
|
|
Or in pseudo-script:
|
|
|
|
layout["title"].text = "hello";
|
2017-05-29 07:08:54 -07:00
|
|
|
|
2017-05-29 04:28:08 -07:00
|
|
|
@since 1.20
|
|
|
|
]]
|
|
|
|
data: null;
|
2017-05-29 07:08:54 -07:00
|
|
|
implements {
|
2017-11-19 22:41:07 -08:00
|
|
|
Efl.Content.content { get; }
|
2017-05-29 07:08:54 -07:00
|
|
|
}
|
2017-05-29 04:28:08 -07:00
|
|
|
}
|