gi-poppler-0.18.26: Poppler bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Poppler.Objects.StructureElement

Description

No description available in the introspection data.

Synopsis

Exported types

class (GObject o, IsDescendantOf StructureElement o) => IsStructureElement o Source #

Type class for types which can be safely cast to StructureElement, for instance with toStructureElement.

Instances

Instances details
(GObject o, IsDescendantOf StructureElement o) => IsStructureElement o Source # 
Instance details

Defined in GI.Poppler.Objects.StructureElement

toStructureElement :: (MonadIO m, IsStructureElement o) => o -> m StructureElement Source #

Cast to StructureElement, for types for which this is known to be safe. For general casts, use castTo.

Methods

getAbbreviation

structureElementGetAbbreviation Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Text

Returns: Text of the expanded abbreviation if the element text is an abbreviation or acrony, Nothing if not.

Acronyms and abbreviations contained in elements of type POPPLER_STRUCTURE_ELEMENT_SPAN may have an associated expanded text form, which can be retrieved using this function.

Since: 0.26

getActualText

structureElementGetActualText Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Text

Returns: The actual text for the element, or Nothing if not defined.

Obtains the actual text enclosed by the element (and its child elements). The actual text is mostly used for non-text elements like images and figures which <emphasis>do</emphasis> have the graphical appearance of text, like a logo. For those the actual text is the equivalent text to those graphical elements which look like text when rendered.

Note that for elements containing proper text, the function structureElementGetText must be used instead.

Since: 0.26

getAltText

structureElementGetAltText Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Text

Returns: The alternate text representation for the element, or Nothing if not defined.

Obtains the “alternate” text representation of the element (and its child elements). This is mostly used for non-text elements like images and figures, to specify a textual description of the element.

Note that for elements containing proper text, the function structureElementGetText must be used instead.

Since: 0.26

getBackgroundColor

structureElementGetBackgroundColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m (Bool, Color)

Returns: True if a color is defined for the element, False otherwise.

Obtains the background color of the element. If this attribute is not specified, the element shall be treated as if it were transparent.

Since: 0.26

getBaselineShift

structureElementGetBaselineShift Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A numeric value.

Obtains how much the text contained in the inline-level structure element should be shifted, measuring from the baseline of the glyphs.

Since: 0.26

getBlockAlign

structureElementGetBlockAlign Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureBlockAlign

Returns: A StructureBlockAlign value.

Obtains the block-alignment mode of the block-level structure element.

Since: 0.26

getBorderStyle

structureElementGetBorderStyle Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m [StructureBorderStyle] 

Obtains the border style of a structure element. The result values are in before-after-start-end ordering. For example, using Western left-to-right writing, that is top-bottom-left-right.

Since: 0.26

getBorderThickness

structureElementGetBorderThickness Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m (Bool, [Double])

Returns: True if the border thickness attribute is defined for the element, False otherwise.

Obtains the thickness of the border of an element. The result values are in before-after-start-end ordering (for the typical Western left-to-right writing, that is top-bottom-left-right). A value of 0 indicates that the border shall not be drawn.

Since: 0.26

getBoundingBox

structureElementGetBoundingBox Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m (Bool, Rectangle)

Returns: True if a bounding box is defined for the element, False otherwise.

Obtains the size of the bounding box of a block-level structure element.

Since: 0.26

getColor

structureElementGetColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m (Bool, Color)

Returns: True if a color is defined for the element, False otherwise.

Obtains the color of the content contained in the element. If this attribute is not specified, the color for this element shall be the current text fill color in effect at the start of its associated content.

Since: 0.26

getColumnCount

structureElementGetColumnCount Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Word32

Returns: Number of columns.

Obtains the number of columns used to lay out the content contained in the grouping element.

Since: 0.26

getColumnGaps

structureElementGetColumnGaps Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m [Double]

Returns: Array containing the values for the column gaps, or Nothing if the array is empty or the attribute is not defined.

Obtains the size of the gaps in between adjacent columns. Returns an array of elements: the first one is the size of the gap in between columns 1 and 2, second is the size between columns 2 and 3, and so on.

For elements which use a single column, Nothing is returned and nValues is set to zero.

If the attribute is undefined, Nothing is returned and nValues is set to a non-zero value.

The array with the results is allocated by the function. When it is not needed anymore, be sure to call free on it.

Since: 0.26

getColumnWidths

structureElementGetColumnWidths Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m [Double]

Returns: Array containing widths of the columns, or Nothing if the attribute is not defined.

Obtains an array with the widths of the columns.

The array with the results is allocated by the function. When it is not needed anymore, be sure to call free on it.

Since: 0.26

getEndIndent

structureElementGetEndIndent Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A numeric value.

