atk.hypertext_mixin

Module for [Hypertext] interface mixin

Templates 2

tmplHypertextT()

The ATK interface which provides standard mechanism for manipulating hyperlinks.

An interface used for objects which implement linking between multiple resource or content locations, or multiple 'markers' within a single document. A Hypertext instance is associated with one or more Hyperlinks, which are associated with particular offsets within the Hypertext's included content. While this interface is derived from Text, there is no requirement that Hypertext instances have textual content; they may implement Image as well, and Hyperlinks need not have non-zero text offsets.

Functions
atk.hyperlink.Hyperlink getLink(int linkIndex)

Gets the link in this hypertext document at index link_index

Parameters

linkIndexan integer specifying the desired link

Returns

the link in this hypertext document at

index link_index

int getLinkIndex(int charIndex)

Gets the index into the array of hyperlinks that is associated with the character specified by char_index.

Parameters

charIndexa character index

Returns

an index into the array of hyperlinks in hypertext,

or -1 if there is no hyperlink associated with this character.

int getNLinks()

Gets the number of links within this hypertext document.

Returns

the number of links within this hypertext document
gulong connectLinkSelected(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == int))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : atk.hypertext.Hypertext))) && Parameters!T.length < 3)

Connect to LinkSelected signal.

The "link-selected" signal is emitted by an AtkHyperText object when one of the hyperlinks associated with the object is selected.

Parameters

callbacksignal callback delegate or function to connect void callback(int arg1, atk.hypertext.Hypertext hypertext) arg1 the index of the hyperlink which is selected (optional) hypertext the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
tmplHypertextGidBuilderT()