package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Tab_array

type t = [ `tab_array ] Gobject.obj

A `PangoTabArray` contains an array of tab stops.

`PangoTabArray` can be used to set tab stops in a `PangoLayout`. Each tab stop has an alignment, a position, and optionally a character to use as decimal point.

val new_ : int -> bool -> t

Create a new TabArray

val to_string : t -> string

Serializes a `PangoTabArray` to a string.

No guarantees are made about the format of the string, it may change between Pango versions.

The intended use of this function is testing and debugging. The format is not meant as a permanent storage format.

val sort : t -> unit

Utility function to ensure that the tab stops are in increasing order.

val set_tab : t -> int -> Pango_enums.tabalign -> int -> unit

Sets the alignment and location of a tab stop.

val set_positions_in_pixels : t -> bool -> unit

Sets whether positions in this array are specified in pixels.

val set_decimal_point : t -> int -> int -> unit

Sets the Unicode character to use as decimal point.

This is only relevant for tabs with %PANGO_TAB_DECIMAL alignment, which align content at the first occurrence of the decimal point character.

By default, Pango uses the decimal point according to the current locale.

val resize : t -> int -> unit

Resizes a tab array.

You must subsequently initialize any tabs that were added as a result of growing the array.

val get_tab : t -> int -> Pango_enums.tabalign * int

Gets the alignment and position of a tab stop.

val get_size : t -> int

Gets the number of tab stops in @tab_array.

val get_positions_in_pixels : t -> bool

Returns %TRUE if the tab positions are in pixels, %FALSE if they are in Pango units.

val get_decimal_point : t -> int -> int

Gets the Unicode character to use as decimal point.

This is only relevant for tabs with %PANGO_TAB_DECIMAL alignment, which align content at the first occurrence of the decimal point character.

The default value of 0 means that Pango will use the decimal point according to the current locale.

val get_type : unit -> Gobject.Type.t