![]() |
![]() |
![]() |
Mx Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
struct MxViewport; struct MxViewportClass; 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
);
GObject +----GInitiallyUnowned +----ClutterActor +----MxWidget +----MxBin +----MxViewport
MxViewport implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable, MxFocusable and MxScrollable.
"sync-adjustments" gboolean : Read / Write "x-origin" gfloat : Read / Write "y-origin" gfloat : Read / Write "z-origin" gfloat : Read / Write
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.
struct MxViewport;
The contents of this structure are private and should only be accessed through the public API.
struct MxViewportClass { 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); };
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
);
"sync-adjustments"
property "sync-adjustments" gboolean : Read / Write
Whether to synchronise adjustments with viewport size.
Default value: TRUE
"x-origin"
property "x-origin" gfloat : Read / Write
Origin's X coordinate in pixels.
Default value: 0
"y-origin"
property "y-origin" gfloat : Read / Write
Origin's Y coordinate in pixels.
Default value: 0