GtkClutterViewport

GtkClutterViewport — A scrollable actor

Synopsis

                    GtkClutterViewport;
                    GtkClutterViewportClass;
ClutterActor *      gtk_clutter_viewport_new            (GtkAdjustment *h_adjust,
                                                         GtkAdjustment *v_adjust,
                                                         GtkAdjustment *z_adjust);
void                gtk_clutter_viewport_get_origin     (GtkClutterViewport *viewport,
                                                         gfloat *x,
                                                         gfloat *y,
                                                         gfloat *z);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----GtkClutterViewport

Implemented Interfaces

GtkClutterViewport implements GtkClutterZoomable, GtkClutterScrollable, ClutterScriptable and ClutterContainer.

Properties

  "child"                    ClutterActor*         : Read / Write
  "origin"                   ClutterVertex*        : Read

Description

GtkClutterViewport is a scrollable actor that can contain a single ClutterActor. Using two GtkAdjustments it is possible to control the visible area of the child actor if the size of the viewport is smaller than the size of the child.

The GtkAdjustments used to control the horizontal and vertical scrolling can be attached to a GtkScrollbar subclass, like GtkHScrollbar or GtkVScrollbar.

The GtkClutterViewport can be used inside any ClutterContainer implementation.

GtkClutterViewport is available since Clutter-GTK 0.10

Details

GtkClutterViewport

typedef struct _GtkClutterViewport GtkClutterViewport;

The GtkClutterViewport structure contains only private data and should be accessed using the provided functions.

Since 0.8.2


GtkClutterViewportClass

typedef struct {
} GtkClutterViewportClass;

The GtkClutterViewportClass structure contains only private data and should be accessed using the provided functions.

Since 0.8.2


gtk_clutter_viewport_new ()

ClutterActor *      gtk_clutter_viewport_new            (GtkAdjustment *h_adjust,
                                                         GtkAdjustment *v_adjust,
                                                         GtkAdjustment *z_adjust);

Creates a new GtkClutterViewport with the given adjustments.

h_adjust :

horizontal adjustment, or NULL

v_adjust :

vertical adjustment, or NULL

z_adjust :

zoom adjustment, or NULL

Returns :

the newly created viewport actor

Since 0.10


gtk_clutter_viewport_get_origin ()

void                gtk_clutter_viewport_get_origin     (GtkClutterViewport *viewport,
                                                         gfloat *x,
                                                         gfloat *y,
                                                         gfloat *z);

Retrieves the current translation factor ("origin") used when displaying the child of viewport.

viewport :

a GtkClutterViewport

x :

return location for the X origin in pixels, or NULL

y :

return location for the Y origin in pixels, or NULL

z :

return location for the Z origin in pixels, or NULL

Since 0.10

Property Details

The "child" property

  "child"                    ClutterActor*         : Read / Write

The ClutterActor inside the viewport.

Since 0.10


The "origin" property

  "origin"                   ClutterVertex*        : Read

The current origin of the viewport. You should use the vertex to convert event coordinates for the child of the viewport.

Since 0.10