MxKineticScrollView

MxKineticScrollView — A kinetic scrolling container widget

Functions

Properties

gdouble acceleration-factor Read / Write
guint clamp-duration Read / Write
gulong clamp-mode Read / Write
gboolean clamp-to-center Read / Write
gdouble deceleration Read / Write
guint mouse-button Read / Write
gdouble overshoot Read / Write
MxScrollPolicy scroll-policy Read / Write
MxKineticScrollViewState state Read
gboolean use-captured Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MxWidget
                ╰── MxBin
                    ╰── MxKineticScrollView

Implemented Interfaces

MxKineticScrollView implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable, MxFocusable and MxScrollable.

Description

MxKineticScrollView is a single child container for actors that implements MxScrollable. It allows the contained child to be dragged to scroll, and maintains the momentum once the drag is complete. Deceleration after dragging is configurable, and it will always snap to the “step-increment” boundary.

MxKineticScrollView also implements MxScrollable itself, allowing it to be embedded in an MxScrollView to provide scroll-bars.

Functions

mx_kinetic_scroll_view_new ()

ClutterActor *
mx_kinetic_scroll_view_new (void);

Creates a new MxKineticScrollView.

Returns

a newly allocated MxKineticScrollView

Since: 1.2


mx_kinetic_scroll_view_stop ()

void
mx_kinetic_scroll_view_stop (MxKineticScrollView *scroll);

Stops any current movement due to kinetic scrolling.

Parameters

scroll

A MxKineticScrollView

 

Since: 1.2


mx_kinetic_scroll_view_set_deceleration ()

void
mx_kinetic_scroll_view_set_deceleration
                               (MxKineticScrollView *scroll,
                                gdouble rate);

Sets the deceleration rate when a drag is finished on the kinetic scroll-view. This is the value that the momentum is divided by every 60th of a second.

Parameters

scroll

A MxKineticScrollView

 

rate

The deceleration rate

 

Since: 1.2


mx_kinetic_scroll_view_get_deceleration ()

gdouble
mx_kinetic_scroll_view_get_deceleration
                               (MxKineticScrollView *scroll);

Retrieves the deceleration rate of the kinetic scroll-view.

Parameters

scroll

A MxKineticScrollView

 

Returns

The deceleration rate of the kinetic scroll-view

Since: 1.2


mx_kinetic_scroll_view_set_use_captured ()

void
mx_kinetic_scroll_view_set_use_captured
                               (MxKineticScrollView *scroll,
                                gboolean use_captured);

Sets whether to use captured events to initiate drag events. This can be used to block events that would initiate scrolling from reaching the child actor.

Parameters

scroll

A MxKineticScrollView

 

use_captured

TRUE to use captured events

 

Since: 1.2


mx_kinetic_scroll_view_get_use_captured ()

gboolean
mx_kinetic_scroll_view_get_use_captured
                               (MxKineticScrollView *scroll);

Gets the “use-captured” property.

Parameters

scroll

A MxKineticScrollView

 

Returns

TRUE if captured-events should be used to initiate scrolling

Since: 1.2


mx_kinetic_scroll_view_set_mouse_button ()

void
mx_kinetic_scroll_view_set_mouse_button
                               (MxKineticScrollView *scroll,
                                guint32 button);

Sets the mouse button number used to initiate drag events on the kinetic scroll-view.

Parameters

scroll

A MxKineticScrollView

 

button

A mouse button number

 

Since: 1.2


mx_kinetic_scroll_view_get_mouse_button ()

guint32
mx_kinetic_scroll_view_get_mouse_button
                               (MxKineticScrollView *scroll);

Gets the “mouse-button” property

Parameters

scroll

A MxKineticScrollView

 

Returns

The mouse button number used to initiate drag events on the kinetic scroll-view

Since: 1.2


mx_kinetic_scroll_view_set_overshoot ()

void
mx_kinetic_scroll_view_set_overshoot (MxKineticScrollView *scroll,
                                      gdouble overshoot);

Sets the rate at which the view will decelerate when scrolling beyond its boundaries. The deceleration rate will be multiplied by this value every 60th of a second when the view is scrolling outside of the range set by its adjustments.

See mx_kinetic_scroll_view_set_deceleration()

Parameters

scroll

A MxKineticScrollView

 

overshoot

The rate at which the view will decelerate when scrolling beyond its boundaries.

 

Since: 1.2


mx_kinetic_scroll_view_get_overshoot ()

gdouble
mx_kinetic_scroll_view_get_overshoot (MxKineticScrollView *scroll);

Retrieves the deceleration rate multiplier used when the scroll-view is scrolling beyond its boundaries.

Parameters

scroll

A MxKineticScrollView

 

Since: 1.2


mx_kinetic_scroll_view_set_scroll_policy ()

void
mx_kinetic_scroll_view_set_scroll_policy
                               (MxKineticScrollView *scroll,
                                MxScrollPolicy policy);

Sets the scrolling policy for the kinetic scroll-view. This controls the possible axes of movement, and can affect the minimum size of the widget.

Parameters

scroll

A MxKineticScrollView

 

policy

A MxScrollPolicy

 

mx_kinetic_scroll_view_get_scroll_policy ()

MxScrollPolicy
mx_kinetic_scroll_view_get_scroll_policy
                               (MxKineticScrollView *scroll);

Retrieves the scrolling policy of the kinetic scroll-view.

Parameters

scroll

A MxKineticScrollView

 

Returns

A MxScrollPolicy

Types and Values

struct MxKineticScrollView

struct MxKineticScrollView;

The contents of this structure is private and should only be accessed using the provided API.


struct MxKineticScrollViewClass

struct MxKineticScrollViewClass {
  MxBinClass parent_class;
};

Property Details

The “acceleration-factor” property

  “acceleration-factor”      gdouble

Factor applied to the initial acceleration.

Flags: Read / Write

Allowed values: >= 0

Default value: 1


The “clamp-duration” property

  “clamp-duration”           guint

Duration of the adjustment clamp animation.

Flags: Read / Write

Default value: 250


The “clamp-mode” property

  “clamp-mode”               gulong

Animation mode to use for the clamp animation.

Flags: Read / Write


The “clamp-to-center” property

  “clamp-to-center”          gboolean

Whether to clamp to step increments based on the center of the page.

Flags: Read / Write

Default value: FALSE


The “deceleration” property

  “deceleration”             gdouble

Rate at which the view will decelerate in.

Flags: Read / Write

Allowed values: >= 1.01

Default value: 1.1


The “mouse-button” property

  “mouse-button”             guint

The mouse button used to control scrolling.

Flags: Read / Write

Default value: 1


The “overshoot” property

  “overshoot”                gdouble

The rate at which the view will decelerate when scrolled beyond its boundaries.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “scroll-policy” property

  “scroll-policy”            MxScrollPolicy

The scroll policy.

Flags: Read / Write

Default value: MX_SCROLL_POLICY_BOTH


The “state” property

  “state”                    MxKineticScrollViewState

State of the scrolling.

Flags: Read

Default value: MX_KINETIC_SCROLL_VIEW_STATE_IDLE


The “use-captured” property

  “use-captured”             gboolean

Use captured events to initiate scrolling.

Flags: Read / Write

Default value: FALSE