![]() | ![]() | ![]() | xmlroff Reference Manual | ![]() |
---|
FoFo — Base formatting object object
struct FoFo; struct FoFoClass; #define FO_FO_ERROR GQuark fo_fo_error_quark (void); enum FoFoError; struct FoFoAreaNew2Context; struct FoFoAreaIterator; FoFo* fo_fo_new (void); void fo_fo_debug_dump_properties (FoFo *fo, gint depth); void fo_fo_set_context (FoFo *fo_fo, FoContext *new_context); FoContext* fo_fo_get_context (FoFo *fo_fo); void fo_fo_update_from_context (FoFo *fo_fo, FoContext *context); FoFo* fo_fo_get_flow (FoFo *fo_fo); FoFo* fo_fo_get_tree (FoFo *fo_fo); gboolean fo_fo_get_generate_reference_area (FoFo *fo_fo); gboolean fo_fo_get_allow_mixed_content (FoFo *fo_fo); gboolean fo_fo_validate_content (FoFo *fo, GError **error); gboolean fo_fo_resolve_property_attributes (FoNode *fo_node, gpointer data); void fo_fo_children_properties_resolve (FoFo *this_fo, FoArea *this_fo_parent_area, FoArea **new_area, GHashTable *prop_eval_hash, FoDoc *fo_doc, gint debug_level, GError **error); void fo_fo_validate (FoFo *fo, FoContext *current_context, FoContext *parent_context, GError **error); FoFo* fo_fo_clone (FoFo *original); void fo_fo_area_new (FoFo *fo, FoDoc *fo_doc, FoArea *parent_area, FoArea **new_area, guint debug_level); void fo_fo_area_new2 (FoFo *fo, FoFoAreaNew2Context *context, GError **error); void fo_fo_trim_whitespace_children (FoFo *fo); gboolean fo_fo_validate_content_empty (FoFo *fo, GError **error); gboolean fo_fo_validate_content_block_plus (FoFo *fo, GError **error); void fo_fo_validate_pcdata_or_inline (FoNode *fo_node, gboolean *is_not_pcdata_inline); void fo_fo_validate_block_or_whitespace (FoNode *fo_node, gboolean *is_not_block_or_whitespace); void fo_fo_validate_pcdata_inline_block_neutral (FoNode *fo_node, gboolean *is_not_pcdata_inline_block_neutral); FoFoAreaIterator* fo_fo_get_area_iterator (FoFo *fo); FoArea* fo_fo_area_iterator_get_area (const FoFoAreaIterator *iterator); gboolean fo_fo_area_iterator_next (FoFoAreaIterator *iterator);
"allow-mixed-content" gboolean : Read "context" FoContext : Read "flow" FoFo : Read "generate-reference-area" gboolean : Read "tree" FoFo : Read
GQuark fo_fo_error_quark (void);
Gets the GQuark identifying FoFo errors.
Returns : | GQuark identifying FoFo errors. |
typedef enum { FO_FO_ERROR_FAILED, /* Generic error code */ FO_FO_ERROR_WARNING, /* Non-fatal error */ FO_FO_ERROR_EMPTY, /* FO should not be empty */ FO_FO_ERROR_NOT_EMPTY, /* FO should be empty */ FO_FO_ERROR_NOT_BLOCK, /* FO should contain (%block;)+ */ FO_FO_ERROR_INVALID_CHILD, /* FO not allowed as child of parent FO */ FO_FO_ERROR_INVALID_CONTENT, /* FO content does not match content model */ FO_FO_ERROR_ENUMERATION_TOKEN, /* Unrecognised enumeration token */ FO_FO_ERROR_DATATYPE, /* Invalid datatype value for property */ FO_FO_ERROR_DATATYPE_REPLACE, /* Invalid datatype value for property replaced */ FO_FO_ERROR_DATATYPE_NULL, /* Invalid datatype value for property: NULL */ FO_FO_ERROR_LAST } FoFoError;
struct FoFoAreaNew2Context { FoDoc *fo_doc; FoArea *parent_area; FoArea **new_area; guint debug_level; };
FoFo* fo_fo_new (void);
Creates a new FoFo initialized to default value.
Returns : | the new FoFo |
void fo_fo_debug_dump_properties (FoFo *fo, gint depth);
Log debug messages for most of the instance variables and some of the class variables of fo.
fo : | FoFo whose properties to dump |
depth : | Indication of relative depth to be applied to the output. |
void fo_fo_set_context (FoFo *fo_fo, FoContext *new_context);
Sets the context of fo_fo to new_context
fo_fo : | The FoFo object |
new_context : | The new context |
FoContext* fo_fo_get_context (FoFo *fo_fo);
Gets the "context" of fo_fo
fo_fo : | The FoFo object |
Returns : | The context |
void fo_fo_update_from_context (FoFo *fo_fo, FoContext *context);
Calls the FoFo-specific _update_from_context() function to update the FoFo's property values from the larger set of property values maintained in the FoContext.
FoFo* fo_fo_get_flow (FoFo *fo_fo);
Gets the flow of fo_fo
fo_fo : | The FoFo object |
Returns : | The flow |
FoFo* fo_fo_get_tree (FoFo *fo_fo);
Gets the tree of fo_fo
fo_fo : | The FoFo object |
Returns : | The tree |
gboolean fo_fo_get_generate_reference_area (FoFo *fo_fo);
Gets whether or not the FO generates reference areas.
fo_fo : | The FoFo object |
Returns : | The generate-reference-area class property value |
gboolean fo_fo_get_allow_mixed_content (FoFo *fo_fo);
Gets whether or not the FO allows mixed content (i.e. text nodes).
fo_fo : | The FoFo object |
Returns : | The allow_mixed_content class property value. |
gboolean fo_fo_validate_content (FoFo *fo, GError **error);
Calls the FoFo-specific _validate_content() function to validate the FoFo's content model and returns the value returned by that function.
fo : | FoFo whose content is to be validated |
error : | GError |
Returns : | FALSE if no content model error, otherwise TRUE |
gboolean fo_fo_resolve_property_attributes (FoNode *fo_node, gpointer data);
Resolves the values of the properties of fo_node.
fo_node : | FoNode for which to resolve property attributes. |
data : | Context in which to resolve the properties. |
Returns : | TRUE if an error occurred, FALSE otherwise. |
void fo_fo_children_properties_resolve (FoFo *this_fo, FoArea *this_fo_parent_area, FoArea **new_area, GHashTable *prop_eval_hash, FoDoc *fo_doc, gint debug_level, GError **error);
this_fo : | |
this_fo_parent_area : | |
new_area : | |
prop_eval_hash : | |
fo_doc : | |
debug_level : | |
error : |
void fo_fo_validate (FoFo *fo, FoContext *current_context, FoContext *parent_context, GError **error);
Validate and/or munge the properties of fo.
FoFo* fo_fo_clone (FoFo *original);
Make a clone of original and insert the clone after original in the fo tree. Set instance properties of the clone to match original.
original : | Fo object to be cloned |
Returns : | Clone of original |
void fo_fo_area_new (FoFo *fo, FoDoc *fo_doc, FoArea *parent_area, FoArea **new_area, guint debug_level);
fo : | |
fo_doc : | |
parent_area : | |
new_area : | |
debug_level : |
void fo_fo_area_new2 (FoFo *fo, FoFoAreaNew2Context *context, GError **error);
fo : | |
context : | |
error : |
void fo_fo_trim_whitespace_children (FoFo *fo);
Remove any "whitespace" children of fo. I.e., unlink and unref any children that are FoText that contain only whitespace or are FoWrapperWhitespace nodes.
Leaves fo with no "whitespace" children.
fo : | FoFo to trim |
gboolean fo_fo_validate_content_empty (FoFo *fo, GError **error);
Validates that fo does not contain any child FoFo
fo : | FoFo to validate. |
error : | GError indicating any error. |
Returns : | FALSE if fo is empty. |
gboolean fo_fo_validate_content_block_plus (FoFo *fo, GError **error);
Validates the fo contains one or more FoBlockFo formatting objects.
fo : | FoFo to validate. |
error : | GError indicating any error. |
Returns : | FALSE if content matches. |
void fo_fo_validate_pcdata_or_inline (FoNode *fo_node, gboolean *is_not_pcdata_inline);
fo_node : | |
is_not_pcdata_inline : |
void fo_fo_validate_block_or_whitespace (FoNode *fo_node, gboolean *is_not_block_or_whitespace);
fo_node : | |
is_not_block_or_whitespace : |
void fo_fo_validate_pcdata_inline_block_neutral (FoNode *fo_node, gboolean *is_not_pcdata_inline_block_neutral);
Validates that the content of fo_node is only #PCDATA or FoInline or FoNeutral formatting objects.
fo_node : | FoFo to validate |
is_not_pcdata_inline_block_neutral : | Pointer to gboolean storing result |
FoFoAreaIterator* fo_fo_get_area_iterator (FoFo *fo);
Gets a FoFoAreaIterator for iterating over the areas generated by fo.
fo : | FoFo for which to get iterator. |
Returns : | A FoFoAreaIterator. |
FoArea* fo_fo_area_iterator_get_area (const FoFoAreaIterator *iterator);
Gets the current FoArea pointed to by iterator.
iterator : | FoFoAreaIterator for which to get current area. |
Returns : | The current FoArea. |
gboolean fo_fo_area_iterator_next (FoFoAreaIterator *iterator);
Makes iterator point to the next FoArea in its list.
iterator : | FoFoAreaIterator to modify |
Returns : | TRUE if there is a next FoArea, FALSE if not. |
"allow-mixed-content" (gboolean : Read) | Whether or not the formatting object allows mixed content. |
"context" (FoContext : Read) | Set of current formatting object properties. |
"flow" (FoFo : Read) | Ancestor fo:flow node in the formatting object tree. |
"generate-reference-area" (gboolean : Read) | Whether or not the formatting object generates a reference area. |
"tree" (FoFo : Read) | Top of the formatting object tree. |
<< Formatting Objects are truly wonderful | fo-basic-link >> |