Virtual Method

AtkTextset_caret_offset

Declaration [src]

gboolean
set_caret_offset (
  AtkText* text,
  gint offset
)

Description [src]

Sets the caret (cursor) position to the specified offset.

In the case of rich-text content, this method should either grab focus or move the sequential focus navigation starting point (if the application supports this concept) as if the user had clicked on the new caret position. Typically, this means that the target of this operation is the node containing the new caret position or one of its ancestors. In other words, after this method is called, if the user advances focus, it should move to the first focusable node following the new caret position.

Calling this method should also scroll the application viewport in a way that matches the behavior of the application’s typical caret motion or tab navigation as closely as possible. This also means that if the application’s caret motion or focus navigation does not trigger a scroll operation, this method should not trigger one either. If the application does not have a caret motion or focus navigation operation, this method should try to scroll the new caret position into view while minimizing unnecessary scroll motion.

Parameters

offset

Type: gint

The character offset of the new caret position.

Return value

Type: gboolean

TRUE if successful, FALSE otherwise.