Scroller

Enumerations | Functions
Scroller

## Enumerations
enum | Elm_Scroller_Policy { , ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_LAST , ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_LAST }
| Type that controls when scrollbars should appear. More...
enum | Elm_Scroller_Single_Direction { , ELM_SCROLLER_SINGLE_DIRECTION_SOFT, ELM_SCROLLER_SINGLE_DIRECTION_HARD, ELM_SCROLLER_SINGLE_DIRECTION_LAST , ELM_SCROLLER_SINGLE_DIRECTION_SOFT, ELM_SCROLLER_SINGLE_DIRECTION_HARD, ELM_SCROLLER_SINGLE_DIRECTION_LAST }
| Type that controls how the content is scrolled. More...
enum | Elm_Scroller_Movement_Block { , ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL = 2, ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL = 4 , ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL = 2, ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL = 4 }
| Type that blocks the scroll movement in one or more direction. More...
enum | Elm_Scroller_Policy { , ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_LAST , ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_LAST }
| Type that controls when scrollbars should appear. More...
enum | Elm_Scroller_Single_Direction { , ELM_SCROLLER_SINGLE_DIRECTION_SOFT, ELM_SCROLLER_SINGLE_DIRECTION_HARD, ELM_SCROLLER_SINGLE_DIRECTION_LAST , ELM_SCROLLER_SINGLE_DIRECTION_SOFT, ELM_SCROLLER_SINGLE_DIRECTION_HARD, ELM_SCROLLER_SINGLE_DIRECTION_LAST }
| Type that controls how the content is scrolled. More...
enum | Elm_Scroller_Movement_Block { , ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL = 2, ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL = 4 , ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL = 2, ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL = 4 }
| Type that blocks the scroll movement in one or more direction. More...

