Clutter Reference Manual: ClutterScrollActor

## ClutterScrollActor ClutterScrollActor — An actor for displaying a portion of its children |

## Functions

ClutterActor * | clutter_scroll_actor_new ()
void | clutter_scroll_actor_set_scroll_mode ()
ClutterScrollMode | clutter_scroll_actor_get_scroll_mode ()
void | clutter_scroll_actor_scroll_to_point ()
void | clutter_scroll_actor_scroll_to_rect ()

## Properties

ClutterScrollMode | scroll-mode | Read / Write

## Types and Values

| ClutterScrollActor
struct | ClutterScrollActorClass
enum | ClutterScrollMode

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ClutterActor
                ╰── ClutterScrollActor

## Implemented Interfaces

ClutterScrollActor implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

## Description

ClutterScrollActor is an actor that can be used to display a portion of the contents of its children.

The extent of the area of a ClutterScrollActor is defined by the size of its children; the visible region of the children of a ClutterScrollActor is set by using `clutter_scroll_actor_scroll_to_point()` or by using `clutter_scroll_actor_scroll_to_rect()` to define a point or a rectangle acting as the origin, respectively.

ClutterScrollActor does not provide pointer or keyboard event handling, nor does it provide visible scroll handles.

See scroll-actor.c for an example of how to use ClutterScrollActor.

ClutterScrollActor is available since Clutter 1.12.

## Functions

### clutter_scroll_actor_new ()

    ClutterActor *
    clutter_scroll_actor_new (void);

Creates a new ClutterScrollActor.

#### Returns

The newly created ClutterScrollActor instance.

Since 1.12

### clutter_scroll_actor_set_scroll_mode ()

    void
    clutter_scroll_actor_set_scroll_mode (ClutterScrollActor *actor,
                                          ClutterScrollMode mode);

Sets the “scroll-mode” property.

#### Parameters

actor | a ClutterScrollActor |
mode | a ClutterScrollMode |

Since 1.12

### clutter_scroll_actor_get_scroll_mode ()

    ClutterScrollMode
    clutter_scroll_actor_get_scroll_mode (ClutterScrollActor *actor);

Retrieves the “scroll-mode” property

#### Parameters

actor | a ClutterScrollActor |

#### Returns

the scrolling mode

Since 1.12

### clutter_scroll_actor_scroll_to_point ()

    void
    clutter_scroll_actor_scroll_to_point (ClutterScrollActor *actor,
                                          const ClutterPoint *point);

Scrolls the contents of `actor` so that `point` is the new origin of the visible area.

The coordinates of `point` must be relative to the `actor` .

This function will use the currently set easing state of the `actor` to transition from the current scroll origin to the new one.

#### Parameters

actor | a ClutterScrollActor |
point | a ClutterPoint |

Since 1.12

### clutter_scroll_actor_scroll_to_rect ()

    void
    clutter_scroll_actor_scroll_to_rect (ClutterScrollActor *actor,
                                         const ClutterRect *rect);

Scrolls `actor` so that `rect` is in the visible portion.

#### Parameters

actor | a ClutterScrollActor |
rect | a ClutterRect |

Since 1.12

## Types and Values

### ClutterScrollActor

    typedef struct _ClutterScrollActor ClutterScrollActor;

The ClutterScrollActor structure contains only private data, and should be accessed using the provided API.

Since 1.12

### struct ClutterScrollActorClass

    struct ClutterScrollActorClass {
    };

The ClutterScrollActor structure contains only private data.

Since 1.12

### enum ClutterScrollMode

Scroll modes.

#### Members

CLUTTER_SCROLL_NONE | Ignore scrolling |
CLUTTER_SCROLL_HORIZONTALLY | Scroll only horizontally |
CLUTTER_SCROLL_VERTICALLY | Scroll only vertically |
CLUTTER_SCROLL_BOTH | Scroll in both directions |

Since 1.12

## Property Details

### The `“scroll-mode”` property

      “scroll-mode”              ClutterScrollMode

The scrollin direction.

Flags: Read / Write

Default value: CLUTTER_SCROLL_HORIZONTALLY | CLUTTER_SCROLL_VERTICALLY

Since 1.12