Top | ![]() |
![]() |
![]() |
![]() |
gfloat | available-height | Read / Write |
gfloat | available-width | Read / Write |
gfloat | child-available-bpdim | Read / Write |
gfloat | child-available-ipdim | Read / Write |
FoFo * | generated-by | Read / Write |
gboolean | is-first | Read |
gboolean | is-last | Read |
gfloat | next-x | Read / Write |
gfloat | next-y | Read / Write |
FoArea * | page | Read |
FoFo * | page-sequence | Read / Write |
FoArea *
fo_area_get_reference (FoArea *fo_area
);
Gets the reference property of area
FoArea *
fo_area_get_page_sequence (FoArea *fo_area
);
Gets the page_sequence property of area
gboolean
fo_area_get_is_first (FoArea *fo_area
);
Gets the is_first property of area
gboolean
fo_area_get_is_last (FoArea *fo_area
);
Gets the is_last property of area
void fo_area_set_next_x (FoArea *fo_area
,gfloat new_next_x
);
Sets the next-x property of area
to new_next_x
gfloat
fo_area_get_next_y (FoArea *fo_area
);
Gets the "next_y" property of area
void fo_area_set_next_y (FoArea *fo_area
,gfloat new_next_y
);
Sets the next-y property of area
to new_next_y
gfloat
fo_area_get_available_width (FoArea *fo_area
);
Gets the "available-width" property of area
void fo_area_set_available_width (FoArea *fo_area
,gfloat new_available_width
);
Sets the "available-width" property of area
to new_available_width
gfloat
fo_area_get_available_height (FoArea *fo_area
);
Gets the available-height property of area
void fo_area_set_available_height (FoArea *fo_area
,gfloat new_available_height
);
Sets the available-height property of area
to new_available_height
gfloat
fo_area_get_child_available_ipdim (FoArea *fo_area
);
Gets the "child-available-ipdim" property of area
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
gfloat
fo_area_get_child_available_bpdim (FoArea *fo_area
);
Gets the "child-available-bpdim" property of area
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
FoFo *
fo_area_get_generated_by (FoArea *fo_area
);
Gets the generated-by property of area
void fo_area_set_generated_by (FoArea *fo_area
,FoFo *new_fo
);
Sets the generated-by property of area
to new_fo
FoArea * fo_area_add_child (FoArea *parent
,FoArea *child
);
Add child
to parent
by calling the _add_child()
function for
parent
.
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
immediately after adding
an area to the area tree or making a change to the area's height.fo_area_size_request()
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.
void fo_area_debug_dump_properties (FoArea *area
,gint depth
);
Dump the properties of area
.
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 |
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.
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
.
void fo_area_update_after_clone (FoArea *clone
,FoArea *original
);
Update the instance variables of clone
to match those of original
.
FoArea * fo_area_split_before_height (FoArea *area
,gfloat height
);
Split area
at or before height
.
gboolean fo_area_split_before_height_check (FoArea *area
,gfloat height
);
Check whether area
can split at or before height
.
void
fo_area_resolve_text_align (FoArea *area
);
Resolves the text alignment value for area
and its descendants.
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
);
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.
root |
a FoArea. |
|
flags |
which types of children are to be counted, one of
|
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.
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.
area |
a FoArea. |
|
flags |
which types of children are to be visited, one of
|
|
func |
the function to call for each visited node. |
|
data |
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.)
guint
fo_area_n_children (FoArea *area
);
Gets the number of children of a FoArea.
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.
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.
FoArea *
fo_area_first_sibling (FoArea *area
);
Gets the first sibling of a FoArea. This could possibly be the node itself.
FoArea *
fo_area_last_sibling (FoArea *area
);
Gets the last sibling of a FoArea. This could possibly be the node itself.
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.
void
fo_area_unlink_with_next_siblings (FoArea *area
);
Unlinks area
and its following siblings.
“available-height”
property “available-height” gfloat
Height available to child areas.
Flags: Read / Write
Default value: 0
“available-width”
property “available-width” gfloat
Width available to child areas.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“child-available-bpdim”
property “child-available-bpdim” gfloat
Block-progression-dimension available to child areas.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“child-available-ipdim”
property “child-available-ipdim” gfloat
Inline-progression-dimension available to child areas.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“generated-by”
property“generated-by” FoFo *
Formatting object that generated this area.
Flags: Read / Write
“is-first”
property “is-first” gboolean
Is this the first area produced by the formatting object?.
Flags: Read
Default value: TRUE
“is-last”
property “is-last” gboolean
Is this the last area produced by the formatting object?.
Flags: Read
Default value: TRUE
“next-x”
property “next-x” gfloat
x-coordinate of next child area.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“next-y”
property “next-y” gfloat
y-coordinate of next child area.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“page-sequence”
property“page-sequence” FoFo *
Ancestor fo:page_sequence node in the formatting object tree.
Flags: Read / Write