Poppler.IndexIter¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Poppler.IndexIter¶
Interface for getting the Index of a poppler_document
Since 24.10 this type supports g_autoptr
- classmethod new(document)¶
- Parameters:
document (
Poppler.Document) – aPoppler.Document- Returns:
a new
Poppler.IndexIter- Return type:
Returns the root
Poppler.IndexIterfor document, orNone. This must be freed withPoppler.IndexIter.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
Poppler.Actionthat can be displayed to the user — typically aPoppler.ActionType.GOTO_DESTor aPoppler.ActionType.URI<!– –>.Here is a simple example of some code that walks the full index:
<informalexample><programlisting> static void walk_index (
Poppler.IndexIter*iter) { do { /<!– –>* Get the action and do something with it *<!– –>/Poppler.IndexIter*child =Poppler.IndexIter.get_child(iter); if (child) walk_index (child);Poppler.IndexIter.free(child); } while (Poppler.IndexIter.next(iter)); } … { iter =Poppler.IndexIter.new(document); walk_index (iter);Poppler.IndexIter.free(iter); } </programlisting></informalexample>
- copy()¶
- Returns:
a new
Poppler.IndexIter- Return type:
Creates a new
Poppler.IndexIteras a copy of self. This must be freed withPoppler.IndexIter.free().
- free()¶
Frees self.
- get_action()¶
- Returns:
a new
Poppler.Action- Return type:
Returns the
Poppler.Actionassociated with self. It must be freed withPoppler.Action.free().
- get_child()¶
- Returns:
a new
Poppler.IndexIter- Return type:
Returns a newly created child of self, or
Noneif the iter has no child. SeePoppler.IndexIter.new() for more information on this function.
- is_open()¶
-
Returns whether this node should be expanded by default to the user. The document can provide a hint as to how the document’s index should be expanded initially.
- next()¶
-
Sets self to point to the next action at the current level, if valid. See
Poppler.IndexIter.new() for more information.