Obtains the amount of indentation at the end of the block-level structure element.

Since: 0.26

getFormDescription

structureElementGetFormDescription Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Text

Returns: A string, or Nothing if the attribute is not defined.

Obtains the textual description of the form element. Note that the description is for informative purposes, and it is not intended to be rendered. For example, assistive technologies may use the description field to provide an alternate way of presenting an element to the user.

The returned string is allocated by the function. When it is not needed anymore, be sure to call free on it.

Since: 0.26

getFormRole

structureElementGetFormRole Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureFormRole

Returns: A StructureFormRole value.

Obtains the role of a form structure element that is part of a form, or is a form field. This hints how the control for the element is intended to be rendered.

Since: 0.26

getFormState

structureElementGetFormState Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureFormState

Returns: A StructureFormState value.

For a structure element that is a form field, obtains in which state the associated control is expected to be rendered.

Since: 0.26

getGlyphOrientation

structureElementGetGlyphOrientation Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureGlyphOrientation

Returns: A StructureGlyphOrientation value.

Obtains the glyph orientation for the text contained in a inline-level structure element.

Since: 0.26

getHeight

structureElementGetHeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A positive value if a width is defined, or -1 if the height is to be calculated automatically.

Obtains the height of the block-level structure element. Note that for elements which do not specify a height, it has to be calculated, and in this case -1 is returned.

Since: 0.26

getId

structureElementGetId Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Text

Returns: The identifier of the element (if defined), or Nothing.

Obtains the identifier of an element.

Since: 0.26

getInlineAlign

structureElementGetInlineAlign Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureInlineAlign

Returns: A StructureInlineAlign value.

Obtains the inline-alignment mode of the block-level structure element.

Since: 0.26

getKind

structureElementGetKind Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureElementKind

Returns: A StructureElementKind value.

No description available in the introspection data.

Since: 0.26

getLanguage

structureElementGetLanguage Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Text

Returns: language and country code, or Nothing.

Obtains the language and country code for the content in an element, in two-letter ISO format, e.g. <code>en_ES</code>, or Nothing if not defined.

Since: 0.26

getLineHeight

structureElementGetLineHeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A positive value if a line height is defined, or -1 if the height is to be calculated automatically.

Obtains the line height for the text contained in the inline-level structure element. Note that for elements which do not specify a line height, it has to be calculated, and in this case -1 is returned.

Since: 0.26

getListNumbering

structureElementGetListNumbering Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureListNumbering

Returns: A StructureListNumbering value.

Obtains the list numbering style for list items.

Since: 0.26

getPadding

structureElementGetPadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m [Double] 

Obtains the padding of an element (space around it). The result values are in before-after-start-end ordering. For example using Western left-to-right writing, that is top-bottom-left-right.

Since: 0.26

getPage

structureElementGetPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Int32

Returns: Number of the page that contains the element, of <code>-1</code> if not defined.

Obtains the page number in which the element is contained.

Since: 0.26

getPlacement

structureElementGetPlacement Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructurePlacement

Returns: A StructurePlacement value.

Obtains the placement type of the structure element.

Since: 0.26

getRubyAlign

structureElementGetRubyAlign Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureRubyAlign

Returns: A StructureRubyAlign value.

Obtains the alignment for the ruby text contained in a inline-level structure element.

Since: 0.26

getRubyPosition

structureElementGetRubyPosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureRubyPosition

Returns: A StructureRubyPosition value.

Obtains the position for the ruby text contained in a inline-level structure element.

Since: 0.26

getSpaceAfter

structureElementGetSpaceAfter Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A positive value.

Obtains the amount of empty space after the block-level structure element.

Since: 0.26

getSpaceBefore

structureElementGetSpaceBefore Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A positive value.

Obtains the amount of empty space before the block-level structure element.

Since: 0.26

getStartIndent

structureElementGetStartIndent Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A numeric value.

Obtains the amount of indentation at the beginning of the block-level structure element.

Since: 0.26

getTableBorderStyle

structureElementGetTableBorderStyle Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m [StructureBorderStyle] 

Obtains the table cell border style of a block-level structure element. The result values are in before-after-start-end ordering. For example, using Western left-to-right writing, that is top-bottom-left-right.

Since: 0.26

getTableColumnSpan

structureElementGetTableColumnSpan Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Word32

Returns: A positive, non-zero value.

Obtains the number of columns the table element spans to.

Since: 0.26

getTableHeaders

structureElementGetTableHeaders Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m [Text]

Returns: Zero-terminated array of strings with the table header names, or Nothing if the attribute is not defined.

Obtains an array with the names of the table column headers. This is only useful for table header row elements.

