MxViewport

## MxViewport MxViewport — single child scrollable container |

## Synopsis

    struct              MxViewport;
    ClutterActor *      mx_viewport_new                     (void);
    void                mx_viewport_set_origin              (MxViewport *viewport,
                                                             gfloat x,
                                                             gfloat y,
                                                             gfloat z);
    void                mx_viewport_get_origin              (MxViewport *viewport,
                                                             gfloat *x,
                                                             gfloat *y,
                                                             gfloat *z);
    void                mx_viewport_set_sync_adjustments    (MxViewport *viewport,
                                                             gboolean sync);
    gboolean            mx_viewport_get_sync_adjustments    (MxViewport *viewport);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----MxWidget
                         +----MxBin
                               +----MxViewport

## Implemented Interfaces

MxViewport implements ClutterScriptable, MxStylable, ClutterContainer, MxFocusable and MxScrollable.

## Properties

      "sync-adjustments"         gboolean              : Read / Write
      "x-origin"                 gfloat                : Read / Write
      "y-origin"                 gfloat                : Read / Write
      "z-origin"                 gfloat                : Read / Write

## Description

MxViewport allows non-scrollable children (like images or text) to be scrollable by implementing the MxScrollable and ClutterContainer interface.

To use it, add the non-scrollable child to an MxViewport; then sit the viewport inside an MxScrollView to get the scrollbars.

Figure 11. MxViewport around an MxLabel

An example of a large label (which isn't normally scrollable), placed inside an MxViewport, which is in turn inside an MxScrollView.

Do not use MxViewport if you need good performance as it does can not be selective about the area of its child that is painted/picked. Therefore if the child is very large or contains a lot of children, you will experience poor performance.

## Details

### struct MxViewport

    struct MxViewport;

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

### mx_viewport_new ()

    ClutterActor *      mx_viewport_new                     (void);

Returns : |

### mx_viewport_set_origin ()

    void                mx_viewport_set_origin              (MxViewport *viewport,
                                                             gfloat x,
                                                             gfloat y,
                                                             gfloat z);

`viewport` : |
`x` : |
`y` : |
`z` : |

### mx_viewport_get_origin ()

    void                mx_viewport_get_origin              (MxViewport *viewport,
                                                             gfloat *x,
                                                             gfloat *y,
                                                             gfloat *z);

`viewport` : |
`x` : |
`y` : |
`z` : |

### mx_viewport_set_sync_adjustments ()

    void                mx_viewport_set_sync_adjustments    (MxViewport *viewport,
                                                             gboolean sync);

`viewport` : |
`sync` : |

### mx_viewport_get_sync_adjustments ()

    gboolean            mx_viewport_get_sync_adjustments    (MxViewport *viewport);

`viewport` : |
Returns : |

## Property Details

### The `"sync-adjustments"` property

      "sync-adjustments"         gboolean              : Read / Write

Whether to synchronise adjustments with viewport size.

Default value: TRUE

### The `"x-origin"` property

      "x-origin"                 gfloat                : Read / Write

Origin's X coordinate in pixels.

Default value: 0

### The `"y-origin"` property

      "y-origin"                 gfloat                : Read / Write

Origin's Y coordinate in pixels.

Default value: 0

### The `"z-origin"` property

      "z-origin"                 gfloat                : Read / Write

Origin's Z coordinate in pixels.

Default value: 0