Pango::LayoutRun Class Reference

A Pango::LayoutRun represents a single run within a LayoutLine. More...

`#include <pangomm/layoutrun.h>`

## Public Member Functions

| LayoutRun ()
| LayoutRun (PangoGlyphItem * gobject, bool make_a_copy=true)
| LayoutRun (const LayoutRun & other)
LayoutRun & | operator= (const LayoutRun & other)
| LayoutRun (LayoutRun && other) noexcept
LayoutRun & | operator= (LayoutRun && other) noexcept
| ~LayoutRun () noexcept
void | swap (LayoutRun & other) noexcept
PangoGlyphItem * | gobj ()
| Provides access to the underlying C instance.
const PangoGlyphItem * | gobj () const
| Provides access to the underlying C instance.
PangoGlyphItem * | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
GlyphItem | split (const Glib::ustring & text, int split_index)
| Modifies orig to cover only the text after split_index, and returns a new item that covers the text before split_index that used to be in orig.
void | letter_space (const Glib::ustring & text, const LogAttr & log_attrs, int letter_spacing=0)
| Adds spacing between the graphemes of glyph_item to give the effect of typographic letter spacing.
Item | get_item () const
| Gets the Pango::Item object that provides information about the segment of text in this run.
GlyphString | get_glyphs () const
| Gets the string of glyphs obtained by shaping the text for this item.

## Static Public Member Functions

static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.

## Protected Attributes

PangoGlyphItem * | gobject_

## Related Symbols

(Note that these are not member symbols.)
void | swap (LayoutRun & lhs, LayoutRun & rhs) noexcept
Pango::LayoutRun | wrap (PangoGlyphItem * object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A Pango::LayoutRun represents a single run within a LayoutLine.

It is simply an alternate name for GlyphItem.

## Constructor & Destructor Documentation

## LayoutRun() [1/4]

Pango::LayoutRun::LayoutRun | ( |  | ) |

## LayoutRun() [2/4]

Pango::LayoutRun::LayoutRun | ( | PangoGlyphItem * | gobject,
|  | bool | make_a_copy = true )

explicit

## LayoutRun() [3/4]

Pango::LayoutRun::LayoutRun | ( | const LayoutRun & | other | ) |

## LayoutRun() [4/4]

Pango::LayoutRun::LayoutRun | ( | LayoutRun && | other | ) |

noexcept

## ~LayoutRun()

Pango::LayoutRun::~LayoutRun | ( |  | ) |

noexcept

## Member Function Documentation

## get_glyphs()

GlyphString Pango::LayoutRun::get_glyphs | ( |  | ) | const

Gets the string of glyphs obtained by shaping the text for this item.

Returns
  A Pango::GlyphString object.

## get_item()

Item Pango::LayoutRun::get_item | ( |  | ) | const

Gets the Pango::Item object that provides information about the segment of text in this run.

Returns
  A Pango::Item object.

## get_type()

GType Pango::LayoutRun::get_type | ( |  | ) |

static

Get the GType for this class, for use with the underlying GObject type system.

## gobj() [1/2]

PangoGlyphItem * Pango::LayoutRun::gobj | ( |  | ) |

inline

Provides access to the underlying C instance.

## gobj() [2/2]

const PangoGlyphItem * Pango::LayoutRun::gobj | ( |  | ) | const

inline

Provides access to the underlying C instance.

## gobj_copy()

PangoGlyphItem * Pango::LayoutRun::gobj_copy | ( |  | ) | const

Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.

## letter_space()

void Pango::LayoutRun::letter_space | ( | const Glib::ustring & | text,
|  | const LogAttr & | log_attrs,
|  | int | letter_spacing = 0 )

Adds spacing between the graphemes of glyph_item to give the effect of typographic letter spacing.

Since pangomm 1.6

Parameters

  text | Text that glyph_item corresponds to (glyph_item->item->offset is an offset from the start of text).
  log_attrs | Logical attributes for the item (the first logical attribute refers to the position before the first character in the item).
  letter_spacing | Amount of letter spacing to add in Pango units. May be negative, though too large negative values will give ugly results.

## operator=() [1/2]

LayoutRun & Pango::LayoutRun::operator= | ( | const LayoutRun & | other | ) |

## operator=() [2/2]

LayoutRun & Pango::LayoutRun::operator= | ( | LayoutRun && | other | ) |

noexcept

## split()

GlyphItem Pango::LayoutRun::split | ( | const Glib::ustring & | text,
|  | int | split_index )

Modifies orig to cover only the text after split_index, and returns a new item that covers the text before split_index that used to be in orig.

You can think of split_index as the length of the returned item. split_index may not be 0, and it may not be greater than or equal to the length of orig (that is, there must be at least one byte assigned to each item, you can't create a zero-length item).

This function is similar in function to Pango::Item::split() (and uses it internally.)

Since pangomm 1.2

Parameters

  text | Text to which positions in orig apply.
  split_index | Byte index of position to split item, relative to the start of the item.

Returns
  The newly allocated item representing text before split_index, which should be freed with free().

## swap()

void Pango::LayoutRun::swap | ( | LayoutRun & | other | ) |

noexcept

## Friends And Related Symbol Documentation

## swap()

void swap | ( | LayoutRun & | lhs,
|  | LayoutRun & | rhs )

related

Parameters

  lhs | The left-hand side
  rhs | The right-hand side

## wrap()

Pango::LayoutRun wrap | ( | PangoGlyphItem * | object,
|  | bool | take_copy = false )

related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.

## Member Data Documentation

## gobject_

PangoGlyphItem* Pango::LayoutRun::gobject_

protected