[][src]Trait gtk::FlowBoxChildExt

pub trait FlowBoxChildExt: 'static {
    fn changed(&self);
fn get_index(&self) -> i32;
fn is_selected(&self) -> bool;
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn emit_activate(&self); }

Trait containing all FlowBoxChild methods.



Required methods

fn changed(&self)

Marks self as changed, causing any state that depends on this to be updated. This affects sorting and filtering.

Note that calls to this method must be in sync with the data used for the sorting and filtering functions. For instance, if the list is mirroring some external data set, and two children changed in the external data set when you call FlowBoxChildExt::changed on the first child, the sort function must only read the new data for the first of the two changed children, otherwise the resorting of the children will be wrong.

This generally means that if you don’t fully control the data model, you have to duplicate the data that affects the sorting and filtering functions into the widgets themselves. Another alternative is to call FlowBoxExt::invalidate_sort on any model change, but that is more expensive.

fn get_index(&self) -> i32

Gets the current index of the self in its FlowBox container.


the index of the self, or -1 if the self is not in a flow box.

fn is_selected(&self) -> bool

Returns whether the self is currently selected in its FlowBox container.


true if self is selected

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

The ::activate signal is emitted when the user activates a child widget in a FlowBox, either by clicking or double-clicking, or by using the Space or Enter key.

While this signal is used as a [keybinding signal][BindingSignal], it can be used by applications for their own purposes.

fn emit_activate(&self)

Loading content...


impl<O: IsA<FlowBoxChild>> FlowBoxChildExt for O[src]

Loading content...