TextTag

A tag that can be applied to text contained in a gtk.text_buffer.TextBuffer.

You may wish to begin by reading the text widget conceptual overview, 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 gtk.text_tag_table.TextTagTable for a given gtk.text_buffer.TextBuffer before using them with that buffer.

gtk.text_buffer.TextBuffer.createTag is the best way to create tags. See “gtk4-demo” for numerous examples.

For each property of gtk.text_tag.TextTag, 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.

class TextTag : ObjectWrap {}

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(string name)

Creates a gtk.text_tag.TextTag.

Members

Functions

changed
void changed(bool sizeChanged)

Emits the signalGtk.TextTagTable::tag-changed signal on the gtk.text_tag_table.TextTagTable where the tag is included.

getPriority
int getPriority()

Get the tag priority.

self
TextTag self()

Returns this, for use in with statements.

setPriority
void setPriority(int priority)

Sets the priority of a gtk.text_tag.TextTag.

Properties

accumulativeMargin
bool accumulativeMargin [@property getter]

Get accumulativeMargin property.

accumulativeMargin
bool accumulativeMargin [@property setter]

Set accumulativeMargin property.

allowBreaks
bool allowBreaks [@property getter]

Get allowBreaks property.

allowBreaks
bool allowBreaks [@property setter]

Set allowBreaks property.

allowBreaksSet
bool allowBreaksSet [@property getter]
allowBreaksSet
bool allowBreaksSet [@property setter]
background
string background [@property setter]

Set background property.

backgroundFullHeight
bool backgroundFullHeight [@property getter]

Get backgroundFullHeight property.

backgroundFullHeight
bool backgroundFullHeight [@property setter]

Set backgroundFullHeight property.

backgroundFullHeightSet
bool backgroundFullHeightSet [@property getter]
backgroundFullHeightSet
bool backgroundFullHeightSet [@property setter]
backgroundRgba
gdk.rgba.RGBA backgroundRgba [@property getter]

Get backgroundRgba property.

backgroundRgba
gdk.rgba.RGBA backgroundRgba [@property setter]

Set backgroundRgba property.

backgroundSet
bool backgroundSet [@property getter]
backgroundSet
bool backgroundSet [@property setter]
direction
gtk.types.TextDirection direction [@property getter]

Get direction property.

direction
gtk.types.TextDirection direction [@property setter]

Set direction property.

editable
bool editable [@property getter]

Get editable property.

editable
bool editable [@property setter]

Set editable property.

editableSet
bool editableSet [@property getter]
editableSet
bool editableSet [@property setter]
fallback
bool fallback [@property getter]

Get fallback property.

fallback
bool fallback [@property setter]

Set fallback property.

fallbackSet
bool fallbackSet [@property getter]
fallbackSet
bool fallbackSet [@property setter]
family
string family [@property getter]

Get family property.

family
string family [@property setter]

Set family property.

familySet
bool familySet [@property getter]
familySet
bool familySet [@property setter]
font
string font [@property getter]

Get font property.

font
string font [@property setter]

Set font property.

fontDesc
pango.font_description.FontDescription fontDesc [@property getter]

Get fontDesc property.

fontDesc
pango.font_description.FontDescription fontDesc [@property setter]

Set fontDesc property.

fontFeatures
string fontFeatures [@property getter]

Get fontFeatures property.

fontFeatures
string fontFeatures [@property setter]

Set fontFeatures property.

fontFeaturesSet
bool fontFeaturesSet [@property getter]
fontFeaturesSet
bool fontFeaturesSet [@property setter]
foreground
string foreground [@property setter]

Set foreground property.

foregroundRgba
gdk.rgba.RGBA foregroundRgba [@property getter]

Get foregroundRgba property.

foregroundRgba
gdk.rgba.RGBA foregroundRgba [@property setter]

Set foregroundRgba property.

foregroundSet
bool foregroundSet [@property getter]
foregroundSet
bool foregroundSet [@property setter]
gType
GType gType [@property getter]
indent
int indent [@property getter]

Get indent property.

indent
int indent [@property setter]

Set indent property.

indentSet
bool indentSet [@property getter]
indentSet
bool indentSet [@property setter]
insertHyphens
bool insertHyphens [@property getter]