The array with the results is allocated by the function. The number of items in the returned array can be obtained with strvLength. The returned value must be freed using strfreev.

Since: 0.26

getTablePadding

structureElementGetTablePadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m [Double] 

Obtains the padding between the table cell’s content rectangle and the surrounding border of a block-level structure element. The result values are in before-after-start-end ordering (for the typical Western left-to-right writing, that is top-bottom-left-right).

Since: 0.26

getTableRowSpan

structureElementGetTableRowSpan Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Word32

Returns: A positive, non-zero value.

Obtains the number of rows the table element spans to.

Since: 0.26

getTableScope

structureElementGetTableScope Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureTableScope

Returns: A StructureTableScope value.

Obtains the scope of a table structure element.

Since: 0.26

getTableSummary

structureElementGetTableSummary Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Text

Returns: A string, or Nothing if the attribute is not defined.

Obtains the textual summary of the contents of the table element. Note that the summary is meant for informative purposes, and it is not intended to be rendered. For example, assistive technologies may use the description field to provide an alternate way of presenting an element to the user, or a document indexer may want to scan it for additional keywords.

The returned string is allocated by the function. When it is not needed anymore, be sure to call free on it.

Since: 0.26

getText

structureElementGetText Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> [StructureGetTextFlags]

flags: A StructureGetTextFlags value, or StructureGetTextFlagsNone to disable all the flags.

-> m Text

Returns: A string.

Obtains the text enclosed by an element, or the text enclosed by the elements in the subtree (including the element itself).

Since: 0.26

getTextAlign

structureElementGetTextAlign Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureTextAlign

Returns: A StructureTextAlign value.

Obtains the text alignment mode of the text contained into a block-level structure element.

Since: 0.26

getTextDecorationColor

structureElementGetTextDecorationColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m (Bool, Color)

Returns: True if a color is defined for the element, False otherwise.

Obtains the color of the text decoration for the text contained in the inline-level structure element. If this attribute is not specified, the color for this element shall be the current fill color in effect at the start of its associated content.

Since: 0.26

getTextDecorationThickness

structureElementGetTextDecorationThickness Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: Thickness of the text decoration, or NAN if not defined.

Obtains the thickness of the text decoration for the text contained in the inline-level structure element. If this attribute is not specified, it shall be derived from the current stroke thickness in effect at the start of the element’s associated content.

Since: 0.26

getTextDecorationType

structureElementGetTextDecorationType Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureTextDecoration

Returns: A StructureTextDecoration value.

Obtains the text decoration type of the text contained in the inline-level structure element.

Since: 0.26

getTextIndent

structureElementGetTextIndent Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A numeric value.

Obtains the amount of indentation of the text contained in the block-level structure element.

Since: 0.26

getTextSpans

structureElementGetTextSpans Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m [TextSpan]

Returns: An array of TextSpan elements.

Obtains the text enclosed by an element, as an array of TextSpan structures. Each item in the list is a piece of text which share the same attributes, plus its attributes. The following example shows how to obtain and free the text spans of an element:

<informalexample><programlisting> guint i, n_spans; PopplerTextSpan **text_spans = poppler_structure_element_get_text_spans (element, &n_spans); /<!-- -->* Use the text spans *<!-- -->/ for (i = 0; i < n_spans; i++) poppler_text_span_free (text_spans[i]); g_free (text_spans); </programlisting></informalexample>

Since: 0.26

getTitle

structureElementGetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Text

Returns: The title of the element, or Nothing.

Obtains the title of an element.

Since: 0.26

getWidth

structureElementGetWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Double

Returns: A positive value if a width is defined, or -1 if the width is to be calculated automatically.

Obtains the width of the block-level structure element. Note that for elements which do not specify a width, it has to be calculated, and in this case -1 is returned.

Since: 0.26

getWritingMode

structureElementGetWritingMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m StructureWritingMode

Returns: A StructureWritingMode value.

Obtains the writing mode (writing direction) of the content associated with a structure element.

Since: 0.26

isBlock

structureElementIsBlock Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Bool

Returns: True if the element is a block element, or False otherwise.

Checks whether an element is a block element.

Since: 0.26

isContent

structureElementIsContent Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Bool

Returns: True if the element is content, or False otherwise.

Checks whether an element is actual document content.

Since: 0.26

isGrouping

structureElementIsGrouping Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Bool

Returns: True if the element is a grouping element, False otherwise.

Checks whether an element is a grouping element.

Since: 0.26

isInline

structureElementIsInline Source #

Arguments

:: (HasCallStack, MonadIO m, IsStructureElement a) 
=> a

popplerStructureElement: A StructureElement

-> m Bool

Returns: True if the element is an inline element, or False otherwise.

Checks whether an element is an inline element.

Since: 0.26