## Functions
EINA_DEPRECATED void | elm_scroller_custom_widget_base_theme_set (Evas_Object *obj, const char *widget, const char *base)
| Set custom theme elements for the scroller. More...
EOAPI void | elm_obj_scroller_propagate_events_set (Eina_Bool propagation)
| Set event propagation on a scroller. More...
EOAPI Eina_Bool | elm_obj_scroller_propagate_events_get (void)
| Get event propagation for a scroller. More...
EOAPI void | elm_obj_scroller_custom_widget_base_theme_set (const char *klass, const char *group)
| Set custom theme elements for the scroller. More...
EOAPI void | elm_obj_scroller_page_scroll_limit_set (int page_limit_h, int page_limit_v)
| Set the maximum of the movable page at a flicking. More...
EOAPI void | elm_obj_scroller_page_scroll_limit_get (int *page_limit_h, int *page_limit_v)
| Get the maximum of the movable page at a flicking. More...
void | elm_scroller_propagate_events_set (Elm_Scroller *obj, Eina_Bool propagation)
| Set event propagation on a scroller. More...
Eina_Bool | elm_scroller_propagate_events_get (const Elm_Scroller *obj)
| Get event propagation for a scroller. More...
void | elm_scroller_custom_widget_base_theme_set (Elm_Scroller *obj, const char *klass, const char *group)
| Set custom theme elements for the scroller. More...
void | elm_scroller_page_scroll_limit_set (const Elm_Scroller *obj, int page_limit_h, int page_limit_v)
| Set the maximum of the movable page at a flicking. More...
void | elm_scroller_page_scroll_limit_get (const Elm_Scroller *obj, int *page_limit_h, int *page_limit_v)
| Get the maximum of the movable page at a flicking. More...
Evas_Object * | elm_scroller_add (Evas_Object *parent)
| Add a new scroller to the parent. More...
void | elm_scroller_content_min_limit (Evas_Object *obj, Eina_Bool w, Eina_Bool h)
| Make the scroller minimum size limited to the minimum size of the content. More...
void | elm_scroller_region_show (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
| Show a specific virtual region within the scroller content object. More...
void | elm_scroller_policy_set (Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
| Set the scrollbar visibility policy. More...
void | elm_scroller_policy_get (const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
| Get scrollbar visibility policy. More...
void | elm_scroller_single_direction_set (Evas_Object *obj, Elm_Scroller_Single_Direction single_dir)
| Set the type of single direction scroll. More...
Elm_Scroller_Single_Direction | elm_scroller_single_direction_get (const Evas_Object *obj)
| Get the type of single direction scroll. More...
void | elm_scroller_region_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
| Get the currently visible content region. More...
void | elm_scroller_child_size_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
| Get the size of the content object. More...
void | elm_scroller_page_snap_set (Evas_Object *obj, Eina_Bool page_h_snap, Eina_Bool page_v_snap)
| Set page snapping behavior of a scroller. More...
void | elm_scroller_page_snap_get (const Evas_Object *obj, Eina_Bool *page_h_snap, Eina_Bool *page_v_snap)
| Get the page snap behaviour of a scroller. More...
void | elm_scroller_bounce_set (Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
| Set bouncing behavior. More...
void | elm_scroller_bounce_get (const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
| Get the bounce behaviour. More...
void | elm_scroller_page_relative_set (Evas_Object *obj, double h_pagerel, double v_pagerel)
| Set scroll page size relative to viewport size. More...
void | elm_scroller_page_relative_get (const Evas_Object *obj, double *h_pagerel, double *v_pagerel)
| Get a given scroller widget's scrolling page size, relative to its viewport size. More...
void | elm_scroller_page_size_set (Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize)
| Set scroll page size. More...
void | elm_scroller_page_size_get (const Evas_Object *obj, Evas_Coord *h_pagesize, Evas_Coord *v_pagesize)
| Get a scroller widget's current page size. More...
void | elm_scroller_current_page_get (const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
| Get scroll current page number. More...
void | elm_scroller_last_page_get (const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
| Get scroll last page number. More...
void | elm_scroller_page_show (Evas_Object *obj, int h_pagenumber, int v_pagenumber)
| Show a specific virtual region within the scroller content object by page number. More...
void | elm_scroller_page_bring_in (Evas_Object *obj, int h_pagenumber, int v_pagenumber)
| Show a specific virtual region within the scroller content object by page number. More...
void | elm_scroller_region_bring_in (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
| Show a specific virtual region within the scroller content object. More...
void | elm_scroller_gravity_set (Evas_Object *obj, double x, double y)
| Set scrolling gravity on a scroller. More...
void | elm_scroller_gravity_get (const Evas_Object *obj, double *x, double *y)
| Get scrolling gravity values for a scroller. More...
void | elm_scroller_movement_block_set (Evas_Object *obj, Elm_Scroller_Movement_Block block)
| Set blocking of scrolling (per axis) on a given scroller. More...
Elm_Scroller_Movement_Block | elm_scroller_movement_block_get (const Evas_Object *obj)
| Get a scroller's scroll blocking state. More...
void | elm_scroller_step_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y)
| Set scroll step size. More...
void | elm_scroller_step_size_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
| Get the current step size of the scroller object. More...
void | elm_scroller_loop_set (Evas_Object *obj, Eina_Bool loop_h, Eina_Bool loop_v)
| Set an infinite loop_ for a scroller. More...
void | elm_scroller_loop_get (const Evas_Object *obj, Eina_Bool *loop_h, Eina_Bool *loop_v)
| Get an infinite loop_ for a scroller. More...
void | elm_scroller_wheel_disabled_set (Evas_Object *obj, Eina_Bool disabled)
| Enable or disable mouse wheel to be used to scroll the scroller. More...
Eina_Bool | elm_scroller_wheel_disabled_get (const Evas_Object *obj)
| Get a value whether mouse wheel is enabled or not over the scroller. More...

## Detailed Description

A scroller holds (and clips) a single object and "scrolls it around". This means that it allows the user to use a scroll bar (or a finger) to drag the viewable region around, moving through a much larger object that is contained in the scroller. The scroller will always have a small minimum size by default as it won't be limited by the contents of the scroller.

This widget inherits from the Layout one, so that all the functions acting on it also work for scroller objects.

This widget emits the following signals, besides the ones sent from

- `"edge,left"` - the left edge of the content has been reached
- `"edge,right"` - the right edge of the content has been reached
- `"edge,top"` - the top edge of the content has been reached
- `"edge,bottom"` - the bottom edge of the content has been reached
- `"scroll"` - the content has been scrolled (moved)
- `"scroll,left"` - the content has been scrolled (moved) leftwards
- `"scroll,right"` - the content has been scrolled (moved) rightwards
- `"scroll,up"` - the content has been scrolled (moved) upwards
- `"scroll,down"` - the content has been scrolled (moved) downwards
- `"scroll,anim,start"` - scrolling animation has started
- `"scroll,anim,stop"` - scrolling animation has stopped
- `"scroll,drag,start"` - dragging the contents around has started
- `"scroll,drag,stop"` - dragging the contents around has stopped
- `"vbar,drag"` - the vertical scroll bar has been dragged
- `"vbar,press"` - the vertical scroll bar has been pressed
- `"vbar,unpress"` - the vertical scroll bar has been unpressed
- `"hbar,drag"` - the horizontal scroll bar has been dragged
- `"hbar,press"` - the horizontal scroll bar has been pressed
- `"hbar,unpress"` - the horizontal scroll bar has been unpressed
- `"scroll,page,changed"` - the visible page has changed
- `"focused"` - When the scroller has received focus. (since 1.8)
- `"unfocused"` - When the scroller has lost focus. (since 1.8)

This widget implements the The Elementary Scrollable Interface interface. Its (non-deprecated) API functions, except for elm_scroller_add(), which gives basic scroller objects, are meant to be a basis for all other scrollable widgets (i.e. widgets implementing The Elementary Scrollable Interface). So, they will work both on pristine scroller widgets and on other "specialized" scrollable widgets.

Note
  The `"scroll,anim,*"` and `"scroll,drag,*"` signals are only emitted by user intervention.
  When Elementary is under its default profile and theme (meant for touch interfaces), scroll bars will not be draggable – their function is merely to indicate how much has been scrolled.
  When Elementary is under its desktop/standard profile and theme, the thumb scroll (a.k.a. finger scroll) won't work.

Default content parts of the scroller widget that you can use are:

- `"default"` - A content of the scroller

In Scroller example you'll find an example on how to use most of this API.

## Enumeration Type Documentation

## ◆ Elm_Scroller_Movement_Block [1/2]

enum Elm_Scroller_Movement_Block

Type that blocks the scroll movement in one or more direction.

Since
  1.8

Enumerator
ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL | Do not block movements.
ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL | Block vertical movements.
ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL | Do not block movements.
ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL | Block vertical movements.

## ◆ Elm_Scroller_Movement_Block [2/2]

enum Elm_Scroller_Movement_Block

Type that blocks the scroll movement in one or more direction.

Since
  1.8

Enumerator
ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL | Do not block movements.
ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL | Block vertical movements.
ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL | Do not block movements.
ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL | Block vertical movements.

## ◆ Elm_Scroller_Policy [1/2]

enum Elm_Scroller_Policy

Type that controls when scrollbars should appear.

See also Elm_Interface_Scrollable.policy.set.

Enumerator
ELM_SCROLLER_POLICY_ON | Show scrollbars as needed.
ELM_SCROLLER_POLICY_OFF | Always show scrollbars.
ELM_SCROLLER_POLICY_LAST | Never show scrollbars.
ELM_SCROLLER_POLICY_ON | Show scrollbars as needed.
ELM_SCROLLER_POLICY_OFF | Always show scrollbars.
ELM_SCROLLER_POLICY_LAST | Never show scrollbars.

## ◆ Elm_Scroller_Policy [2/2]

enum Elm_Scroller_Policy

Type that controls when scrollbars should appear.

See also elm_interface_scrollable_policy_set.

Enumerator
ELM_SCROLLER_POLICY_ON | Show scrollbars as needed.
ELM_SCROLLER_POLICY_OFF | Always show scrollbars.
ELM_SCROLLER_POLICY_LAST | Never show scrollbars.
ELM_SCROLLER_POLICY_ON | Show scrollbars as needed.
ELM_SCROLLER_POLICY_OFF | Always show scrollbars.
ELM_SCROLLER_POLICY_LAST | Never show scrollbars.

## ◆ Elm_Scroller_Single_Direction [1/2]

enum Elm_Scroller_Single_Direction

Type that controls how the content is scrolled.

See also elm_interface_scrollable_single_direction_set.

Enumerator
ELM_SCROLLER_SINGLE_DIRECTION_SOFT | Scroll every direction.
ELM_SCROLLER_SINGLE_DIRECTION_HARD | Scroll single direction if the direction is certain.
ELM_SCROLLER_SINGLE_DIRECTION_LAST | Scroll only single direction.
ELM_SCROLLER_SINGLE_DIRECTION_SOFT | Scroll every direction.
ELM_SCROLLER_SINGLE_DIRECTION_HARD | Scroll single direction if the direction is certain.
ELM_SCROLLER_SINGLE_DIRECTION_LAST | Scroll only single direction.

## ◆ Elm_Scroller_Single_Direction [2/2]

enum Elm_Scroller_Single_Direction

Type that controls how the content is scrolled.

See also Elm_Interface_Scrollable.single_direction.set.

Enumerator
ELM_SCROLLER_SINGLE_DIRECTION_SOFT | Scroll every direction.
ELM_SCROLLER_SINGLE_DIRECTION_HARD | Scroll single direction if the direction is certain.
ELM_SCROLLER_SINGLE_DIRECTION_LAST | Scroll only single direction.
ELM_SCROLLER_SINGLE_DIRECTION_SOFT | Scroll every direction.
ELM_SCROLLER_SINGLE_DIRECTION_HARD | Scroll single direction if the direction is certain.
ELM_SCROLLER_SINGLE_DIRECTION_LAST | Scroll only single direction.

## Function Documentation

## ◆ elm_obj_scroller_custom_widget_base_theme_set()

EOAPI void elm_obj_scroller_custom_widget_base_theme_set | ( | const char * | klass,
|  | const char * | group
| ) |  |

Set custom theme elements for the scroller.

Parameters

  [in] | klass |
  [in] | group |

Referenced by elm_scroller_custom_widget_base_theme_set().

## ◆ elm_obj_scroller_page_scroll_limit_get()

EOAPI void elm_obj_scroller_page_scroll_limit_get | ( | int * | page_limit_h,
|  | int * | page_limit_v
| ) |  |

Get the maximum of the movable page at a flicking.

Parameters

  [in] | page_limit_v | The maximum of the movable vertical page

Since
  1.8

Referenced by elm_scroller_page_scroll_limit_get().

## ◆ elm_obj_scroller_page_scroll_limit_set()

EOAPI void elm_obj_scroller_page_scroll_limit_set | ( | int | page_limit_h,
|  | int | page_limit_v
| ) |  |

Set the maximum of the movable page at a flicking.

The value of maximum movable page should be more than 1.

Parameters

  [in] | page_limit_v | The maximum of the movable vertical page

Since
  1.8

Referenced by elm_scroller_page_scroll_limit_set().

## ◆ elm_obj_scroller_propagate_events_get()

EOAPI Eina_Bool elm_obj_scroller_propagate_events_get | ( | void |  | ) |

Get event propagation for a scroller.

This gets the event propagation for a scroller.

Returns
  The propagation state

Referenced by elm_scroller_propagate_events_get().

## ◆ elm_obj_scroller_propagate_events_set()

EOAPI void elm_obj_scroller_propagate_events_set | ( | Eina_Bool | propagation | ) |

Set event propagation on a scroller.

This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled.

Parameters

  [in] | propagation | The propagation state

Referenced by elm_scroller_propagate_events_set().

## ◆ elm_scroller_add()

Evas_Object* elm_scroller_add | ( | Evas_Object * | parent | ) |

Add a new scroller to the parent.

Parameters

  parent | The parent object

Returns
  The new object or NULL if it cannot be created

## ◆ elm_scroller_bounce_get()

void elm_scroller_bounce_get | ( | const Evas_Object * | obj,
|  | Eina_Bool * | h_bounce,
|  | Eina_Bool * | v_bounce
| ) |  |

Get the bounce behaviour.

Parameters

  obj | The Scroller object
  h_bounce | Will the scroller bounce horizontally or not
  v_bounce | Will the scroller bounce vertically or not

See also
  elm_scroller_bounce_set()

## ◆ elm_scroller_bounce_set()

void elm_scroller_bounce_set | ( | Evas_Object * | obj,
|  | Eina_Bool | h_bounce,
|  | Eina_Bool | v_bounce
| ) |  |

Set bouncing behavior.

Parameters

  obj | The scroller object
  h_bounce | Allow bounce horizontally
  v_bounce | Allow bounce vertically

When scrolling, the scroller may "bounce" when reaching an edge of the content object. This is a visual way to indicate the end has been reached. This is enabled by default for both axis. This API will set if it is enabled for the given axis with the boolean parameters for each axis.

Referenced by elm_color_class_editor_add().

## ◆ elm_scroller_child_size_get()

void elm_scroller_child_size_get | ( | const Evas_Object * | obj,
|  | Evas_Coord * | w,
|  | Evas_Coord * | h
| ) |  |

Get the size of the content object.

Parameters

  obj | The scroller object
  w | Width of the content object.
  h | Height of the content object.

This gets the size of the content object of the scroller.

## ◆ elm_scroller_content_min_limit()

void elm_scroller_content_min_limit | ( | Evas_Object * | obj,
|  | Eina_Bool | w,
|  | Eina_Bool | h
| ) |  |

Make the scroller minimum size limited to the minimum size of the content.

Parameters

  obj | The scroller object
  w | Enable limiting minimum size horizontally
  h | Enable limiting minimum size vertically

By default the scroller will be as small as its design allows, irrespective of its content. This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction.

## ◆ elm_scroller_current_page_get()

void elm_scroller_current_page_get | ( | const Evas_Object * | obj,
|  | int * | h_pagenumber,
|  | int * | v_pagenumber
| ) |  |

Get scroll current page number.

Parameters

  obj | The scroller object
  h_pagenumber | The horizontal page number
  v_pagenumber | The vertical page number

The page number starts from 0. 0 is the first page. Current page means the page which meets the top-left of the viewport. If there are two or more pages in the viewport, it returns the number of the page which meets the top-left of the viewport.

See also
  elm_scroller_last_page_get()
  elm_scroller_page_show()
  elm_scroller_page_bring_in()

## ◆ elm_scroller_custom_widget_base_theme_set() [1/2]

void elm_scroller_custom_widget_base_theme_set | ( | Elm_Scroller * | obj,
|  | const char * | klass,
|  | const char * | group
| ) |  |

Set custom theme elements for the scroller.

Parameters

  [in] | klass |
  [in] | group |

References elm_obj_scroller_custom_widget_base_theme_set().

## ◆ elm_scroller_custom_widget_base_theme_set() [2/2]

EINA_DEPRECATED void elm_scroller_custom_widget_base_theme_set | ( | Evas_Object * | obj,
|  | const char * | widget,
|  | const char * | base
| ) |  |

Set custom theme elements for the scroller.

Parameters

  obj | The scroller object
  widget | The widget name to use (default is "scroller")
  base | The base name to use (default is "base")

Deprecated:
  Use elm_layout_theme_set() instead.

## ◆ elm_scroller_gravity_get()

void elm_scroller_gravity_get | ( | const Evas_Object * | obj,
|  | double * | x,
|  | double * | y
| ) |  |

Get scrolling gravity values for a scroller.

Parameters

  obj | The scroller object
  x | The scrolling horizontal gravity
  y | The scrolling vertical gravity

This gets gravity values for a scroller.

See also
  elm_scroller_gravity_set()

## ◆ elm_scroller_gravity_set()

void elm_scroller_gravity_set | ( | Evas_Object * | obj,
|  | double | x,
|  | double | y
| ) |  |

Set scrolling gravity on a scroller.

Parameters

  obj | The scroller object
  x | The scrolling horizontal gravity
  y | The scrolling vertical gravity

The gravity, defines how the scroller will adjust its view when the size of the scroller contents increase.

The scroller will adjust the view to glue itself as follows.

x=0.0, for staying where it is relative to the left edge of the content x=1.0, for staying where it is relative to the rigth edge of the content y=0.0, for staying where it is relative to the top edge of the content y=1.0, for staying where it is relative to the bottom edge of the content

Default values for x and y are 0.0

## ◆ elm_scroller_last_page_get()

void elm_scroller_last_page_get | ( | const Evas_Object * | obj,
|  | int * | h_pagenumber,
|  | int * | v_pagenumber
| ) |  |

Get scroll last page number.

Parameters

  obj | The scroller object
  h_pagenumber | The horizontal page number
  v_pagenumber | The vertical page number

The page number starts from 0. 0 is the first page. This returns the last page number among the pages.

See also
  elm_scroller_current_page_get()
  elm_scroller_page_show()
  elm_scroller_page_bring_in()

## ◆ elm_scroller_loop_get()

void elm_scroller_loop_get | ( | const Evas_Object * | obj,
|  | Eina_Bool * | loop_h,
|  | Eina_Bool * | loop_v
| ) |  |

Get an infinite loop_ for a scroller.

Parameters

  obj | The scroller object
  loop_h | The scrolling horizontal loop
  loop_v | The scrolling vertical loop

Since
  1.14

See also
  elm_scroller_loop_set() for more details

## ◆ elm_scroller_loop_set()

void elm_scroller_loop_set | ( | Evas_Object * | obj,
|  | Eina_Bool | loop_h,
|  | Eina_Bool | loop_v
| ) |  |

Set an infinite loop_ for a scroller.

Parameters

  obj | The scroller object
  loop_h | The scrolling horizontal loop
  loop_v | The scrolling vertical loop

This function sets the infinite loop horizontally or vertically. If the content is set, it will be shown repeatedly.

Since
  1.14

## ◆ elm_scroller_movement_block_get()

Elm_Scroller_Movement_Block elm_scroller_movement_block_get | ( | const Evas_Object * | obj | ) |

Get a scroller's scroll blocking state.

Parameters

  parent | The scroller object

Returns
  The blocking state

Since
  1.8

See also
  elm_scroller_movement_block_set() for more details

## ◆ elm_scroller_movement_block_set()

void elm_scroller_movement_block_set | ( | Evas_Object * | obj,
|  | Elm_Scroller_Movement_Block | block
| ) |  |

Set blocking of scrolling (per axis) on a given scroller.

Parameters

  obj | The scroller object
  block | The axis to block

This function will block scrolling movement (by input of a user) in a given direction. One can disable movements in the X axis, the Y axis or both. The default value is #ELM_SCROLLER_MOVEMENT_NO_BLOCK, where movements are allowed in both directions.

What makes this function different from elm_object_scroll_freeze_push(), elm_object_scroll_hold_push() and elm_object_scroll_lock_x_set() (or elm_object_scroll_lock_y_set()) is that it doesn't propagate its effects to any parent or child widget of obj. Only the target scrollable widget will be locked with regard to scrolling.

Since
  1.8

## ◆ elm_scroller_page_bring_in()

void elm_scroller_page_bring_in | ( | Evas_Object * | obj,
|  | int | h_pagenumber,
|  | int | v_pagenumber
| ) |  |

Show a specific virtual region within the scroller content object by page number.

Parameters

  obj | The scroller object
  h_pagenumber | The horizontal page number
  v_pagenumber | The vertical page number

0, 0 of the indicated page is located at the top-left of the viewport. This will slide to the page with animation.

Example of usage:

sc = elm_scroller_add(win);
elm_object_content_set(sc, content);
elm_scroller_page_relative_set(sc, 1, 0);
elm_scroller_last_page_get(sc, &h_page, &v_page);
elm_scroller_page_bring_in(sc, h_page, v_page);

See also
  elm_scroller_page_show()

## ◆ elm_scroller_page_relative_get()

void elm_scroller_page_relative_get | ( | const Evas_Object * | obj,
|  | double * | h_pagerel,
|  | double * | v_pagerel
| ) |  |

Get a given scroller widget's scrolling page size, relative to its viewport size.

Parameters

  obj | The scroller object
  h_pagerel | Pointer to a variable where to store the horizontal page (relative) size
  v_pagerel | Pointer to a variable where to store the vertical page (relative) size

See also
  elm_scroller_page_relative_set() for more details

Since
  1.7

## ◆ elm_scroller_page_relative_set()

void elm_scroller_page_relative_set | ( | Evas_Object * | obj,
|  | double | h_pagerel,
|  | double | v_pagerel
| ) |  |

Set scroll page size relative to viewport size.

Parameters

  obj | The scroller object
  h_pagerel | The horizontal page relative size
  v_pagerel | The vertical page relative size

The scroller is capable of limiting scrolling by the user to "pages". That is to jump by and only show a "whole page" at a time as if the continuous area of the scroller content is split into page sized pieces. This sets the size of a page relative to the viewport of the scroller. 1.0 is "1 viewport" is size (horizontally or vertically). 0.0 turns it off in that axis. This is mutually exclusive with page size (see elm_scroller_page_size_set() for more information). Likewise 0.5 is "half a viewport". Sane usable values are normally between 0.0 and 1.0 including 1.0. If you only want 1 axis to be page "limited", use 0.0 for the other axis.

## ◆ elm_scroller_page_scroll_limit_get()

void elm_scroller_page_scroll_limit_get | ( | const Elm_Scroller * | obj,
|  | int * | page_limit_h,
|  | int * | page_limit_v
| ) |  |

Get the maximum of the movable page at a flicking.

Parameters

  [in] | page_limit_v | The maximum of the movable vertical page

Since
  1.8

References elm_obj_scroller_page_scroll_limit_get().

## ◆ elm_scroller_page_scroll_limit_set()

void elm_scroller_page_scroll_limit_set | ( | const Elm_Scroller * | obj,
|  | int | page_limit_h,
|  | int | page_limit_v
| ) |  |

Set the maximum of the movable page at a flicking.

The value of maximum movable page should be more than 1.

Parameters

  [in] | page_limit_v | The maximum of the movable vertical page

Since
  1.8

References elm_obj_scroller_page_scroll_limit_set().

## ◆ elm_scroller_page_show()

void elm_scroller_page_show | ( | Evas_Object * | obj,
|  | int | h_pagenumber,
|  | int | v_pagenumber
| ) |  |

Show a specific virtual region within the scroller content object by page number.

Parameters

  obj | The scroller object
  h_pagenumber | The horizontal page number
  v_pagenumber | The vertical page number

0, 0 of the indicated page is located at the top-left of the viewport. This will jump to the page directly without animation.

Example of usage:

sc = elm_scroller_add(win);
elm_object_content_set(sc, content);
elm_scroller_page_relative_set(sc, 1, 0);
elm_scroller_current_page_get(sc, &h_page, &v_page);
elm_scroller_page_show(sc, h_page + 1, v_page);

See also
  elm_scroller_page_bring_in()

## ◆ elm_scroller_page_size_get()

void elm_scroller_page_size_get | ( | const Evas_Object * | obj,
|  | Evas_Coord * | h_pagesize,
|  | Evas_Coord * | v_pagesize
| ) |  |

Get a scroller widget's current page size.

Parameters

  obj | The scroller object
  h_pagesize | Where to store its horizontal page size
  v_pagesize | Where to store its vertical page size

See also
  elm_scroller_page_size_set() for more details
  elm_scroller_page_relative_set()

Since
  1.7

## ◆ elm_scroller_page_size_set()

void elm_scroller_page_size_set | ( | Evas_Object * | obj,
|  | Evas_Coord | h_pagesize,
|  | Evas_Coord | v_pagesize
| ) |  |

Set scroll page size.

Parameters

  obj | The scroller object
  h_pagesize | The horizontal page size
  v_pagesize | The vertical page size

This sets the page size to an absolute fixed value, with 0 turning it off for that axis.

See also
  elm_scroller_page_relative_set()
  elm_scroller_page_size_get()

## ◆ elm_scroller_page_snap_get()

void elm_scroller_page_snap_get | ( | const Evas_Object * | obj,
|  | Eina_Bool * | page_h_snap,
|  | Eina_Bool * | page_v_snap
| ) |  |

Get the page snap behaviour of a scroller.

Parameters

  obj | The Scroller object
  page_h_snap | Will the scroller snap horizontally or not
  page_v_snap | Will the scroller snap vertically or not

See also
  elm_scroller_page_snap_set() for more details

Since
  1.8

## ◆ elm_scroller_page_snap_set()

void elm_scroller_page_snap_set | ( | Evas_Object * | obj,
|  | Eina_Bool | page_h_snap,
|  | Eina_Bool | page_v_snap
| ) |  |

Set page snapping behavior of a scroller.

Parameters

  obj | The scroller object
  page_h_snap | Allow snap horizontally
  page_v_snap | Allow snap vertically

When scrolling, if a scroller is paged (see elm_scroller_page_size_set() and elm_scroller_page_relative_set()), the scroller may snap to pages when being scrolled, i.e., even if it had momentum to scroll further, it will stop at the next page boundaries. This is disabled, by default, for both axis. This function will set if it that is enabled or not, for each axis.

Note
  If obj is not set to have pages, nothing will happen after this call.

Since
  1.8

## ◆ elm_scroller_policy_get()

void elm_scroller_policy_get | ( | const Evas_Object * | obj,
|  | Elm_Scroller_Policy * | policy_h,
|  | Elm_Scroller_Policy * | policy_v
| ) |  |

Get scrollbar visibility policy.

Parameters

  obj | The scroller object
  policy_h | Horizontal scrollbar policy
  policy_v | Vertical scrollbar policy

See also
  elm_scroller_policy_set()

## ◆ elm_scroller_policy_set()

void elm_scroller_policy_set | ( | Evas_Object * | obj,
|  | Elm_Scroller_Policy | policy_h,
|  | Elm_Scroller_Policy | policy_v
| ) |  |

Set the scrollbar visibility policy.

Parameters

  obj | The scroller object
  policy_h | Horizontal scrollbar policy
  policy_v | Vertical scrollbar policy

This sets the scrollbar visibility policy for the given scroller. #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it is needed, and otherwise kept hidden. ELM_SCROLLER_POLICY_ON turns it on all the time, and ELM_SCROLLER_POLICY_OFF always keeps it off. This applies respectively for the horizontal and vertical scrollbars.

Referenced by elm_color_class_editor_add(), and elm_hoversel_add().

## ◆ elm_scroller_propagate_events_get()

Eina_Bool elm_scroller_propagate_events_get | ( | const Elm_Scroller * | obj | ) |

Get event propagation for a scroller.

This gets the event propagation for a scroller.

Returns
  The propagation state

References elm_obj_scroller_propagate_events_get().

## ◆ elm_scroller_propagate_events_set()

void elm_scroller_propagate_events_set | ( | Elm_Scroller * | obj,
|  | Eina_Bool | propagation
| ) |  |

Set event propagation on a scroller.

This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled.

Parameters

  [in] | propagation | The propagation state

References elm_obj_scroller_propagate_events_set().

## ◆ elm_scroller_region_bring_in()

void elm_scroller_region_bring_in | ( | Evas_Object * | obj,
|  | Evas_Coord | x,
|  | Evas_Coord | y,
|  | Evas_Coord | w,
|  | Evas_Coord | h
| ) |  |

Show a specific virtual region within the scroller content object.

Parameters

  obj | The scroller object
  x | X coordinate of the region
  y | Y coordinate of the region
  w | Width of the region
  h | Height of the region

This will ensure all (or part if it does not fit) of the designated region in the virtual content object (0, 0 starting at the top-left of the virtual content object) is shown within the scroller. Unlike elm_scroller_region_show(), this allow the scroller to "smoothly slide" to this location (if configuration in general calls for transitions). It may not jump immediately to the new location and make take a while and show other content along the way.

See also
  elm_scroller_region_show()

## ◆ elm_scroller_region_get()

void elm_scroller_region_get | ( | const Evas_Object * | obj,
|  | Evas_Coord * | x,
|  | Evas_Coord * | y,
|  | Evas_Coord * | w,
|  | Evas_Coord * | h
| ) |  |

Get the currently visible content region.

Parameters

  obj | The scroller object
  x | X coordinate of the region
  y | Y coordinate of the region
  w | Width of the region
  h | Height of the region

This gets the current region in the content object that is visible through the scroller. The region co-ordinates are returned in the `x`, `y`, `w`, `h` values pointed to.

Note
  All coordinates are relative to the content.

See also
  elm_scroller_region_show()

## ◆ elm_scroller_region_show()

void elm_scroller_region_show | ( | Evas_Object * | obj,
|  | Evas_Coord | x,
|  | Evas_Coord | y,
|  | Evas_Coord | w,
|  | Evas_Coord | h
| ) |  |

Show a specific virtual region within the scroller content object.

Parameters

  obj | The scroller object
  x | X coordinate of the region
  y | Y coordinate of the region
  w | Width of the region
  h | Height of the region

This will ensure all (or part if it does not fit) of the designated region in the virtual content object (0, 0 starting at the top-left of the virtual content object) is shown within the scroller.

## ◆ elm_scroller_single_direction_get()

Elm_Scroller_Single_Direction elm_scroller_single_direction_get | ( | const Evas_Object * | obj | ) |

Get the type of single direction scroll.

Parameters

  obj | The scroller object

Returns
  the type of single direction

See also
  elm_scroller_single_direction_get()

Since
  1.8

## ◆ elm_scroller_single_direction_set()

void elm_scroller_single_direction_set | ( | Evas_Object * | obj,
|  | Elm_Scroller_Single_Direction | single_dir
| ) |  |

Set the type of single direction scroll.

Parameters

  obj | The scroller object
  single_dir | The type of single direction

See also
  elm_scroller_single_direction_get()

Since
  1.8

## ◆ elm_scroller_step_size_get()

void elm_scroller_step_size_get | ( | const Evas_Object * | obj,
|  | Evas_Coord * | x,
|  | Evas_Coord * | y
| ) |  |

Get the current step size of the scroller object.

Parameters

  obj | The scroller object
  x | Where to store its x axis step size
  y | Where to store its y axis step size

See also
  elm_scroller_step_size_set() for more details

Since
  1.13

## ◆ elm_scroller_step_size_set()

void elm_scroller_step_size_set | ( | Evas_Object * | obj,
|  | Evas_Coord | x,
|  | Evas_Coord | y
| ) |  |

Set scroll step size.

Parameters

  obj | The scroller object
  x | The horizontal step size
  y | The vertical step size

This sets the step size to move scroller by key event.

See also
  elm_scroller_step_size_get() for more details

Since
  1.13

## ◆ elm_scroller_wheel_disabled_get()

Eina_Bool elm_scroller_wheel_disabled_get | ( | const Evas_Object * | obj | ) |

Get a value whether mouse wheel is enabled or not over the scroller.

Parameters

  obj | The scroller object

Returns
  `EINA_TRUE` means scroller wheel is disabled. `EINA_FALSE` indicates it is enabled.

Mouse wheel can be used to scroll up and down the scroller.

Since
  1.15

See also
  elm_scroller_wheel_disabled_set()

## ◆ elm_scroller_wheel_disabled_set()

void elm_scroller_wheel_disabled_set | ( | Evas_Object * | obj,
|  | Eina_Bool | disabled
| ) |  |

Enable or disable mouse wheel to be used to scroll the scroller.

Parameters

  obj | The scroller object
  disabled | The mouse wheel disabled over the scroller.

Mouse wheel can be used to scroll up and down the scroller. Wheel is enabled by default.

Since
  1.15

See also
  elm_scroller_wheel_disabled_get()