AtkText: AtkText

Description Methods and Functions Hierarchy Implementations Detailed Description Structures Enums and Flags Signals Author(s) References

Description

The ATK interface implemented by components with text content.

Methods and Functions

atkTextGetText(object, start.offset, end.offset)
atkTextGetCharacterAtOffset(object, offset)
atkTextGetTextAfterOffset(object, offset, boundary.type)
atkTextGetTextAtOffset(object, offset, boundary.type)
atkTextGetTextBeforeOffset(object, offset, boundary.type)
atkTextGetCaretOffset(object)
atkTextGetCharacterExtents(object, offset, coords)
atkTextGetRunAttributes(object, offset)
atkTextGetDefaultAttributes(object)
atkTextGetCharacterCount(object)
atkTextGetOffsetAtPoint(object, x, y, coords)
atkTextGetBoundedRanges(object, rect, coord.type, x.clip.type, y.clip.type)
atkTextGetRangeExtents(object, start.offset, end.offset, coord.type)
atkTextGetNSelections(object)
atkTextGetSelection(object, selection.num)
atkTextAddSelection(object, start.offset, end.offset)
atkTextRemoveSelection(object, selection.num)
atkTextSetSelection(object, selection.num, start.offset, end.offset)
atkTextSetCaretOffset(object, offset)
atkTextAttributeRegister(name)
atkTextAttributeGetName(attr)
atkTextAttributeForName(name)
atkTextAttributeGetValue(attr, index)

Hierarchy

1
2
GInterface
   +----AtkText

Implementations

AtkText is implemented by AtkNoOpObject.

Detailed Description

AtkText should be implemented by AtkObjects on behalf of widgets that have text content which is either attributed or otherwise non-trivial. AtkObjects whose text content is simple, unattributed, and very brief may expose that content via atkObjectGetName instead; however if the text is editable, multi-line, typically longer than three or four words, attributed, selectable, or if the object already uses the 'name' ATK property for other information, the AtkText interface should be used to expose the text content. In the case of editable text content, AtkEditableText (a subtype of the AtkText interface) should be implemented instead. AtkText provides not only traversal facilities and change notification for text content, but also caret tracking and glyph bounding box calculations. Note that the text strings are exposed as UTF-8, and are therefore potentially multi-byte, and caret-to-byte offset mapping makes no assumptions about the character length; also bounding box glyph-to-offset mapping may be complex for languages which use ligatures.

Structures

AtkText

The AtkText structure does not contain any fields.

AtkTextRange

A structure used to describe a text range. AtkTextRange is a transparent-type.

bounds

[AtkTextRectangle] A rectangle giving the bounds of the text range

startOffset

[integer] The start offset of a AtkTextRange

endOffset

[integer] The end offset of a AtkTextRange

content

[character] The text in the text range

AtkTextRectangle

A structure used to store a rectangle used by AtkText. AtkTextRectangle is a transparent-type.

x

[integer] The horizontal coordinate of a rectangle

y

[integer] The vertical coordinate of a rectangle

width

[integer] The width of a rectangle

height

[integer] The height of a rectangle

AtkAttribute

A string name/value pair representing a text attribute. AtkAttribute is a transparent-type.

name

[character] The attribute name. Call atkTextAttrGetName()

value

[character] the value of the attribute, represented as a string. Call atkTextAttrGetValue() for those which are strings. For values which are numbers, the string representation of the number is in value.

Enums and Flags

AtkTextBoundary

Text boundary types used for specifying boundaries for regions of text

char

Boundary is the boundary between characters (including non-printing characters)

word-start

Boundary is the start (i.e. first character) of a word.

word-end

Boundary is the end (i.e. last character) of a word.

sentence-start

Boundary is the first character in a sentence.

sentence-end

Boundary is the last (terminal) character in a sentence; in languages which use "sentence stop" punctuation such as English, the boundary is thus the '.', '?', or similar terminal punctuation character.

line-start

Boundary is the initial character of the content or a character immediately following a newline, linefeed, or return character.

line-end

Boundary is the linefeed, or return character.

AtkTextClipType

Describes the type of clipping required.

none

No clipping to be done

min

Text clipped by min coordinate is omitted

max

Text clipped by max coordinate is omitted

both

Only text fully within mix/max bound is retained

AtkTextAttribute

Describes the text attributes supported

invalid

Invalid attribute

left-margin

The pixel width of the left margin

right-margin

The pixel width of the right margin

indent

The number of pixels that the text is indented

invisible

Either "true" or "false" indicating whether text is visible or not

editable

Either "true" or "false" indicating whether text is editable or not

pixels-above-lines

Pixels of blank space to leave above each line.

pixels-below-lines

Pixels of blank space to leave below each line.

pixels-inside-wrap

Pixels of blank space to leave between wrapped lines inside the same line (paragraph).

bg-full-height

"true" or "false" whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character.

rise

Number of pixels that the characters are risen above the baseline

underline

"none", "single", "double" or "low"

strikethrough

"true" or "false" whether the text is strikethrough

size

The size of the characters.

scale

The scale of the characters. The value is a string representation of a double

weight

The weight of the characters.

language

The language used

family-name

The font family name

bg-color

The background color. The value is an RGB value of the format "u,u,u"

fg-color

The foreground color. The value is an RGB value of the format "u,u,u"

bg-stipple

"true" if a GdkBitmap is set for stippling the background color.

fg-stipple

"true" if a GdkBitmap is set for stippling the foreground color.

wrap-mode

The wrap mode of the text, if any. Values are "none", "char", "word", or "word_char".

direction

The direction of the text, if set. Values are "none", "ltr" or "rtl"

justification

The justification of the text, if set. Values are "left", "right", "center" or "fill"

stretch

The stretch of the text, if set. Values are "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded"

variant

The capitalization variant of the text, if set. Values are "normal" or "small_caps"

style

The slant style of the text, if set. Values are "normal", "oblique" or "italic"

last-defined

not a valid text attribute, used for finding end of enumeration

Signals

text-attributes-changed(atktext, user.data)

The "text-attributes-changed" signal is emitted when the text attributes of the text of an object which implements AtkText changes.

atktext

[AtkText] the object which received the signal.

user.data

[R object] user data set when the signal handler was connected.

text-caret-moved(atktext, arg1, user.data)

The "text-caret-moved" signal is emitted when the caret position of the text of an object which implements AtkText changes.

atktext

[AtkText] the object which received the signal.

arg1

[integer] The new position of the text caret.

user.data

[R object] user data set when the signal handler was connected.

text-changed(atktext, arg1, arg2, user.data)

The "text-changed" signal is emitted when the text of the object which implements the AtkText interface changes, This signal will have a detail which is either "insert" or "delete" which identifies whether the text change was an insertion or a deletion

atktext

[AtkText] the object which received the signal.

arg1

[integer] The position (character offset) of the insertion or deletion.

arg2

[integer] The length (in characters) of text inserted or deleted.

user.data

[R object] user data set when the signal handler was connected.

text-selection-changed(atktext, user.data)

The "text-selection-changed" signal is emitted when the selected text of an object which implements AtkText changes.

atktext

[AtkText] the object which received the signal.

user.data

[R object] user data set when the signal handler was connected.

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://developer.gnome.org/atk/stable/AtkText.html


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.

Related to AtkText in RGtk2...