~~Title: Efl.Ui.Scrollable~~ ====== Efl.Ui.Scrollable (interface) ====== ===== Description ===== %%Interface for widgets capable of displaying content through a viewport, which might be smaller than the actual content. This interface does not control how the content is added. This is typically done through %%[[:develop:api:efl:content|Efl.Content]]%%.%% %%When the content does not fit inside the viewport, typically %%[[:develop:api:efl:ui:scrollbar|Efl.Ui.Scrollbar]]%% widgets will be used, but this is beyond the scope of this interface.%% //Since 1.23// {{page>:develop:api-include:efl:ui:scrollable:description&nouser&nolink&nodate}} ===== Members ===== **[[:develop:api:efl:ui:scrollable:property:bounce_enabled|bounce_enabled]]** //**(get, set)**//\\ > %%When scrolling, the scroller may "bounce" when reaching the edge of the content object. This is a visual way to indicate the end has been reached. This is enabled by default for both axes. This property determines if bouncing is enabled in each axis. When bouncing is disabled, scrolling just stops upon reaching the end of the content.%% void efl_ui_scrollable_bounce_enabled_get(const Eo *obj, Eina_Bool *horiz, Eina_Bool *vert); void efl_ui_scrollable_bounce_enabled_set(Eo *obj, Eina_Bool horiz, Eina_Bool vert); \\ **[[:develop:api:efl:ui:scrollable:property:content_pos|content_pos]]** //**(get, set)**//\\ > %%Position of the content inside the scroller.%% Eina_Position2D efl_ui_scrollable_content_pos_get(const Eo *obj); void efl_ui_scrollable_content_pos_set(Eo *obj, Eina_Position2D pos); \\ **[[:develop:api:efl:ui:scrollable:property:content_size|content_size]]** //**(get)**//\\ > Eina_Size2D efl_ui_scrollable_content_size_get(const Eo *obj); \\ **[[:develop:api:efl:ui:scrollable:property:gravity|gravity]]** //**(get, set)**//\\ > %%Control scrolling gravity on the scrollable.%% void efl_ui_scrollable_gravity_get(const Eo *obj, double *x, double *y); void efl_ui_scrollable_gravity_set(Eo *obj, double x, double y); \\ **[[:develop:api:efl:ui:scrollable:property:looping|looping]]** //**(get, set)**//\\ > %%Controls infinite looping for a scroller.%% void efl_ui_scrollable_looping_get(const Eo *obj, Eina_Bool *loop_h, Eina_Bool *loop_v); void efl_ui_scrollable_looping_set(Eo *obj, Eina_Bool loop_h, Eina_Bool loop_v); \\ **[[:develop:api:efl:ui:scrollable:property:match_content|match_content]]** //**(set)**//\\ > void efl_ui_scrollable_match_content_set(Eo *obj, Eina_Bool w, Eina_Bool h); \\ **[[:develop:api:efl:ui:scrollable:property:movement_block|movement_block]]** //**(get, set)**//\\ > %%Blocking of scrolling (per axis).%% Efl_Ui_Layout_Orientation efl_ui_scrollable_movement_block_get(const Eo *obj); void efl_ui_scrollable_movement_block_set(Eo *obj, Efl_Ui_Layout_Orientation block); \\ **[[:develop:api:efl:ui:scrollable:method:scroll|scroll]]**\\ > %%Show a specific virtual region within the scroller content object.%% void efl_ui_scrollable_scroll(Eo *obj, Eina_Rect rect, Eina_Bool animation); \\ **[[:develop:api:efl:ui:scrollable:property:scroll_freeze|scroll_freeze]]** //**(get, set)**//\\ > %%Freezes scrolling movement (by input of a user). Unlike %%[[:develop:api:efl:ui:scrollable:property:movement_block|Efl.Ui.Scrollable.movement_block]]%%, this property freezes bidirectionally. If you want to freeze in only one direction, see %%[[:develop:api:efl:ui:scrollable:property:movement_block|Efl.Ui.Scrollable.movement_block]]%%.%% Eina_Bool efl_ui_scrollable_scroll_freeze_get(const Eo *obj); void efl_ui_scrollable_scroll_freeze_set(Eo *obj, Eina_Bool freeze); \\ **[[:develop:api:efl:ui:scrollable:property:scroll_hold|scroll_hold]]** //**(get, set)**//\\ > %%When hold turns on, it only scrolls by holding action.%% Eina_Bool efl_ui_scrollable_scroll_hold_get(const Eo *obj); void efl_ui_scrollable_scroll_hold_set(Eo *obj, Eina_Bool hold); \\ **[[:develop:api:efl:ui:scrollable:property:step_size|step_size]]** //**(get, set)**//\\ > %%Amount to scroll in response to cursor key presses.%% Eina_Position2D efl_ui_scrollable_step_size_get(const Eo *obj); void efl_ui_scrollable_step_size_set(Eo *obj, Eina_Position2D step); \\ **[[:develop:api:efl:ui:scrollable:property:viewport_geometry|viewport_geometry]]** //**(get)**//\\ > Eina_Rect efl_ui_scrollable_viewport_geometry_get(const Eo *obj); \\ ===== Events ===== **[[:develop:api:efl:ui:scrollable:event:edge_down|edge,down]]**\\ > %%Called when hitting the bottom edge.%% EFL_UI_EVENT_EDGE_DOWN(void) \\ **[[:develop:api:efl:ui:scrollable:event:edge_left|edge,left]]**\\ > %%Called when hitting the left edge.%% EFL_UI_EVENT_EDGE_LEFT(void) \\ **[[:develop:api:efl:ui:scrollable:event:edge_right|edge,right]]**\\ > %%Called when hitting the right edge.%% EFL_UI_EVENT_EDGE_RIGHT(void) \\ **[[:develop:api:efl:ui:scrollable:event:edge_up|edge,up]]**\\ > %%Called when hitting the top edge.%% EFL_UI_EVENT_EDGE_UP(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_anim_finished|scroll,anim,finished]]**\\ > %%Called when scroll animation finishes.%% EFL_UI_EVENT_SCROLL_ANIM_FINISHED(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_anim_started|scroll,anim,started]]**\\ > %%Called when scroll animation starts.%% EFL_UI_EVENT_SCROLL_ANIM_STARTED(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_changed|scroll,changed]]**\\ > %%Called when scrolling.%% EFL_UI_EVENT_SCROLL_CHANGED(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_down|scroll,down]]**\\ > %%Called when scrolling downwards.%% EFL_UI_EVENT_SCROLL_DOWN(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_drag_finished|scroll,drag,finished]]**\\ > %%Called when scroll drag finishes.%% EFL_UI_EVENT_SCROLL_DRAG_FINISHED(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_drag_started|scroll,drag,started]]**\\ > %%Called when scroll drag starts.%% EFL_UI_EVENT_SCROLL_DRAG_STARTED(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_finished|scroll,finished]]**\\ > %%Called when scroll operation finishes.%% EFL_UI_EVENT_SCROLL_FINISHED(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_left|scroll,left]]**\\ > %%Called when scrolling left.%% EFL_UI_EVENT_SCROLL_LEFT(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_right|scroll,right]]**\\ > %%Called when scrolling right.%% EFL_UI_EVENT_SCROLL_RIGHT(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_started|scroll,started]]**\\ > %%Called when scroll operation starts.%% EFL_UI_EVENT_SCROLL_STARTED(void) \\ **[[:develop:api:efl:ui:scrollable:event:scroll_up|scroll,up]]**\\ > %%Called when scrolling upwards.%% EFL_UI_EVENT_SCROLL_UP(void) \\