Skip to main content

SelectionExt

Trait SelectionExt 

Source
pub trait SelectionExt:
    IsA<Selection>
    + Sealed
    + 'static {
    // Provided methods
    fn add_selection(&self, i: i32) -> bool { ... }
    fn clear_selection(&self) -> bool { ... }
    fn selection_count(&self) -> i32 { ... }
    fn is_child_selected(&self, i: i32) -> bool { ... }
    fn ref_selection(&self, i: i32) -> Option<Object> { ... }
    fn remove_selection(&self, i: i32) -> bool { ... }
    fn select_all_selection(&self) -> bool { ... }
    fn connect_selection_changed<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Selection methods.

§Implementors

NoOpObject, Selection

Provided Methods§

Source

fn add_selection(&self, i: i32) -> bool

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

§i

a gint specifying the child index.

§Returns

TRUE if success, FALSE otherwise.

Source

fn clear_selection(&self) -> bool

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

§Returns

TRUE if success, FALSE otherwise.

Source

fn selection_count(&self) -> i32

Gets the number of accessible children currently selected. Note: callers should not rely on None 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 gint representing the number of items selected, or 0 if self does not implement this interface.

Source

fn is_child_selected(&self, i: i32) -> bool

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 AtkSelectionIface is implemented, they should use type checking/interface checking macros or the atk_get_accessible_value() convenience method.

§i

a gint specifying the child index.

§Returns

a gboolean representing the specified child is selected, or 0 if self does not implement this interface.

Source

fn ref_selection(&self, i: i32) -> Option<Object>

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 AtkSelectionIface is implemented, they should use type checking/interface checking macros or the atk_get_accessible_value() convenience method.

§i

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

§Returns

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

Source

fn remove_selection(&self, i: i32) -> bool

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

§i

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

§Returns

TRUE if success, FALSE otherwise.

Source

fn select_all_selection(&self) -> bool

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

§Returns

TRUE if success, FALSE otherwise.

Source

fn connect_selection_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§