![]() |
![]() |
![]() |
Mx Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
struct MxKineticScrollView; struct MxKineticScrollViewClass; ClutterActor * mx_kinetic_scroll_view_new (void
); void mx_kinetic_scroll_view_stop (MxKineticScrollView *scroll
); void mx_kinetic_scroll_view_set_deceleration (MxKineticScrollView *scroll
,gdouble rate
); gdouble mx_kinetic_scroll_view_get_deceleration (MxKineticScrollView *scroll
); void mx_kinetic_scroll_view_set_use_captured (MxKineticScrollView *scroll
,gboolean use_captured
); gboolean mx_kinetic_scroll_view_get_use_captured (MxKineticScrollView *scroll
); void mx_kinetic_scroll_view_set_mouse_button (MxKineticScrollView *scroll
,guint32 button
); guint32 mx_kinetic_scroll_view_get_mouse_button (MxKineticScrollView *scroll
); void mx_kinetic_scroll_view_set_overshoot (MxKineticScrollView *scroll
,gdouble overshoot
); gdouble mx_kinetic_scroll_view_get_overshoot (MxKineticScrollView *scroll
); void mx_kinetic_scroll_view_set_scroll_policy (MxKineticScrollView *scroll
,MxScrollPolicy policy
); MxScrollPolicy mx_kinetic_scroll_view_get_scroll_policy (MxKineticScrollView *scroll
);
GObject +----GInitiallyUnowned +----ClutterActor +----MxWidget +----MxBin +----MxKineticScrollView
MxKineticScrollView implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable, MxFocusable and MxScrollable.
"acceleration-factor" gdouble : Read / Write "clamp-duration" guint : Read / Write "clamp-mode" gulong : Read / Write "clamp-to-center" gboolean : Read / Write "deceleration" gdouble : Read / Write "mouse-button" guint : Read / Write "overshoot" gdouble : Read / Write "scroll-policy" MxScrollPolicy : Read / Write "state" MxKineticScrollViewState : Read "use-captured" gboolean : Read / Write
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.
struct MxKineticScrollView;
The contents of this structure is private and should only be accessed using the provided API.
ClutterActor * mx_kinetic_scroll_view_new (void
);
Creates a new MxKineticScrollView.
Returns : |
a newly allocated MxKineticScrollView |
Since 1.2
void mx_kinetic_scroll_view_stop (MxKineticScrollView *scroll
);
Stops any current movement due to kinetic scrolling.
|
A MxKineticScrollView |
Since 1.2
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.
|
A MxKineticScrollView |
|
The deceleration rate |
Since 1.2
gdouble mx_kinetic_scroll_view_get_deceleration
(MxKineticScrollView *scroll
);
Retrieves the deceleration rate of the kinetic scroll-view.
|
A MxKineticScrollView |
Returns : |
The deceleration rate of the kinetic scroll-view |
Since 1.2
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.
|
A MxKineticScrollView |
|
TRUE to use captured events |
Since 1.2
gboolean mx_kinetic_scroll_view_get_use_captured
(MxKineticScrollView *scroll
);
Gets the "use-captured" property.
|
A MxKineticScrollView |
Returns : |
TRUE if captured-events should be used to initiate scrolling |
Since 1.2
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.
|
A MxKineticScrollView |
|
A mouse button number |
Since 1.2
guint32 mx_kinetic_scroll_view_get_mouse_button
(MxKineticScrollView *scroll
);
Gets the "mouse-button" property
|
A MxKineticScrollView |
Returns : |
The mouse button number used to initiate drag events on the kinetic scroll-view |
Since 1.2
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()
|
A MxKineticScrollView |
|
The rate at which the view will decelerate when scrolling beyond its boundaries. |
Since 1.2
gdouble mx_kinetic_scroll_view_get_overshoot
(MxKineticScrollView *scroll
);
Retrieves the deceleration rate multiplier used when the scroll-view is scrolling beyond its boundaries.
|
A MxKineticScrollView |
Since 1.2
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.
|
A MxKineticScrollView |
|
A MxScrollPolicy |
MxScrollPolicy mx_kinetic_scroll_view_get_scroll_policy
(MxKineticScrollView *scroll
);
Retrieves the scrolling policy of the kinetic scroll-view.
|
A MxKineticScrollView |
Returns : |
A MxScrollPolicy |
"acceleration-factor"
property "acceleration-factor" gdouble : Read / Write
Factor applied to the initial acceleration.
Allowed values: >= 0
Default value: 1
"clamp-duration"
property "clamp-duration" guint : Read / Write
Duration of the adjustment clamp animation.
Default value: 250
"clamp-mode"
property "clamp-mode" gulong : Read / Write
Animation mode to use for the clamp animation.
"clamp-to-center"
property "clamp-to-center" gboolean : Read / Write
Whether to clamp to step increments based on the center of the page.
Default value: FALSE
"deceleration"
property "deceleration" gdouble : Read / Write
Rate at which the view will decelerate in.
Allowed values: >= 1.01
Default value: 1.1
"mouse-button"
property "mouse-button" guint : Read / Write
The mouse button used to control scrolling.
Default value: 1
"overshoot"
property "overshoot" gdouble : Read / Write
The rate at which the view will decelerate when scrolled beyond its boundaries.
Allowed values: [0,1]
Default value: 0
"scroll-policy"
property"scroll-policy" MxScrollPolicy : Read / Write
The scroll policy.
Default value: MX_SCROLL_POLICY_BOTH
"state"
property "state" MxKineticScrollViewState : Read
State of the scrolling.
Default value: MX_KINETIC_SCROLL_VIEW_STATE_IDLE