Package ch.bailu.gtk.gtk
Class TextTag
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.TextTag
- All Implemented Interfaces:
PointerInterface
A tag that can be applied to text contained in a `GtkTextBuffer`.
You may wish to begin by reading the
[text widget conceptual overview](section-text-widget.html),
which gives an overview of all the objects and data types
related to the text widget and how they work together.
Tags should be in the [class@Gtk.TextTagTable] for a given
`GtkTextBuffer` before using them with that buffer.
[method@Gtk.TextBuffer.create_tag] is the best way to create tags.
See “gtk4-demo” for numerous examples.
For each property of `GtkTextTag`, there is a “set” property, e.g.
“font-set” corresponds to “font”. These “set” properties reflect
whether a property has been set or not.
They are maintained by GTK and you should not set them independently.
You may wish to begin by reading the
[text widget conceptual overview](section-text-widget.html),
which gives an overview of all the objects and data types
related to the text widget and how they work together.
Tags should be in the [class@Gtk.TextTagTable] for a given
`GtkTextBuffer` before using them with that buffer.
[method@Gtk.TextBuffer.create_tag] is the best way to create tags.
See “gtk4-demo” for numerous examples.
For each property of `GtkTextTag`, there is a “set” property, e.g.
“font-set” corresponds to “font”. These “set” properties reflect
whether a property has been set or not.
They are maintained by GTK and you should not set them independently.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changed
(boolean size_changed) Emits the [signal@Gtk.TextTagTable::tag-changed] signal on the
`GtkTextTagTable` where the tag is included.static ClassHandler
static int
static long
static TypeSystem.TypeSize
int
Get the tag priority.static long
static TypeSystem.TypeSize
void
setPriority
(int priority) Sets the priority of a `GtkTextTag`.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
TextTag
-
TextTag
Creates a `GtkTextTag`.- Parameters:
name
- tag name
-
TextTag
Creates a `GtkTextTag`.- Parameters:
name
- tag name
-
-
Method Details
-
getClassHandler
-
changed
public void changed(boolean size_changed) Emits the [signal@Gtk.TextTagTable::tag-changed] signal on the
`GtkTextTagTable` where the tag is included.
The signal is already emitted when setting a `GtkTextTag` property.
This function is useful for a `GtkTextTag` subclass.- Parameters:
size_changed
- whether the change affects the `GtkTextView` layout
-
getPriority
public int getPriority()Get the tag priority.- Returns:
- The tag’s priority.
-
setPriority
public void setPriority(int priority) Sets the priority of a `GtkTextTag`.
Valid priorities start at 0 and go to one less than
[method@Gtk.TextTagTable.get_size]. Each tag in a table
has a unique priority; setting the priority of one tag shifts
the priorities of all the other tags in the table to maintain
a unique priority for each tag.
Higher priority tags “win” if two tags both set the same text
attribute. When adding a tag to a tag table, it will be assigned
the highest priority in the table by default; so normally the
precedence of a set of tags is the order in which they were added
to the table, or created with [method@Gtk.TextBuffer.create_tag],
which adds the tag to the buffer’s table automatically.- Parameters:
priority
- the new priority
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-