Clutter Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
enum ClutterTableAlignment; struct ClutterTableLayout; struct ClutterTableLayoutClass; ClutterLayoutManager * clutter_table_layout_new (void
); void clutter_table_layout_set_row_spacing (ClutterTableLayout *layout
,guint spacing
); guint clutter_table_layout_get_row_spacing (ClutterTableLayout *layout
); void clutter_table_layout_set_column_spacing (ClutterTableLayout *layout
,guint spacing
); guint clutter_table_layout_get_column_spacing (ClutterTableLayout *layout
); gint clutter_table_layout_get_row_count (ClutterTableLayout *layout
); gint clutter_table_layout_get_column_count (ClutterTableLayout *layout
); void clutter_table_layout_pack (ClutterTableLayout *layout
,ClutterActor *actor
,gint column
,gint row
); void clutter_table_layout_set_alignment (ClutterTableLayout *layout
,ClutterActor *actor
,ClutterTableAlignment x_align
,ClutterTableAlignment y_align
); void clutter_table_layout_get_alignment (ClutterTableLayout *layout
,ClutterActor *actor
,ClutterTableAlignment *x_align
,ClutterTableAlignment *y_align
); void clutter_table_layout_set_expand (ClutterTableLayout *layout
,ClutterActor *actor
,gboolean x_expand
,gboolean y_expand
); void clutter_table_layout_get_expand (ClutterTableLayout *layout
,ClutterActor *actor
,gboolean *x_expand
,gboolean *y_expand
); void clutter_table_layout_set_fill (ClutterTableLayout *layout
,ClutterActor *actor
,gboolean x_fill
,gboolean y_fill
); void clutter_table_layout_get_fill (ClutterTableLayout *layout
,ClutterActor *actor
,gboolean *x_fill
,gboolean *y_fill
); void clutter_table_layout_get_span (ClutterTableLayout *layout
,ClutterActor *actor
,gint *column_span
,gint *row_span
); void clutter_table_layout_set_span (ClutterTableLayout *layout
,ClutterActor *actor
,gint column_span
,gint row_span
); void clutter_table_layout_set_use_animations (ClutterTableLayout *layout
,gboolean animate
); gboolean clutter_table_layout_get_use_animations (ClutterTableLayout *layout
); void clutter_table_layout_set_easing_duration (ClutterTableLayout *layout
,guint msecs
); guint clutter_table_layout_get_easing_duration (ClutterTableLayout *layout
); void clutter_table_layout_set_easing_mode (ClutterTableLayout *layout
,gulong mode
); gulong clutter_table_layout_get_easing_mode (ClutterTableLayout *layout
);
"column-spacing" guint : Read / Write "easing-duration" guint : Read / Write "easing-mode" gulong : Read / Write "row-spacing" guint : Read / Write "use-animations" gboolean : Read / Write
The ClutterTableLayout is a ClutterLayoutManager implementing the following layout policy:
children are arranged in a table
each child specifies the specific row and column cell to appear;
a child can also set a span, and this way, take more than one cell both horizontally and vertically;
each child will be allocated to its natural size or, if set to expand, the available size;
if a child is set to fill on either (or both) axis, its allocation will match all the available size; the fill layout property only makes sense if the expand property is also set;
if a child is set to expand but not to fill then it is possible to control the alignment using the horizontal and vertical alignment layout properties.
It is possible to control the spacing between children of a
ClutterTableLayout by using clutter_table_layout_set_row_spacing()
and clutter_table_layout_set_column_spacing()
.
In order to set the layout properties when packing an actor inside a
ClutterTableLayout you should use the clutter_table_layout_pack()
function.
A ClutterTableLayout can use animations to transition between different values of the layout management properties; the easing mode and duration used for the animations are controlled by the "easing-mode" and "easing-duration" properties and their accessor functions.
ClutterTableLayout is available since Clutter 1.4
typedef enum { CLUTTER_TABLE_ALIGNMENT_START, CLUTTER_TABLE_ALIGNMENT_CENTER, CLUTTER_TABLE_ALIGNMENT_END } ClutterTableAlignment;
The alignment policies available on each axis of the ClutterTableLayout
Align the child to the top or to the left of a cell in the table, depending on the axis | |
Align the child to the center of a cell in the table | |
Align the child to the bottom or to the right of a cell in the table, depending on the axis |
Since 1.4
struct ClutterTableLayout;
The ClutterTableLayout structure contains only private data and should be accessed using the provided API
Since 1.4
struct ClutterTableLayoutClass { };
The ClutterTableLayoutClass structure contains only private data and should be accessed using the provided API
Since 1.4
ClutterLayoutManager * clutter_table_layout_new (void
);
Creates a new ClutterTableLayout layout manager
Returns : |
the newly created ClutterTableLayout |
Since 1.4
void clutter_table_layout_set_row_spacing (ClutterTableLayout *layout
,guint spacing
);
Sets the spacing between rows of layout
|
a ClutterTableLayout |
|
the spacing between rows of the layout, in pixels |
Since 1.4
guint clutter_table_layout_get_row_spacing
(ClutterTableLayout *layout
);
Retrieves the spacing set using clutter_table_layout_set_row_spacing()
|
a ClutterTableLayout |
Returns : |
the spacing between rows of the ClutterTableLayout |
Since 1.4
void clutter_table_layout_set_column_spacing (ClutterTableLayout *layout
,guint spacing
);
Sets the spacing between columns of layout
|
a ClutterTableLayout |
|
the spacing between columns of the layout, in pixels |
Since 1.4
guint clutter_table_layout_get_column_spacing
(ClutterTableLayout *layout
);
Retrieves the spacing set using clutter_table_layout_set_column_spacing()
|
a ClutterTableLayout |
Returns : |
the spacing between columns of the ClutterTableLayout |
Since 1.4
gint clutter_table_layout_get_row_count (ClutterTableLayout *layout
);
Retrieve the current number rows in the layout
|
A ClutterTableLayout |
Returns : |
the number of rows |
Since 1.4
gint clutter_table_layout_get_column_count
(ClutterTableLayout *layout
);
Retrieve the current number of columns in layout
|
A ClutterTableLayout |
Returns : |
the number of columns |
Since 1.4
void clutter_table_layout_pack (ClutterTableLayout *layout
,ClutterActor *actor
,gint column
,gint row
);
Packs actor
inside the ClutterContainer associated to layout
at the given row and column.
|
a ClutterTableLayout |
|
a ClutterActor |
|
the column the actor should be put, or -1 to append |
|
the row the actor should be put, or -1 to append |
Since 1.4
void clutter_table_layout_set_alignment (ClutterTableLayout *layout
,ClutterActor *actor
,ClutterTableAlignment x_align
,ClutterTableAlignment y_align
);
Sets the horizontal and vertical alignment policies for actor
inside layout
|
a ClutterTableLayout |
|
a ClutterActor child of layout
|
|
Horizontal alignment policy for actor
|
|
Vertical alignment policy for actor
|
Since 1.4
void clutter_table_layout_get_alignment (ClutterTableLayout *layout
,ClutterActor *actor
,ClutterTableAlignment *x_align
,ClutterTableAlignment *y_align
);
Retrieves the horizontal and vertical alignment policies for actor
as set using clutter_table_layout_pack()
or
clutter_table_layout_set_alignment()
.
|
a ClutterTableLayout |
|
a ClutterActor child of layout
|
|
return location for the horizontal alignment policy. [out] |
|
return location for the vertical alignment policy. [out] |
Since 1.4
void clutter_table_layout_set_expand (ClutterTableLayout *layout
,ClutterActor *actor
,gboolean x_expand
,gboolean y_expand
);
Sets the horizontal and vertical expand policies for actor
inside layout
|
a ClutterTableLayout |
|
a ClutterActor child of layout
|
|
whether actor should allocate extra space horizontally |
|
whether actor should allocate extra space vertically |
Since 1.4
void clutter_table_layout_get_expand (ClutterTableLayout *layout
,ClutterActor *actor
,gboolean *x_expand
,gboolean *y_expand
);
Retrieves the horizontal and vertical expand policies for actor
as set using clutter_table_layout_pack()
or clutter_table_layout_set_expand()
|
a ClutterTableLayout |
|
a ClutterActor child of layout
|
|
return location for the horizontal expand policy. [out] |
|
return location for the vertical expand policy. [out] |
Since 1.4
void clutter_table_layout_set_fill (ClutterTableLayout *layout
,ClutterActor *actor
,gboolean x_fill
,gboolean y_fill
);
Sets the horizontal and vertical fill policies for actor
inside layout
|
a ClutterTableLayout |
|
a ClutterActor child of layout
|
|
whether actor should fill horizontally the allocated space |
|
whether actor should fill vertically the allocated space |
Since 1.4
void clutter_table_layout_get_fill (ClutterTableLayout *layout
,ClutterActor *actor
,gboolean *x_fill
,gboolean *y_fill
);
Retrieves the horizontal and vertical fill policies for actor
as set using clutter_table_layout_pack()
or clutter_table_layout_set_fill()
|
a ClutterTableLayout |
|
a ClutterActor child of layout
|
|
return location for the horizontal fill policy. [out] |
|
return location for the vertical fill policy. [out] |
Since 1.4
void clutter_table_layout_get_span (ClutterTableLayout *layout
,ClutterActor *actor
,gint *column_span
,gint *row_span
);
Retrieves the row and column span for actor
as set using
clutter_table_layout_pack()
or clutter_table_layout_set_span()
|
a ClutterTableLayout |
|
a ClutterActor child of layout
|
|
return location for the col span. [out] |
|
return location for the row span. [out] |
Since 1.4
void clutter_table_layout_set_span (ClutterTableLayout *layout
,ClutterActor *actor
,gint column_span
,gint row_span
);
Sets the row and column span for actor
inside layout
|
a ClutterTableLayout |
|
a ClutterActor child of layout
|
|
Column span for actor
|
|
Row span for actor
|
Since 1.4
void clutter_table_layout_set_use_animations (ClutterTableLayout *layout
,gboolean animate
);
Sets whether layout
should animate changes in the layout properties
The duration of the animations is controlled by
clutter_table_layout_set_easing_duration()
; the easing mode to be used
by the animations is controlled by clutter_table_layout_set_easing_mode()
|
a ClutterTableLayout |
|
TRUE if the layout should use animations |
Since 1.4
gboolean clutter_table_layout_get_use_animations
(ClutterTableLayout *layout
);
Retrieves whether layout
should animate changes in the layout properties
Since clutter_table_layout_set_use_animations()
|
a ClutterTableLayout |
Returns : |
TRUE if the animations should be used, FALSE otherwise |
Since 1.4
void clutter_table_layout_set_easing_duration (ClutterTableLayout *layout
,guint msecs
);
Sets the duration of the animations used by layout
when animating changes
in the layout properties
Use clutter_table_layout_set_use_animations()
to enable and disable the
animations
|
a ClutterTableLayout |
|
the duration of the animations, in milliseconds |
Since 1.4
guint clutter_table_layout_get_easing_duration
(ClutterTableLayout *layout
);
Retrieves the duration set using clutter_table_layout_set_easing_duration()
|
a ClutterTableLayout |
Returns : |
the duration of the animations, in milliseconds |
Since 1.4
void clutter_table_layout_set_easing_mode (ClutterTableLayout *layout
,gulong mode
);
Sets the easing mode to be used by layout
when animating changes in layout
properties
Use clutter_table_layout_set_use_animations()
to enable and disable the
animations
|
a ClutterTableLayout |
|
an easing mode, either from ClutterAnimationMode or a logical id
from clutter_alpha_register_func()
|
Since 1.4
gulong clutter_table_layout_get_easing_mode
(ClutterTableLayout *layout
);
Retrieves the easing mode set using clutter_table_layout_set_easing_mode()
|
a ClutterTableLayout |
Returns : |
an easing mode |
Since 1.4
"column-spacing"
property"column-spacing" guint : Read / Write
The spacing between columns of the ClutterTableLayout, in pixels
Default value: 0
Since 1.4
"easing-duration"
property"easing-duration" guint : Read / Write
The duration of the animations, in case "use-animations"
is set to TRUE
The duration is expressed in milliseconds
Default value: 500
Since 1.4
"easing-mode"
property"easing-mode" gulong : Read / Write
The easing mode for the animations, in case
"use-animations" is set to TRUE
The easing mode has the same semantics of "mode": it can
either be a value from the ClutterAnimationMode enumeration, like
CLUTTER_EASE_OUT_CUBIC
, or a logical id as returned by
clutter_alpha_register_func()
The default value is CLUTTER_EASE_OUT_CUBIC
Since 1.4
"row-spacing"
property"row-spacing" guint : Read / Write
The spacing between rows of the ClutterTableLayout, in pixels
Default value: 0
Since 1.4
"use-animations"
property"use-animations" gboolean : Read / Write
Whether the ClutterTableLayout should animate changes in the layout properties
Default value: FALSE
Since 1.4