Get insertHyphens property.

insertHyphens
bool insertHyphens [@property setter]

Set insertHyphens property.

insertHyphensSet
bool insertHyphensSet [@property getter]
insertHyphensSet
bool insertHyphensSet [@property setter]
invisible
bool invisible [@property getter]

Get invisible property.

invisible
bool invisible [@property setter]

Set invisible property.

invisibleSet
bool invisibleSet [@property getter]
invisibleSet
bool invisibleSet [@property setter]
justification
gtk.types.Justification justification [@property getter]

Get justification property.

justification
gtk.types.Justification justification [@property setter]

Set justification property.

justificationSet
bool justificationSet [@property getter]
justificationSet
bool justificationSet [@property setter]
language
string language [@property getter]

Get language property.

language
string language [@property setter]

Set language property.

languageSet
bool languageSet [@property getter]
languageSet
bool languageSet [@property setter]
leftMargin
int leftMargin [@property getter]

Get leftMargin property.

leftMargin
int leftMargin [@property setter]

Set leftMargin property.

leftMarginSet
bool leftMarginSet [@property getter]
leftMarginSet
bool leftMarginSet [@property setter]
letterSpacing
int letterSpacing [@property getter]

Get letterSpacing property.

letterSpacing
int letterSpacing [@property setter]

Set letterSpacing property.

letterSpacingSet
bool letterSpacingSet [@property getter]
letterSpacingSet
bool letterSpacingSet [@property setter]
lineHeight
float lineHeight [@property getter]

Get lineHeight property.

lineHeight
float lineHeight [@property setter]

Set lineHeight property.

lineHeightSet
bool lineHeightSet [@property getter]
lineHeightSet
bool lineHeightSet [@property setter]
overline
pango.types.Overline overline [@property getter]

Get overline property.

overline
pango.types.Overline overline [@property setter]

Set overline property.

overlineRgba
gdk.rgba.RGBA overlineRgba [@property getter]

Get overlineRgba property.

overlineRgba
gdk.rgba.RGBA overlineRgba [@property setter]

Set overlineRgba property.

overlineRgbaSet
bool overlineRgbaSet [@property getter]
overlineRgbaSet
bool overlineRgbaSet [@property setter]
overlineSet
bool overlineSet [@property getter]
overlineSet
bool overlineSet [@property setter]
paragraphBackground
string paragraphBackground [@property setter]

Set paragraphBackground property.

paragraphBackgroundRgba
gdk.rgba.RGBA paragraphBackgroundRgba [@property getter]

Get paragraphBackgroundRgba property.

paragraphBackgroundRgba
gdk.rgba.RGBA paragraphBackgroundRgba [@property setter]

Set paragraphBackgroundRgba property.

paragraphBackgroundSet
bool paragraphBackgroundSet [@property setter]
paragraphBackgroundSet
bool paragraphBackgroundSet [@property getter]
pixelsAboveLines
int pixelsAboveLines [@property setter]

Set pixelsAboveLines property.

pixelsAboveLines
int pixelsAboveLines [@property getter]

Get pixelsAboveLines property.

pixelsAboveLinesSet
bool pixelsAboveLinesSet [@property getter]
pixelsAboveLinesSet
bool pixelsAboveLinesSet [@property setter]
pixelsBelowLines
int pixelsBelowLines [@property getter]

Get pixelsBelowLines property.

pixelsBelowLines
int pixelsBelowLines [@property setter]

Set pixelsBelowLines property.

pixelsBelowLinesSet
bool pixelsBelowLinesSet [@property getter]
pixelsBelowLinesSet
bool pixelsBelowLinesSet [@property setter]
pixelsInsideWrap
int pixelsInsideWrap [@property getter]

Get pixelsInsideWrap property.

pixelsInsideWrap
int pixelsInsideWrap [@property setter]

Set pixelsInsideWrap property.

pixelsInsideWrapSet
bool pixelsInsideWrapSet [@property getter]
pixelsInsideWrapSet
bool pixelsInsideWrapSet [@property setter]
rightMargin
int rightMargin [@property getter]

Get rightMargin property.

rightMargin
int rightMargin [@property setter]

