atkmm 2.28.3

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:
[legend]

## Public Member Functions
| Selection (Selection && src) noexcept
Selection & | operator= (Selection && src) noexcept
| ~Selection () noexcept override
AtkSelection * | gobj ()
| Provides access to the underlying C GObject. More...
const AtkSelection * | gobj () const
| Provides access to the underlying C GObject. More...
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::Object > | get_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::SignalProxy< void > | signal_selection_changed ()
Public Member Functions inherited from Glib::Interface
| Interface ()
| Interface (Interface &&src) noexcept
Interface & | operator= (Interface &&src) noexcept
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
| ~Interface () noexcept override
| Interface (const Interface &)=delete
Interface & | operator= (const Interface &)=delete
GObject * | gobj ()
const GObject * | gobj () const
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable () noexcept
| trackable (const trackable &src) noexcept
| trackable (trackable &&src)
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src)
void | remove_destroy_notify_callback (void *data) const

## Static Public Member Functions
static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...

## Protected Member Functions
| Selection ()
| You should derive from this class to use it. More...
virtual bool | add_selection_vfunc (int i)
virtual bool | clear_selection_vfunc ()
virtual Glib::RefPtr< Atk::Object > | get_selection_vfunc (int i)
virtual int | get_selection_count_vfunc () const
virtual bool | is_child_selected_vfunc (int i) const
virtual bool | remove_selection_vfunc (int i)
virtual bool | select_all_selection_vfunc ()
virtual void | on_selection_changed ()
| This is a default handler for the signal signal_selection_changed(). More...
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Atk::Selection > | wrap (AtkSelection * object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## 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.

## Constructor & Destructor Documentation

## ◆ Selection() [1/2]

Atk::Selection::Selection | ( |  | ) |
| protected

You should derive from this class to use it.

## ◆ Selection() [2/2]

Atk::Selection::Selection | ( | Selection && | src | ) |
| noexcept

## ◆ ~Selection()

Atk::Selection::~Selection | ( |  | ) |
| override noexcept

## Member Function Documentation

## ◆ add_interface()

static void Atk::Selection::add_interface | ( | GType | gtype_implementer | ) |
| static

## ◆ add_selection()

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

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

Parameters

  i | A `int` specifying the child index.

Returns
  `true` if success, `false` otherwise.

## ◆ add_selection_vfunc()

virtual bool Atk::Selection::add_selection_vfunc | ( | int | i | ) |
| protected virtual

## ◆ clear_selection()

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.

## ◆ clear_selection_vfunc()

virtual bool Atk::Selection::clear_selection_vfunc | ( |  | ) |
| protected virtual

## ◆ get_selection()

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 `nullptr` 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

  i | A `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 `nullptr` if selection does not implement this interface.

## ◆ get_selection_count()

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

Gets the number of accessible children currently selected.

Note
  callers should not rely on `nullptr` 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.

## ◆ get_selection_count_vfunc()

virtual int Atk::Selection::get_selection_count_vfunc | ( |  | ) | const
| protected virtual

## ◆ get_selection_vfunc()

virtual Glib::RefPtr< Atk::Object > Atk::Selection::get_selection_vfunc | ( | int | i | ) |
| protected virtual

## ◆ get_type()

static GType Atk::Selection::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

## ◆ gobj() [1/2]

AtkSelection * Atk::Selection::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const AtkSelection * Atk::Selection::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ is_child_selected()

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 `nullptr` 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

  i | A `int` specifying the child index.

Returns
  A `bool` representing the specified child is selected, or 0 if selection does not implement this interface.

## ◆ is_child_selected_vfunc()

virtual bool Atk::Selection::is_child_selected_vfunc | ( | int | i | ) | const
| protected virtual

## ◆ on_selection_changed()

virtual void Atk::Selection::on_selection_changed | ( |  | ) |
| protected virtual

This is a default handler for the signal signal_selection_changed().

## ◆ operator=()

Selection & Atk::Selection::operator= | ( | Selection && | src | ) |
| noexcept

## ◆ remove_selection()

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

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

Parameters

  i | A `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.

## ◆ remove_selection_vfunc()

virtual bool Atk::Selection::remove_selection_vfunc | ( | int | i | ) |
| protected virtual

## ◆ select_all_selection()

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.

## ◆ select_all_selection_vfunc()

virtual bool Atk::Selection::select_all_selection_vfunc | ( |  | ) |
| protected virtual

## ◆ signal_selection_changed()

Glib::SignalProxy< void > Atk::Selection::signal_selection_changed | ( |  | ) |

Slot Prototype:
  `void on_my_selection_changed()`

Flags: Run Last

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

## Friends And Related Function Documentation

## ◆ wrap()

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

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

Parameters

  object | The C instance.
  take_copy | False 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.