Next: , Previous: AtkRelationSet, Up: Top


18 AtkSelection

The ATK interface implemented by container objects whose children can be selected.

18.1 Overview

<atk-selection> should be implemented by UI components with children which are exposed by <atk-object-ref-child> and <atk-object-get-n-children>, if the use of the parent UI component ordinarily involves selection of one or more of the objects corresponding to those <atk-object> children - for example, selectable lists.

Note that other types of "selection" (for instance text selection) are accomplished a other ATK interfaces - <atk-selection> is limited to the selection/deselection of children.

18.2 Usage

— Class: <atk-selection>

Derives from <ginterface>.

This class defines no direct slots.

— Signal on <atk-selection>: selection-changed

The "selection-changed" signal is emitted by an object which implements AtkSelection interface when the selection changes.

— Function: atk-selection-add-selection (self <atk-selection>) (int) ⇒  (ret bool)
— Method: add-selection

Adds the specified accessible child of the object to the object's selection.

selection
a <gobject> instance that implements AtkSelectionIface
i
a <gint> specifying the child index.
ret
TRUE if success, FALSE otherwise.
— Function: atk-selection-clear-selection (self <atk-selection>) ⇒  (ret bool)
— Method: clear-selection

Clears the selection in the object so that no children in the object are selected.

selection
a <gobject> instance that implements AtkSelectionIface
ret
TRUE if success, FALSE otherwise.
— Function: atk-selection-ref-selection (self <atk-selection>) (int) ⇒  (ret <atk-object>)
— Method: ref-selection

Gets a reference to the accessible object representing the specified selected child of the object. Note: callers should not rely on ‘#f’ or on a zero value for indication of whether AtkSelectionIface is implemented, they should use type checking/interface checking macros or the atk-get-accessible-value convenience method.

selection
a <gobject> instance that implements AtkSelectionIface
i
a <gint> specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
ret
an <atk-object> representing the selected accessible , or ‘#f’ if selection does not implement this interface.
— Function: atk-selection-get-selection-count (self <atk-selection>) ⇒  (ret int)
— Method: get-selection-count

Gets the number of accessible children currently selected. Note: callers should not rely on ‘#f’ or on a zero value for indication of whether AtkSelectionIface is implemented, they should use type checking/interface checking macros or the atk-get-accessible-value convenience method.

selection
a <gobject> instance that implements AtkSelectionIface
ret
a gint representing the number of items selected, or 0 if selection does not implement this interface.
— Function: atk-selection-is-child-selected (self <atk-selection>) (int) ⇒  (ret bool)
— Method: is-child-selected

Determines if the current child of this object is selected Note: callers should not rely on ‘#f’ or on a zero value for indication of whether AtkSelectionIface is implemented, they should use type checking/interface checking macros or the atk-get-accessible-value convenience method.

selection
a <gobject> instance that implements AtkSelectionIface
i
a <gint> specifying the child index.
ret
a gboolean representing the specified child is selected, or 0 if selection does not implement this interface.
— Function: atk-selection-remove-selection (self <atk-selection>) (int) ⇒  (ret bool)
— Method: remove-selection

Removes the specified child of the object from the object's selection.

selection
a <gobject> instance that implements AtkSelectionIface
i
a <gint> specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
ret
TRUE if success, FALSE otherwise.
— Function: atk-selection-select-all-selection (self <atk-selection>) ⇒  (ret bool)
— Method: select-all-selection

Causes every child of the object to be selected if the object supports multiple selections.

selection
a <gobject> instance that implements AtkSelectionIface
ret
TRUE if success, FALSE otherwise.