atk.Selection

atk.Selection — the ATK interface implemented by container objects whose atk.Object children can be selected.

Synopsis

class atk.Selection(gobject.GInterface):
    def add_selection(i)
def clear_selection()
def ref_selection(i)
def get_selection_count()
def is_child_selected(i)
def remove_selection(i)
def select_all_selection()

atk.Selection Signal Prototypes

"selection-changed"

def callback(atkselection, user_param1, ...)

Description

atk.Selection should be implemented by UI components with children which are exposed by the ref_accessible_child() and get_n_accessible_children() methods, 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.

Methods

atk.Selection.add_selection

    def add_selection(i)

i :

an index specifying the child index.

Returns :

True if success, False otherwise.

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

atk.Selection.clear_selection

    def clear_selection()

Returns :

True if success, False otherwise.

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

atk.Selection.ref_selection

    def ref_selection(i)

i :

an index specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).

Returns :

an atk.Object representing the selected accessible , or None if the selection does not implement this interface.

Gets a reference to the accessible object representing the specified selected child of the object. Note: callers should not rely on None or on a zero value for indication of whether the atk.Selection interface is implemented.

atk.Selection.get_selection_count

    def get_selection_count()

Returns :

an integer representing the number of items selected, or 0 if the selection does not implement this interface.

Gets the number of accessible children currently selected. Note: callers should not rely on None or on a zero value for indication of whether the atk.Selection interface is implemented.

atk.Selection.is_child_selected

    def is_child_selected(i)

i :

an index specifying the child index.

Returns :

True if the specified child is selected, or 0 if the selection does not implement this interface.

Determines if the current child of this object is selected Note: callers should not rely on None or on a zero value for indication of whether the atk.Selection interface is implemented.

atk.Selection.remove_selection

    def remove_selection(i)

i :

an index specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).

Returns :

True if success, False otherwise.

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

atk.Selection.select_all_selection

    def select_all_selection()

Returns :

True if success, False otherwise.

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

Signals

The "selection-changed" atk.Selection Signal

    def callback(atkselection, user_param1, ...)

atkselection :

the object which received the signal.

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

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