![]() |
![]() |
![]() |
xmlroff Reference Manual | ![]() |
---|---|---|---|---|
FoArea; FoAreaClass; FoArea* fo_area_new (void); FoArea* fo_area_get_page (FoArea *fo_area); FoArea* fo_area_get_reference (FoArea *fo_area); FoArea* fo_area_get_page_sequence (FoArea *fo_area); gboolean fo_area_get_is_first (FoArea *fo_area); gboolean fo_area_get_is_last (FoArea *fo_area); gfloat fo_area_get_next_x (FoArea *fo_area); void fo_area_set_next_x (FoArea *fo_area, gfloat new_next_x); gfloat fo_area_get_next_y (FoArea *fo_area); void fo_area_set_next_y (FoArea *fo_area, gfloat new_next_y); gfloat fo_area_get_available_width (FoArea *fo_area); void fo_area_set_available_width (FoArea *fo_area, gfloat new_available_width); gfloat fo_area_get_available_height (FoArea *fo_area); void fo_area_set_available_height (FoArea *fo_area, gfloat new_available_height); gfloat fo_area_get_child_available_ipdim (FoArea *fo_area); void fo_area_set_child_available_ipdim (FoArea *fo_area, gfloat new_child_available_ipdim); gfloat fo_area_get_child_available_bpdim (FoArea *fo_area); void fo_area_set_child_available_bpdim (FoArea *fo_area, gfloat new_child_available_bpdim); FoFo* fo_area_get_generated_by (FoArea *fo_area); void fo_area_set_generated_by (FoArea *fo_area, FoFo *new_fo); FoArea* fo_area_add_child (FoArea *parent, FoArea *child); FoArea* fo_area_size_request (FoArea *child); void fo_area_debug_dump_properties (FoArea *area, gint depth); void fo_area_border_padding_space_resolve (FoArea *parent_area, FoArea *child_area); FoArea* fo_area_break_resolve (FoArea *parent_area, FoArea *new_area); void fo_area_set_height_from_children (FoArea *parent_area); FoArea* fo_area_clone (FoArea *original); void fo_area_update_after_clone (FoArea *clone, FoArea *original); FoArea* fo_area_split_before_height (FoArea *area, gfloat height); gboolean fo_area_split_before_height_check (FoArea *area, gfloat height); void fo_area_resolve_text_align (FoArea *area); gboolean (*FoAreaTraverseFunc) (FoArea *area, gpointer data); void (*FoAreaForeachFunc) (FoArea *area, gpointer data); #define FO_AREA_IS_ROOT (area) #define FO_AREA_IS_LEAF (area) FoArea* fo_area_insert (FoArea *parent, gint position, FoArea *area); FoArea* fo_area_insert_before (FoArea *parent, FoArea *sibling, FoArea *area); FoArea* fo_area_insert_after (FoArea *parent, FoArea *sibling, FoArea *area); FoArea* fo_area_prepend (FoArea *parent, FoArea *area); guint fo_area_n_areas (FoArea *root, GTraverseFlags flags); FoArea* fo_area_get_root (FoArea *area); gboolean fo_area_is_ancestor (FoArea *area, FoArea *descendant); guint fo_area_depth (FoArea *area); FoArea* fo_area_append (FoArea *parent, FoArea *area); void fo_area_traverse (FoArea *root, GTraverseType order, GTraverseFlags flags, gint max_depth, FoAreaTraverseFunc func, gpointer data); guint fo_area_max_height (FoArea *root); void fo_area_children_foreach (FoArea *area, GTraverseFlags flags, FoAreaForeachFunc func, gpointer data); void fo_area_reverse_children (FoArea *area); guint fo_area_n_children (FoArea *area); FoArea* fo_area_nth_child (FoArea *area, guint n); FoArea* fo_area_last_child (FoArea *area); guint fo_area_child_position (FoArea *area, FoArea *child); FoArea* fo_area_first_sibling (FoArea *area); FoArea* fo_area_last_sibling (FoArea *area); FoArea* fo_area_prev_sibling (FoArea *area); FoArea* fo_area_next_sibling (FoArea *area); FoArea* fo_area_first_child (FoArea *area); FoArea* fo_area_parent (FoArea *area); void fo_area_unlink (FoArea *area); void fo_area_unlink_with_next_siblings (FoArea *area); FoArea* fo_area_insert_with_next_siblings (FoArea *parent, gint position, FoArea *area);
"available-height" gfloat : Read / Write "available-width" gfloat : Read / Write "child-available-bpdim" gfloat : Read / Write "child-available-ipdim" gfloat : Read / Write "generated-by" FoFo* : Read / Write "is-first" gboolean : Read "is-last" gboolean : Read "next-x" gfloat : Read / Write "next-y" gfloat : Read / Write "page" FoArea* : Read "page-sequence" FoFo* : Read / Write
typedef struct _FoAreaClass FoAreaClass;
Class structure for the base class for area objects.
FoArea* fo_area_new (void);
Creates a new FoArea initialized to default value.
Returns : |
the new FoArea |
FoArea* fo_area_get_page (FoArea *fo_area);
Gets the page property of area
|
The FoArea object
|
Returns : |
The "page" property value |
FoArea* fo_area_get_reference (FoArea *fo_area);
Gets the reference property of area
|
The FoArea object
|
Returns : |
The "reference" property value |
FoArea* fo_area_get_page_sequence (FoArea *fo_area);
Gets the page_sequence property of area
|
The FoArea object
|
Returns : |
The "page-sequence" property value |
gboolean fo_area_get_is_first (FoArea *fo_area);
Gets the is_first property of area
|
The FoArea object
|
Returns : |
The "is-first" property value |
gboolean fo_area_get_is_last (FoArea *fo_area);
Gets the is_last property of area
|
The FoArea object
|
Returns : |
The "is-last" property value |
gfloat fo_area_get_next_x (FoArea *fo_area);
Gets the next_x property of area
|
The FoArea object
|
Returns : |
The "next_x" property value |
void fo_area_set_next_x (FoArea *fo_area, gfloat new_next_x);
Sets the next-x property of area
to new_next_x
|
The FoArea object
|
|
The new "next_x" property value |
gfloat fo_area_get_next_y (FoArea *fo_area);
Gets the "next_y" property of area
|
The FoArea object
|
Returns : |
The "next-y" property value |
void fo_area_set_next_y (FoArea *fo_area, gfloat new_next_y);
Sets the next-y property of area
to new_next_y
|
The FoArea object
|
|
The new "next-y" property value |
gfloat fo_area_get_available_width (FoArea *fo_area);
Gets the "available-width" property of area
|
The FoArea object
|
Returns : |
The "available-width" property value |
void fo_area_set_available_width (FoArea *fo_area, gfloat new_available_width);
Sets the "available-width" property of area
to new_available_width
|
The FoArea object
|
|
The new "available-width" property value |
gfloat fo_area_get_available_height (FoArea *fo_area);
Gets the available-height property of area
|
The FoArea object
|
Returns : |
The "available_height" property value |
void fo_area_set_available_height (FoArea *fo_area, gfloat new_available_height);
Sets the available-height property of area
to new_available_height
|
The FoArea object
|
|
The new "available-height" property value |
gfloat fo_area_get_child_available_ipdim (FoArea *fo_area);
Gets the "child-available-ipdim" property of area
|
The FoArea object
|
Returns : |
The "child-available-ipdim" property value |
void fo_area_set_child_available_ipdim (FoArea *fo_area, gfloat new_child_available_ipdim);
Sets the "child-available-ipdim" property of area
to
new_child_available_ipdim
|
The FoArea object
|
|
The new "child-available-ipdim" property value |
gfloat fo_area_get_child_available_bpdim (FoArea *fo_area);
Gets the "child-available-bpdim" property of area
|
The FoArea object
|
Returns : |
The "child-available-bpdim" property value |
void fo_area_set_child_available_bpdim (FoArea *fo_area, gfloat new_child_available_bpdim);
Sets the "child-available-bpdim" property of area
to
new_child_available_bpdim
|
The FoArea object
|
|
The new "child-available-bpdim" property value |
FoFo* fo_area_get_generated_by (FoArea *fo_area);
Gets the generated-by property of area
|
The FoArea object
|
Returns : |
The "generated-by" property value |
void fo_area_set_generated_by (FoArea *fo_area, FoFo *new_fo);
Sets the generated-by property of area
to new_fo
|
The FoArea object
|
|
The new "generated-by" property value |
FoArea* fo_area_add_child (FoArea *parent, FoArea *child);
Add child
to parent
by calling the _add_child()
function for
parent
.
|
Parent area node |
|
Child area node |
Returns : |
child
|
FoArea* fo_area_size_request (FoArea *child);
Checks that the parent area of child
has sufficient space for
child
. If not enough space, requests that the parent has
sufficient space allocated for it, then adjusts child
and its
siblings as necessary to fit into the resized parent area.
You should call #fo_area_size_request()
immediately after adding
an area to the area tree or making a change to the area's height.
The child area's requested height is taken from the area's height property value. Its requested width is taken from its width property value.
The height allocated to the area is set in the area's available_height property value. Its width allocation is set in its available_width property value.
Immediately after calling this function, the child area should set its height and width according to the available_height and available_width property values. How the child area resolves any difference between the available height and width and the height and width that it needs is up to the child area to work out.
The child area's x and y property values may also have been adjusted, but a child area doesn't set its own x and y property values anyway.
The area that is returned may be a different area object than the child area that is passed as the argument to this function. For example, the parent area may not have been large enough to contain the child area at its requested height, and the child area, the parent area, and all ancestor areas up to an FoAreaPage may have been split (possibly more than once) and the overflow placed on one or more new pages.
|
Child area |
Returns : |
Pointer to the last area generated from child after
any reallocation and resizing
|
void fo_area_debug_dump_properties (FoArea *area, gint depth);
Dump the properties of area
.
|
The FoArea object |
|
Indent level to add to the output |
void fo_area_border_padding_space_resolve (FoArea *parent_area, FoArea *child_area);
Resolves the border, padding, and space properties of child_area
.
|
Parent area of child_area .
|
|
FoArea for which to resolve properties. |
FoArea* fo_area_break_resolve (FoArea *parent_area, FoArea *new_area);
Resolves the break properties of new_area
, which may result in
new_area
being split into multiple areas.
|
Parent area of new_area .
|
|
FoArea for which to resolve breaks. |
Returns : |
Last area resulting from resolving breaks. |
void fo_area_set_height_from_children (FoArea *parent_area);
|
FoArea* fo_area_clone (FoArea *original);
Make a clone of original
and insert the clone after original
in
the area tree. Set instance properties of the clone to match
original
.
|
Area object to be cloned. |
Returns : |
Clone of original .
|
void fo_area_update_after_clone (FoArea *clone, FoArea *original);
Update the instance variables of clone
to match those of original
.
|
New object cloned from original .
|
|
Original area object. |
FoArea* fo_area_split_before_height (FoArea *area, gfloat height);
Split area
at or before height
.
|
FoArea to be split |
|
Maximum block-progression-dimension of area
|
Returns : |
The part of area spit from area , or NULL if unsplit.
|
gboolean fo_area_split_before_height_check (FoArea *area, gfloat height);
Check whether area
can split at or before height
.
|
FoArea to be split |
|
Maximum block-progression-dimension of area
|
Returns : |
TRUE if can split, otherwise FALSE. |
void fo_area_resolve_text_align (FoArea *area);
Resolves the text alignment value for area
and its descendants.
|
FoArea for which to resolve text alignment. |
gboolean (*FoAreaTraverseFunc) (FoArea *area, gpointer data);
|
|
|
|
Returns : |
FoArea* fo_area_insert (FoArea *parent, gint position, FoArea *area);
|
|
|
|
|
|
Returns : |
FoArea* fo_area_insert_before (FoArea *parent, FoArea *sibling, FoArea *area);
|
|
|
|
|
|
Returns : |
FoArea* fo_area_insert_after (FoArea *parent, FoArea *sibling, FoArea *area);
|
|
|
|
|
|
Returns : |
FoArea* fo_area_prepend (FoArea *parent, FoArea *area);
Inserts a FoArea as the first child of the given parent and updates the inserted FoArea.
guint fo_area_n_areas (FoArea *root, GTraverseFlags flags);
Gets the number of nodes in a tree.
|
a FoArea. |
|
which types of children are to be counted, one of
G_TRAVERSE_ALL , G_TRAVERSE_LEAFS and
G_TRAVERSE_NON_LEAFS .
|
Returns : |
the number of nodes in the tree. |
gboolean fo_area_is_ancestor (FoArea *area, FoArea *descendant);
|
|
|
|
Returns : |
guint fo_area_depth (FoArea *area);
Gets the depth of a FoArea.
If area
is NULL
the depth is 0. The root node has a depth of 1. For
the children of the root node the depth is 2. And so on.
FoArea* fo_area_append (FoArea *parent, FoArea *area);
Inserts a FoArea as the last child of the given parent and updates the inserted FoArea.
void fo_area_traverse (FoArea *root, GTraverseType order, GTraverseFlags flags, gint max_depth, FoAreaTraverseFunc func, gpointer data);
|
|
|
|
|
|
|
|
|
|
|
guint fo_area_max_height (FoArea *root);
Gets the maximum height of all branches beneath a FoArea. This is the maximum distance from the FoArea to all leaf nodes.
If root
is NULL
, 0 is returned. If root
has no children, 1 is
returned. If root
has children, 2 is returned. And so on.
|
Root node of a FoArea tree. |
Returns : |
the maximum height of the tree beneath root .
|
void fo_area_children_foreach (FoArea *area, GTraverseFlags flags, FoAreaForeachFunc func, gpointer data);
Calls a function for each of the children of a FoArea. Note that it doesn't descend beneath the child nodes.
|
a FoArea. |
|
which types of children are to be visited, one of
G_TRAVERSE_ALL , G_TRAVERSE_LEAFS and
G_TRAVERSE_NON_LEAFS .
|
|
the function to call for each visited node. |
|
user data to pass to the function. |
void fo_area_reverse_children (FoArea *area);
Reverses the order of the children of a FoArea. (It doesn't change the order of the grandchildren.)
|
a FoArea. |
guint fo_area_n_children (FoArea *area);
Gets the number of children of a FoArea.
|
a FoArea. |
Returns : |
the number of children of area .
|
FoArea* fo_area_nth_child (FoArea *area, guint n);
Gets a child of a FoArea, using the given index. The first child
is at index 0. If the index is too big, NULL
is returned.
|
a FoArea. |
|
the index of the desired child. |
Returns : |
the child of area at index n .
|
guint fo_area_child_position (FoArea *area, FoArea *child);
Gets the position of a FoArea with respect to its siblings. child
must be a child of area
. The first child is numbered 0, the second
1, and so on.
|
a FoArea. |
|
a child of area .
|
Returns : |
the position of child with respect to its siblings.
|
FoArea* fo_area_first_sibling (FoArea *area);
Gets the first sibling of a FoArea. This could possibly be the node itself.
|
a FoArea. |
Returns : |
the first sibling of area .
|
FoArea* fo_area_last_sibling (FoArea *area);
Gets the last sibling of a FoArea. This could possibly be the node itself.
|
a FoArea. |
Returns : |
the last sibling of area .
|
FoArea* fo_area_prev_sibling (FoArea *area);
Gets the previous sibling of a FoArea.
FoArea* fo_area_next_sibling (FoArea *area);
Gets the next sibling of a FoArea.
FoArea* fo_area_first_child (FoArea *area);
Gets the first child of a FoArea.
void fo_area_unlink (FoArea *area);
Unlinks an FoArea from an FoArea tree, resulting in two separate trees.
|
the FoArea to unlink, which becomes the root of a new tree. |
void fo_area_unlink_with_next_siblings (FoArea *area);
Unlinks area
and its following siblings.
|
First FoArea to unlink. |
"available-height"
property"available-height" gfloat : Read / Write
Height available to child areas.
Default value: 0
"available-width"
property"available-width" gfloat : Read / Write
Width available to child areas.
Allowed values: >= 0
Default value: 0
"child-available-bpdim"
property"child-available-bpdim" gfloat : Read / Write
Block-progression-dimension available to child areas.
Allowed values: >= 0
Default value: 0
"child-available-ipdim"
property"child-available-ipdim" gfloat : Read / Write
Inline-progression-dimension available to child areas.
Allowed values: >= 0
Default value: 0
"generated-by"
property"generated-by" FoFo* : Read / Write
Formatting object that generated this area.
"is-first"
property"is-first" gboolean : Read
Is this the first area produced by the formatting object?.
Default value: TRUE
"is-last"
property"is-last" gboolean : Read
Is this the last area produced by the formatting object?.
Default value: TRUE
"next-x"
property"next-x" gfloat : Read / Write
x-coordinate of next child area.
Allowed values: >= 0
Default value: 0
"next-y"
property"next-y" gfloat : Read / Write
y-coordinate of next child area.
Allowed values: >= 0
Default value: 0
"page-sequence"
property"page-sequence" FoFo* : Read / Write
Ancestor fo:page_sequence node in the formatting object tree.