Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Atk::Selection Class Reference

An AtkSelection C++ wrapper class. More...

`#include <inti/atk/selection.h>`

Inheritance diagram for Inti::Atk::Selection:

List of all members.

## Public Member Functions

Accessors

- AtkSelection * atk_selection () const
    Get a pointer to the AtkSelection structure.
- AtkSelectionIface * atk_selection_iface () const
    Get a pointer to the AtkSelectionIface structure.
- operator AtkSelection * () const
    Conversion operator; safely converts a Selection to an AtkSelection pointer.
- int get_selection_count () const
    Gets the number of accessible children currently selected.
- bool is_child_selected (int i) const
    Determines if the current child of this object is selected.

Methods

- bool add_selection (int i)
    Adds the specified accessible child of the object to the object's selection.
- bool clear_selection ()
    Clears the selection in the object so that no children in the object are selected.
- Object * ref_selection (int i)
    Gets a pointer to the accessible object representing the specified selected child of the object.
- bool remove_selection (int i)
    Removes the specified child of the object from the object's selection.
- bool select_all_selection ()
    Causes every child of the object to be selected if the object supports multiple selections.

Signal Proxies

- const SelectionChangedSignalProxy sig_selection_changed ()
    Connect to the selection_changed_signal; emitted when an object's selection changes.

## Protected Member Functions

Constructors

- virtual ~Selection ()=0
    Destructor.

Signal Handlers

- virtual void on_selection_changed ()
    Called when an object's selection changes.

## Detailed Description

An AtkSelection C++ wrapper class.

Selection should be implemented by UI components with children which are exposed by Atk::Object::ref_accessible_child() and Atk::Object::get_n_accessible_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.

## Member Function Documentation

bool Inti::Atk::Selection::add_selection | ( | int | i | ) |

  | Adds the specified accessible child of the object to the object's selection. Parameters:
  i | An integer specifying the child index.
Returns: true if success, false otherwise.

bool Inti::Atk::Selection::clear_selection | ( |  | ) |

| Clears the selection in the object so that no children in the object are selected. Returns: true if successful, false otherwise.

int Inti::Atk::Selection::get_selection_count | ( |  | ) | const

| Gets the number of accessible children currently selected. Returns: An integer representing the number of items selected, or 0 if selection does not implement this interface. Note: callers should not rely on null or on a zero value for an indication of whether the Selection interface is implemented, they should use is_a(ATK_TYPE_SELECTION).

bool Inti::Atk::Selection::is_child_selected | ( | int | i | ) | const

  | Determines if the current child of this object is selected. Parameters:
  i | An integer specifying the child index.
Returns: true if the child is selected, or false if selection does not implement this interface. Note: callers should not rely on null or on a zero value for an indication of whether the Selection interface is implemented, they should use is_a(ATK_TYPE_SELECTION).

Object* Inti::Atk::Selection::ref_selection | ( | int | i | ) |

  | Gets a pointer to the accessible object representing the specified selected child of the object. Parameters:
  i | An integer specifying the index in the selection set (that is, the ith selection as opposed to the ith child).
Returns: An Atk::bject representing the selected accessible , or null if selection does not implement this interface. Note: callers should not rely on null or on a zero value for indication of whether the Selection interface is implemented, they should use is_a(ATK_TYPE_SELECTION).

bool Inti::Atk::Selection::remove_selection | ( | int | i | ) |

  | Removes the specified child of the object from the object's selection. Parameters:
  i | An integer specifying the index in the selection set (that is, the ith selection as opposed to the ith child).
Returns: true if success, false otherwise.

bool Inti::Atk::Selection::select_all_selection | ( |  | ) |

| Causes every child of the object to be selected if the object supports multiple selections. Returns: true if success, false otherwise.

The documentation for this class was generated from the following file:

- atk/selection.h

Main Page - Footer