MxScrollView

MxScrollView — a container for scrollable children

Functions

Properties

gboolean enable-gestures Read / Write
gboolean enable-mouse-scrolling Read / Write
MxScrollPolicy scroll-policy Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MxWidget
                ╰── MxBin
                    ╰── MxScrollView

Implemented Interfaces

MxScrollView implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable and MxFocusable.

Description

MxScrollView is a single child container for actors that implement MxScrollable. It provides scrollbars around the edge of the child to allow the user to move around the scrollable area.

Figure 9. MxScrollView around an MxBoxLayout

An example of an MxScrollView wrapped around an MxBoxLayout actor (which implements MxScrollable). The MxBoxLayout contains nine ClutterRectangle instances, but the stage is too small for all of them to be visible. The MxScrollView adds the appropriate horizontal scroll, which makes it possible to scroll to the end of the row of rectangles.

MxScrollView around an MxBoxLayout

Functions

mx_scroll_view_new ()

ClutterActor *
mx_scroll_view_new (void);

mx_scroll_view_set_enable_mouse_scrolling ()

void
mx_scroll_view_set_enable_mouse_scrolling
                               (MxScrollView *scroll,
                                gboolean enabled);

mx_scroll_view_get_enable_mouse_scrolling ()

gboolean
mx_scroll_view_get_enable_mouse_scrolling
                               (MxScrollView *scroll);

mx_scroll_view_set_enable_gestures ()

void
mx_scroll_view_set_enable_gestures (MxScrollView *scroll,
                                    gboolean enabled);

mx_scroll_view_get_enable_gestures ()

gboolean
mx_scroll_view_get_enable_gestures (MxScrollView *scroll);

mx_scroll_view_set_scroll_policy ()

void
mx_scroll_view_set_scroll_policy (MxScrollView *scroll,
                                  MxScrollPolicy policy);

mx_scroll_view_get_scroll_policy ()

MxScrollPolicy
mx_scroll_view_get_scroll_policy (MxScrollView *scroll);

mx_scroll_view_ensure_visible ()

void
mx_scroll_view_ensure_visible (MxScrollView *scroll,
                               const ClutterGeometry *geometry);

Ensures that a given region is visible in the ScrollView, with the top-left taking precedence.

Parameters

scroll

A MxScrollView

 

geometry

The region to make visible

 

Types and Values

struct MxScrollView

struct MxScrollView;

The contents of this structure are private and should only be accessed through the public API.


struct MxScrollViewClass

struct MxScrollViewClass {
  MxBinClass parent_class;

  /* padding for future expansion */
  void (*_padding_0) (void);
  void (*_padding_1) (void);
  void (*_padding_2) (void);
  void (*_padding_3) (void);
  void (*_padding_4) (void);
};

Property Details

The “enable-gestures” property

  “enable-gestures”          gboolean

Enable use of pointer gestures for scrolling if Mx was built with ClutterGesture support.

Owner: MxScrollView

Flags: Read / Write

Default value: FALSE


The “enable-mouse-scrolling” property

  “enable-mouse-scrolling”   gboolean

Enable automatic mouse wheel scrolling.

Owner: MxScrollView

Flags: Read / Write

Default value: TRUE


The “scroll-policy” property

  “scroll-policy”            MxScrollPolicy

The scroll policy.

Owner: MxScrollView

Flags: Read / Write

Default value: MX_SCROLL_POLICY_BOTH