MokoFingerScroll

MokoFingerScroll — A scrolling widget designed for touch screens

Functions

Properties

gdouble deceleration Read / Write / Construct
gboolean enabled Read / Write / Construct
MokoFingerScrollIndicatorMode hindicator-mode Read / Write / Construct
MokoFingerScrollMode mode Read / Write / Construct
guint spring-color Read / Write / Construct
gdouble spring-speed Read / Write / Construct
guint sps Read / Write / Construct
gdouble velocity-max Read / Write / Construct
gdouble velocity-min Read / Write / Construct
MokoFingerScrollIndicatorMode vindicator-mode Read / Write / Construct

Types and Values

Object Hierarchy

    GEnum
    ├── MokoFingerScrollIndicatorMode
    ╰── MokoFingerScrollMode
    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkEventBox
                            ╰── MokoFingerScroll

Implemented Interfaces

MokoFingerScroll implements AtkImplementorIface and GtkBuildable.

Description

MokoFingerScroll implements a scrolled window designed to be used with a touch screen interface. The user scrolls the child widget by activating the pointing device and dragging it over the widget.

Functions

moko_finger_scroll_new ()

GtkWidget *
moko_finger_scroll_new (void);

Create a new finger scroll widget

Returns

the newly created MokoFingerScroll


moko_finger_scroll_new_full ()

GtkWidget *
moko_finger_scroll_new_full (gint mode,
                             gboolean enabled,
                             gdouble vel_min,
                             gdouble vel_max,
                             gdouble decel,
                             guint sps);

Create a new MokoFingerScroll widget and set various properties

Parameters

mode

MokoFingerScrollMode

 

enabled

Value for the enabled property

 

vel_min

Value for the velocity-min property

 

vel_max

Value for the velocity-max property

 

decel

Value for the deceleration property

 

sps

Value for the sps property

 

Returns

the newly create MokoFingerScrull


moko_finger_scroll_add_with_viewport ()

void
moko_finger_scroll_add_with_viewport (MokoFingerScroll *scroll,
                                      GtkWidget *child);

Convenience function used to add a child to a GtkViewport, and add the viewport to the scrolled window.

Parameters

scroll

A MokoFingerScroll

 

child

Child widget to add to the viewport

 

Types and Values

struct MokoFingerScroll

struct MokoFingerScroll;

MokoFingerScroll has no publicly accessible fields


enum MokoFingerScrollMode

Used to change the behaviour of the finger scrolling

Members

MOKO_FINGER_SCROLL_MODE_PUSH

Scrolling follows pointer

 

MOKO_FINGER_SCROLL_MODE_ACCEL

Scrolling uses physics to "spin" the widget

 

MOKO_FINGER_SCROLL_MODE_AUTO

Automatically chooses between push and accel modes, depending on input.

 

enum MokoFingerScrollIndicatorMode

Members

MOKO_FINGER_SCROLL_INDICATOR_MODE_AUTO

   

MOKO_FINGER_SCROLL_INDICATOR_MODE_SHOW

   

MOKO_FINGER_SCROLL_INDICATOR_MODE_HIDE

   

Property Details

The “deceleration” property

  “deceleration”             gdouble

The multiplier used when decelerating when in acceleration scrolling mode.

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 0.95


The “enabled” property

  “enabled”                  gboolean

Enable or disable finger-scroll.

Flags: Read / Write / Construct

Default value: TRUE


The “hindicator-mode” property

  “hindicator-mode”          MokoFingerScrollIndicatorMode

Mode of the horizontal scrolling indicator.

Flags: Read / Write / Construct

Default value: MOKO_FINGER_SCROLL_INDICATOR_MODE_AUTO


The “mode” property

  “mode”                     MokoFingerScrollMode

Change the finger-scrolling mode.

Flags: Read / Write / Construct

Default value: MOKO_FINGER_SCROLL_MODE_AUTO


The “spring-color” property

  “spring-color”             guint

spring area color.

Flags: Read / Write / Construct

Default value: 4294967295


The “spring-speed” property

  “spring-speed”             gdouble

The multiplier used when decelerating when in spring.

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 0.85


The “sps” property

  “sps”                      guint

Amount of scroll events to generate per second.

Flags: Read / Write / Construct

Default value: 15


The “velocity-max” property

  “velocity-max”             gdouble

Maximum distance the child widget should scroll per 'frame', in pixels.

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 48


The “velocity-min” property

  “velocity-min”             gdouble

Minimum distance the child widget should scroll per 'frame', in pixels.

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0


The “vindicator-mode” property

  “vindicator-mode”          MokoFingerScrollIndicatorMode

Mode of the vertical scrolling indicator.

Flags: Read / Write / Construct

Default value: MOKO_FINGER_SCROLL_INDICATOR_MODE_AUTO

See Also

GtkScrolledWindow