82 lines
2.7 KiB
Plaintext
82 lines
2.7 KiB
Plaintext
import eina_types;
|
|
parse efl_text_format;
|
|
|
|
mixin @beta Efl.Ui.Widget_Scrollable_Content requires Efl.Object
|
|
{
|
|
[[Mixin helper to add scrollable content to widgets.
|
|
|
|
This can be used to provide scrollable contents and text for widgets. When @.scrollable_content or
|
|
@.scrollable_text is set, this mixin will create and manage an internal scroller object which
|
|
will be the container of that text or content.
|
|
|
|
Only a single content or text can be set at any given time. Setting @.scrollable_text
|
|
will unset @.scrollable_content.
|
|
|
|
@since 1.23
|
|
]]
|
|
c_prefix: efl_ui_widget;
|
|
event_c_prefix: efl_ui_widget_scrollable_content;
|
|
data: Efl_Ui_Widget_Scrollable_Content_Data;
|
|
methods {
|
|
@property scrollable_content_did_group_calc @protected @beta {
|
|
[[Widgets can call this function during their @Efl.Canvas.Group.group_calculate
|
|
implementation after the super call to determine whether the internal scroller
|
|
has already performed sizing calculations.
|
|
|
|
If this property is $true, the @[Efl.Ui.Widget_Scrollable_Content.optimal_size,calc] event will have been
|
|
emitted during the super call. In this case it's likely that the widget should be completing
|
|
its internal sizing calculations from that event using:
|
|
|
|
efl_canvas_group_calculate(efl_super(ev->object, EFL_UI_WIDGET_SCROLLABLE_CONTENT_MIXIN));
|
|
|
|
in order to skip the scrollable sizing calculation.
|
|
|
|
@since 1.23
|
|
]]
|
|
get {}
|
|
values {
|
|
did_group_calc: bool; [[Whether the internal scroller has already done sizing calculations.]]
|
|
}
|
|
}
|
|
@property scrollable_content {
|
|
[[This is the content which will be placed in the internal scroller.
|
|
|
|
If a @.scrollable_text string is set, this property will be $NULL.
|
|
|
|
@since 1.23
|
|
]]
|
|
set {
|
|
return: bool; [[$true on success.]]
|
|
}
|
|
get {}
|
|
values {
|
|
content: Efl.Canvas.Object; [[The content object.]]
|
|
}
|
|
}
|
|
@property scrollable_text {
|
|
[[The text string to be displayed by the given text object.
|
|
The text will use @Efl.Text_Format_Wrap.mixed wrapping,
|
|
and it will be scrollable depending on its size relative to the
|
|
object's geometry.
|
|
|
|
When reading, do not free the return value.
|
|
|
|
@since 1.23
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
text: string; [[Text string to display on it.]]
|
|
}
|
|
}
|
|
}
|
|
events {
|
|
optimal_size,calc: Eina.Size2D; [[The optimal size for the widget based on scrollable content.]]
|
|
}
|
|
implements {
|
|
Efl.Object.destructor;
|
|
}
|
|
}
|