Package ch.bailu.gtk.pango
Klasse TabArray
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.pango.TabArray
- Alle implementierten Schnittstellen:
PointerInterface
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.
`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.
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungTabArray
(int initial_size, boolean positions_in_pixels) Creates an array of @initial_size tab stops.TabArray
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcopy()
Copies a `PangoTabArray`.void
free()
Frees a tab array and associated resources.static TabArray
fromString
(Str text) Deserializes a `PangoTabArray` from a string.static ClassHandler
byte
getDecimalPoint
(int tab_index) Gets the Unicode character to use as decimal point.static int
static long
static TypeSystem.TypeSize
boolean
Returns %TRUE if the tab positions are in pixels,
%FALSE if they are in Pango units.int
getSize()
Gets the number of tab stops in @tab_array.void
Gets the alignment and position of a tab stop.static long
static TypeSystem.TypeSize
static TabArray
newWithPositionsTabArray
(int size, boolean positions_in_pixels, int first_alignment, int first_position, Object... _ellipsis) Creates a `PangoTabArray` and allows you to specify the alignment
and position of each tab stop.void
resize
(int new_size) Resizes a tab array.void
setDecimalPoint
(int tab_index, byte decimal_point) Sets the Unicode character to use as decimal point.void
setPositionsInPixels
(boolean positions_in_pixels) Sets whether positions in this array are specified in
pixels.void
setTab
(int tab_index, int alignment, int location) Sets the alignment and location of a tab stop.void
sort()
Utility function to ensure that the tab stops are in increasing order.toStr()
Serializes a `PangoTabArray` to a string.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
TabArray
-
TabArray
public TabArray(int initial_size, boolean positions_in_pixels) Creates an array of @initial_size tab stops.
Tab stops are specified in pixel units if @positions_in_pixels is %TRUE,
otherwise in Pango units. All stops are initially at position 0.- Parameter:
initial_size
- Initial number of tab stops to allocate, can be 0positions_in_pixels
- whether positions are in pixel units
-
-
Methodendetails
-
getClassHandler
-
newWithPositionsTabArray
public static TabArray newWithPositionsTabArray(int size, boolean positions_in_pixels, int first_alignment, int first_position, Object... _ellipsis) Creates a `PangoTabArray` and allows you to specify the alignment
and position of each tab stop.
You **must** provide an alignment and position for @size tab stops.- Parameter:
size
- number of tab stops in the arraypositions_in_pixels
- whether positions are in pixel unitsfirst_alignment
- alignment of first tab stopfirst_position
- position of first tab stop_ellipsis
- additional alignment/position pairs- Gibt zurück:
- the newly allocated `PangoTabArray`, which should be freed with [method@Pango.TabArray.free].
-
copy
Copies a `PangoTabArray`.- Gibt zurück:
- the newly allocated `PangoTabArray`, which should be freed with [method@Pango.TabArray.free].
-
free
public void free()Frees a tab array and associated resources. -
getDecimalPoint
public byte getDecimalPoint(int tab_index) 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.- Parameter:
tab_index
- the index of a tab stop- Gibt zurück:
-
getPositionsInPixels
public boolean getPositionsInPixels()Returns %TRUE if the tab positions are in pixels,
%FALSE if they are in Pango units.- Gibt zurück:
- whether positions are in pixels.
-
getSize
public int getSize()Gets the number of tab stops in @tab_array.- Gibt zurück:
- the number of tab stops in the array.
-
getTab
Gets the alignment and position of a tab stop.- Parameter:
tab_index
- tab stop indexalignment
- location to store alignmentlocation
- location to store tab position
-
resize
public void resize(int new_size) Resizes a tab array.
You must subsequently initialize any tabs
that were added as a result of growing the array.- Parameter:
new_size
- new size of the array
-
setDecimalPoint
public void setDecimalPoint(int tab_index, byte decimal_point) 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.- Parameter:
tab_index
- the index of a tab stopdecimal_point
- the decimal point to use
-
setPositionsInPixels
public void setPositionsInPixels(boolean positions_in_pixels) Sets whether positions in this array are specified in
pixels.- Parameter:
positions_in_pixels
- whether positions are in pixels
-
setTab
public void setTab(int tab_index, int alignment, int location) Sets the alignment and location of a tab stop.- Parameter:
tab_index
- the index of a tab stopalignment
- tab alignmentlocation
- tab location in Pango units
-
sort
public void sort()Utility function to ensure that the tab stops are in increasing order. -
toStr
Serializes a `PangoTabArray` to a string.
In the resulting string, serialized tabs are separated by newlines or commas.
Individual tabs are serialized to a string of the form
[ALIGNMENT:]POSITION[:DECIMAL_POINT]
Where ALIGNMENT is one of _left_, _right_, _center_ or _decimal_, and
POSITION is the position of the tab, optionally followed by the unit _px_.
If ALIGNMENT is omitted, it defaults to _left_. If ALIGNMENT is _decimal_,
the DECIMAL_POINT character may be specified as a Unicode codepoint.
Note that all tabs in the array must use the same unit.
A typical example:
100px 200px center:300px right:400px- Gibt zurück:
- a newly allocated string
-
fromString
Deserializes a `PangoTabArray` from a string.
This is the counterpart to [method@Pango.TabArray.to_string].
See that functions for details about the format.- Parameter:
text
- a string- Gibt zurück:
- a new `PangoTabArray`
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-