Creates an Atk::AttributeSet which consists of the default values of attributes for the text.
See the enum AtkTextAttribute for types of text attributes that can be returned. Note that other attributes may also be returned.
Returns:
An Atk::AttributeSet which contains the default values of attributes. at offset . This Atk::AttributeSet should be freed by a call to atk_attribute_set_free().
Creates an Atk::AttributeSet which consists of the attributes explicitly set at the position offset in the text.
start_offset and end_offset are set to the start and end of the range around offset where the attributes are invariant. See the enum AtkTextAttribute for types of text attributes that can be returned. Note that other attributes may also be returned.
Parameters:
offset
The offset at which to get the attributes.
start_offset
The address to put the start offset of the range.
end_offset
The address to put the end offset of the range.
Returns:
An Atk::AttributeSet which contains the attributes explicitly set at offset . This Atk::AttributeSet should be freed by a call to atk_attribute_set_free().
The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
start_offset
Passes back the start position of the selected region.
end_offset
Passes back the end position of the selected region.
If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character after the offset is returned.
If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string is from the word start after the offset to the next word start.
The returned string will contain the word after the offset if the offset is inside a word or if the offset is not inside a word.
If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string is from the word end at or after the offset to the next work end.
The returned string will contain the word after the offset if the offset is inside a word and will contain the word after the word after the offset if the offset is not inside a word.
If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned string is from the sentence start after the offset to the next sentence start.
The returned string will contain the sentence after the offset if the offset is inside a sentence or if the offset is not inside a sentence.
If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string is from the sentence end at or after the offset to the next sentence end.
The returned string will contain the sentence after the offset if the offset is inside a sentence and will contain the sentence after the sentence after the offset if the offset is not inside a sentence.
If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned string is from the line start after the offset to the next line start.
If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string is from the line end at or after the offset to the next line start.
If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the offset is returned.
If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string is from the word start at or before the offset to the word start after the offset.
The returned string will contain the word at the offset if the offset is inside a word and will contain the word before the offset if the offset is not inside a word.
If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string is from the word end before the offset to the word end at or after the offset.
The returned string will contain the word at the offset if the offset is inside a word and will contain the word after to the offset if the offset is not inside a word.
If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned string is from the sentence start at or before the offset to the sentence start after the offset.
The returned string will contain the sentence at the offset if the offset is inside a sentence and will contain the sentence before the offset if the offset is not inside a sentence.
If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string is from the sentence end before the offset to the sentence end at or after the offset.
The returned string will contain the sentence at the offset if the offset is inside a sentence and will contain the sentence after the offset if the offset is not inside a sentence.
If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned string is from the line start at or before the offset to the line start after the offset.
If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string is from the line end before the offset to the line end at or after the offset.
If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character before the offset is returned.
If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string is from the word start before the word start before the offset to the word start before the offset.
The returned string will contain the word before the offset if the offset is inside a word and will contain the word before the word before the offset if the offset is not inside a word.
If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string is from the word end before the word end at or before the offset to the word end at or before the offset.
The returned string will contain the word before the offset if the offset is inside a word or if the offset is not inside a word.
If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned string is from the sentence start before the sentence start before the offset to the sentence start before the offset.
The returned string will contain the sentence before the offset if the offset is inside a sentence and will contain the sentence before the sentence before the offset if the offset is not inside a sentence.
If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string is from the sentence end before the sentence end at or before the offset to the sentence end at or before the offset.
The returned string will contain the sentence before the offset if the offset is inside a sentence or if the offset is not inside a sentence.
If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned string is from the line start before the line start ar or before the offset to the line start ar or before the offset.
If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string is from the line end before the line end before the offset to the line end before the offset.
The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
Returns:
true if success, false otherwise.
virtual bool Atk::Text::remove_selection_vfunc
(
int
selection_num
)
[protected, virtual]
bool Atk::Text::set_caret_offset
(
int
offset
)
Sets the caret (cursor) position to the specified offset .
Parameters:
offset
Position.
Returns:
true if success, false otherwise.
virtual bool Atk::Text::set_caret_offset_vfunc
(
int
offset
)
[protected, virtual]
bool Atk::Text::set_selection
(
int
selection_num,
int
start_offset,
int
end_offset
)
Changes the start and end offset of the specified selection.
Parameters:
selection_num
The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.