GXPS.DocumentStructure

g GObject.Object GObject.Object GXPS.DocumentStructure GXPS.DocumentStructure GObject.Object->GXPS.DocumentStructure

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

outline_iter_init (iter, structure)

has_outline ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

source

str

w/co

The DocStructure Source File

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class GXPS.DocumentStructure(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GXPS.DocumentStructureClass

The GXPS.DocumentStructure struct contains only private fields and should not be directly accessed.

classmethod outline_iter_init(iter, structure)
Parameters:
Returns:

True if iter was successfully initialized to the root item, False if it failed or structure does not have an outline.

Return type:

bool

Initializes iter to the root item of the outline contained by structure and a associates it with structure.

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

<informalexample><programlisting> static void walk_outline (GXPS.OutlineIter *iter) { do { GXPS.OutlineIter child_iter; const str *description = GXPS.OutlineIter.get_description (iter); GXPS.LinkTarget *target = GXPS.OutlineIter.get_target (iter);

/<!– –>* Do something with description and taregt *<!– –>/ if (GXPS.OutlineIter.children (&child_iter, iter)) walk_outline (&child_iter); } while (GXPS.OutlineIter.next (iter)); } … { GXPS.OutlineIter iter; if (GXPS.DocumentStructure.outline_iter_init (&iter, structure)) walk_outline (&iter); } </programlisting></informalexample>

has_outline()
Returns:

True if self has an outline, False otherwise.

Return type:

bool

Whether self has an outline or not.

Property Details

GXPS.DocumentStructure.props.source
Name:

source

Type:

str

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

The DocStructure Source File