atkmm  2.22.7
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Atk::Selection Class Reference

The ATK interface implemented by container objects whose Atk::Object children can be selected. More...

#include <atkmm/selection.h>

Inheritance diagram for Atk::Selection:
Inheritance graph
[legend]

Public Member Functions

AtkSelection* gobj ()
 Provides access to the underlying C GObject.
 
const AtkSelection* gobj () const
 Provides access to the underlying C GObject.
 
bool add_selection (int i)
 Adds the specified accessible child of the object to the object's selection. More...
 
bool clear_selection ()
 Clears the selection in the object so that no children in the object are selected. More...
 
Glib::RefPtr< Atk::Objectget_selection (int i)
 Gets a reference to the accessible object representing the specified selected child of the object. More...
 
int get_selection_count () const
 Gets the number of accessible children currently selected. More...
 
bool is_child_selected (int i) const
 Determines if the current child of this object is selected. More...
 
bool remove_selection (int i)
 Removes the specified child of the object from the object's selection. More...
 
bool select_all_selection ()
 Causes every child of the object to be selected if the object supports multiple selections. More...
 
Glib::SignalProxy0< void > signal_selection_changed ()
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
 

Protected Member Functions

 Selection ()
 You should derive from this class to use it.
 
virtual void on_selection_changed ()
 This is a default handler for the signal signal_selection_changed().
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Atk::Selectionwrap (AtkSelection* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Detailed Description

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

This 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 AtkObject 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 Atk::Selection::add_selection ( int  i)

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

Parameters
iA int specifying the child index.
Returns
true if success, false otherwise.
bool Atk::Selection::clear_selection ( )

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

Returns
true if success, false otherwise.
Glib::RefPtr<Atk::Object> Atk::Selection::get_selection ( int  i)

Gets a reference to the accessible object representing the specified selected child of the object.

Note
callers should not rely on 0 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.
Parameters
iA int 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 0 if selection does not implement this interface.
int Atk::Selection::get_selection_count ( ) const

Gets the number of accessible children currently selected.

Note
callers should not rely on 0 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.
Returns
A int representing the number of items selected, or 0 if selection does not implement this interface.
bool Atk::Selection::is_child_selected ( int  i) const

Determines if the current child of this object is selected.

Note
callers should not rely on 0 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.
Parameters
iA int specifying the child index.
Returns
A bool representing the specified child is selected, or 0 if selection does not implement this interface.
bool Atk::Selection::remove_selection ( int  i)

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

Parameters
iA int specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
Returns
true if success, false otherwise.
bool 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.
Glib::SignalProxy0< void > Atk::Selection::signal_selection_changed ( )
Slot Prototype:
void on_my_selection_changed()

Friends And Related Function Documentation

Glib::RefPtr< Atk::Selection > wrap ( AtkSelection *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.