Poppler.IndexIter¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Poppler.IndexIter¶
- classmethod new(document)¶
- Parameters:
document (
Poppler.Document
) – aPoppler.Document
- Returns:
a new
Poppler.IndexIter
- Return type:
Returns the root
Poppler.IndexIter
for 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.Action
that can be displayed to the user — typically aPoppler.ActionType.GOTO_DEST
or 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.IndexIter
as 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.Action
associated 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
None
if 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.