IndexIter


Description:

[ CCode ( has_construct_function = false ) ]
public IndexIter (Document document)

Returns the root IndexIter for document, or null.

This must be freed with free.

Certain documents have an index associated with them. This index can be used to help the user navigate the document, and is similar to a table of contents. Each node in the index will contain a Action that can be displayed to the user — typically a GOTO_DEST or a URI.

Here is a simple example of some code that walks the full index:

static void
walk_index (PopplerIndexIter *iter)
{
do
{
/* Get the action and do something with it */
PopplerIndexIter *child = poppler_index_iter_get_child (iter);
if (child)
walk_index (child);
poppler_index_iter_free (child);
}
while (poppler_index_iter_next (iter));
}
...
{
iter = poppler_index_iter_new (document);
walk_index (iter);
poppler_index_iter_free (iter);
}

Parameters:

document

a Document

Returns:

a new IndexIter




2022 vala-language.org