Set rightMargin property.

rightMarginSet
bool rightMarginSet [@property getter]
rightMarginSet
bool rightMarginSet [@property setter]
rise
int rise [@property getter]

Get rise property.

rise
int rise [@property setter]

Set rise property.

riseSet
bool riseSet [@property getter]
riseSet
bool riseSet [@property setter]
scale
double scale [@property getter]

Get scale property.

scale
double scale [@property setter]

Set scale property.

scaleSet
bool scaleSet [@property getter]
scaleSet
bool scaleSet [@property setter]
sentence
bool sentence [@property getter]

Get sentence property.

sentence
bool sentence [@property setter]

Set sentence property.

sentenceSet
bool sentenceSet [@property getter]
sentenceSet
bool sentenceSet [@property setter]
showSpaces
pango.types.ShowFlags showSpaces [@property getter]

Get showSpaces property.

showSpaces
pango.types.ShowFlags showSpaces [@property setter]

Set showSpaces property.

showSpacesSet
bool showSpacesSet [@property getter]
showSpacesSet
bool showSpacesSet [@property setter]
size
int size [@property getter]

Get size property.

size
int size [@property setter]

Set size property.

sizePoints
double sizePoints [@property getter]

Get sizePoints property.

sizePoints
double sizePoints [@property setter]

Set sizePoints property.

sizeSet
bool sizeSet [@property getter]
sizeSet
bool sizeSet [@property setter]
stretch
pango.types.Stretch stretch [@property getter]

Get stretch property.

stretch
pango.types.Stretch stretch [@property setter]

Set stretch property.

stretchSet
bool stretchSet [@property getter]
stretchSet
bool stretchSet [@property setter]
strikethrough
bool strikethrough [@property getter]

Get strikethrough property.

strikethrough
bool strikethrough [@property setter]

Set strikethrough property.

strikethroughRgba
gdk.rgba.RGBA strikethroughRgba [@property getter]

Get strikethroughRgba property.

strikethroughRgba
gdk.rgba.RGBA strikethroughRgba [@property setter]

Set strikethroughRgba property.

strikethroughRgbaSet
bool strikethroughRgbaSet [@property getter]

Get strikethroughRgbaSet property.

strikethroughRgbaSet
bool strikethroughRgbaSet [@property setter]

Set strikethroughRgbaSet property.

strikethroughSet
bool strikethroughSet [@property getter]
strikethroughSet
bool strikethroughSet [@property setter]
style
pango.types.Style style [@property getter]

Get style property.

style
pango.types.Style style [@property setter]

Set style property.

styleSet
bool styleSet [@property getter]
styleSet
bool styleSet [@property setter]
tabs
pango.tab_array.TabArray tabs [@property getter]

Get tabs property.

tabs
pango.tab_array.TabArray tabs [@property setter]

Set tabs property.

tabsSet
bool tabsSet [@property getter]
tabsSet
bool tabsSet [@property setter]
textTransform
pango.types.TextTransform textTransform [@property getter]

Get textTransform property.

textTransform
pango.types.TextTransform textTransform [@property setter]

Set textTransform property.

textTransformSet
bool textTransformSet [@property getter]
textTransformSet
bool textTransformSet [@property setter]
underline
pango.types.Underline underline [@property getter]

Get underline property.

underline
pango.types.Underline underline [@property setter]

Set underline property.

underlineRgba
gdk.rgba.RGBA underlineRgba [@property getter]

Get underlineRgba property.

underlineRgba
gdk.rgba.RGBA underlineRgba [@property setter]

Set underlineRgba property.

underlineRgbaSet
bool underlineRgbaSet [@property getter]

Get underlineRgbaSet property.

underlineRgbaSet
bool underlineRgbaSet [@property setter]

Set underlineRgbaSet property.

underlineSet
bool underlineSet [@property getter]
underlineSet
bool underlineSet [@property setter]
variant
pango.types.Variant variant [@property getter]

Get variant property.

variant
pango.types.Variant variant [@property setter]

Set variant property.

variantSet
bool variantSet [@property getter]
variantSet
bool variantSet [@property setter]
weight
int weight [@property getter]

Get weight property.

