pub struct IndexIter { /* private fields */ }
Expand description
GLib type: Boxed type with copy-on-clone semantics.
Implementations§
source§impl IndexIter
impl IndexIter
sourcepub fn as_ptr(&self) -> *mut PopplerIndexIter
pub fn as_ptr(&self) -> *mut PopplerIndexIter
Return the inner pointer to the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut PopplerIndexIter) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut PopplerIndexIter) -> &Self
Borrows the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow_mut(
ptr: &mut *mut PopplerIndexIter,
) -> &mut Self
pub unsafe fn from_glib_ptr_borrow_mut( ptr: &mut *mut PopplerIndexIter, ) -> &mut Self
Borrows the underlying C value mutably.
source§impl IndexIter
impl IndexIter
sourcepub fn new(document: &Document) -> IndexIter
pub fn new(document: &Document) -> IndexIter
Returns the root IndexIter
for document
, or None
. This must be
freed with poppler_index_iter_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 PopplerAction
that can be
displayed to the user — typically a ActionType::GotoDest
or a
ActionType::Uri
.
Here is a simple example of some code that walks the full index:
<informalexample>``<programlisting>
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);
}
</programlisting>``</informalexample>
§document
a Document
§Returns
a new IndexIter
Trait Implementations§
source§impl HasParamSpec for IndexIter
impl HasParamSpec for IndexIter
source§impl Ord for IndexIter
impl Ord for IndexIter
source§impl PartialEq for IndexIter
impl PartialEq for IndexIter
source§impl PartialOrd for IndexIter
impl PartialOrd for IndexIter
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for IndexIter
impl StaticType for IndexIter
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for IndexIter
impl StructuralPartialEq for IndexIter
Auto Trait Implementations§
impl Freeze for IndexIter
impl RefUnwindSafe for IndexIter
impl !Send for IndexIter
impl !Sync for IndexIter
impl Unpin for IndexIter
impl UnwindSafe for IndexIter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)