weight
int weight [@property setter]

Set weight property.

weightSet
bool weightSet [@property getter]
weightSet
bool weightSet [@property setter]
word
bool word [@property getter]

Get word property.

word
bool word [@property setter]

Set word property.

wordSet
bool wordSet [@property getter]
wordSet
bool wordSet [@property setter]
wrapMode
gtk.types.WrapMode wrapMode [@property getter]

Get wrapMode property.

wrapMode
gtk.types.WrapMode wrapMode [@property setter]

Set wrapMode property.

wrapModeSet
bool wrapModeSet [@property getter]
wrapModeSet
bool wrapModeSet [@property setter]

Static functions

getGType
GType getGType()

Inherited Members

From ObjectWrap

setGObject
void setGObject(void* cObj, Flag!"Take" take)

Set the GObject of a D ObjectWrap wrapper.

cPtr
void* cPtr(Flag!"Dup" dup)

Get a pointer to the underlying C object.

ref_
void* ref_(void* gObj)

Calls g_object_ref() on a GObject.

unref
unref(void* gObj)

Calls g_object_unref() on a GObject.

getType
GType getType()

Get the GType of an object.

gType
GType gType [@property getter]

GObject GType property.

self
ObjectWrap self()

Convenience method to return this cast to a type. For use in D with statements.

getDObject
T getDObject(void* cptr, Flag!"Take" take)

Template to get the D object from a C GObject and cast it to the given D object type.

connectSignalClosure
ulong connectSignalClosure(string signalDetail, DClosure closure, Flag!"After" after)

Connect a D closure to an object signal.

setProperty
void setProperty(string propertyName, T val)

Template for setting a GObject property.

getProperty
T getProperty(string propertyName)

Template for getting a GObject property.

compatControl
size_t compatControl(size_t what, void* data)
bindProperty
gobject.binding.Binding bindProperty(string sourceProperty, gobject.object.ObjectWrap target, string targetProperty, gobject.types.BindingFlags flags)

Creates a binding between source_property on source and target_property on target.

bindPropertyFull
gobject.binding.Binding bindPropertyFull(string sourceProperty, gobject.object.ObjectWrap target, string targetProperty, gobject.types.BindingFlags flags, gobject.closure.Closure transformTo, gobject.closure.Closure transformFrom)

Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

forceFloating
void forceFloating()

This function is intended for #GObject implementations to re-enforce a floating[floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling gobject.object.ObjectWrap.refSink.

freezeNotify
void freezeNotify()

Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

getData
void* getData(string key)

Gets a named field from the objects table of associations (see gobject.object.ObjectWrap.setData).

getProperty
void getProperty(string propertyName, gobject.value.Value value)

Gets a property of an object.

getQdata
void* getQdata(glib.types.Quark quark)

This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata.

getv
void getv(string[] names, gobject.value.Value[] values)

Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

isFloating
bool isFloating()

Checks whether object has a floating[floating-ref] reference.

notify
void notify(string propertyName)

Emits a "notify" signal for the property property_name on object.

notifyByPspec
void notifyByPspec(gobject.param_spec.ParamSpec pspec)

Emits a "notify" signal for the property specified by pspec on object.

refSink
gobject.object.ObjectWrap refSink()

Increase the reference count of object, and possibly remove the floating[floating-ref] reference, if object has a floating reference.

runDispose
void runDispose()

Releases all references to other objects. This can be used to break reference cycles.

setData
void setData(string key, void* data)

Each object carries around a table of associations from strings to pointers. This function lets you set an association.

setProperty
void setProperty(string propertyName, gobject.value.Value value)

Sets a property on an object.

stealData
void* stealData(string key)

Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

stealQdata
void* stealQdata(glib.types.Quark quark)

This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

thawNotify
void thawNotify()

Reverts the effect of a previous call to gobject.object.ObjectWrap.freezeNotify. The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

watchClosure
void watchClosure(gobject.closure.Closure closure)

This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling gobject.closure.Closure.invalidate on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, gobject.object.ObjectWrap.ref_ and gobject.object.ObjectWrap.unref are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

connectNotify
ulong connectNotify(string detail, T callback, Flag!"After" after)

Connect to Notify signal.