[−][src]Trait gtk::ListBoxRowExt
Required methods
fn changed(&self)
Marks self
as changed, causing any state that depends on this
to be updated. This affects sorting, filtering and headers.
Note that calls to this method must be in sync with the data
used for the row functions. For instance, if the list is
mirroring some external data set, and two rows changed in the
external data set then when you call ListBoxRowExt::changed
on the first row the sort function must only read the new data
for the first of the two changed rows, otherwise the resorting
of the rows 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 listbox
row functions into the row widgets themselves. Another alternative
is to call ListBoxExt::invalidate_sort
on any model change,
but that is more expensive.
fn get_activatable(&self) -> bool
Gets the value of the ListBoxRow:activatable
property
for this row.
Returns
true
if the row is activatable
fn get_header(&self) -> Option<Widget>
Returns the current header of the self
. This can be used
in a GtkListBoxUpdateHeaderFunc
to see if there is a header
set already, and if so to update the state of it.
Returns
the current header, or None
if none
fn get_index(&self) -> i32
Gets the current index of the self
in its ListBox
container.
Returns
the index of the self
, or -1 if the self
is not in a listbox
fn get_selectable(&self) -> bool
Gets the value of the ListBoxRow:selectable
property
for this row.
Returns
true
if the row is selectable
fn is_selected(&self) -> bool
Returns whether the child is currently selected in its
ListBox
container.
Returns
true
if self
is selected
fn set_activatable(&self, activatable: bool)
Set the ListBoxRow:activatable
property for this row.
activatable
true
to mark the row as activatable
fn set_header<P: IsA<Widget>>(&self, header: Option<&P>)
Sets the current header of the self
. This is only allowed to be called
from a GtkListBoxUpdateHeaderFunc
. It will replace any existing
header in the row, and be shown in front of the row in the listbox.
header
the header, or None
fn set_selectable(&self, selectable: bool)
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
This is a keybinding signal, which will cause this row to be activated.
If you want to be notified when the user activates a row (by key or not),
use the ListBox::row-activated
signal on the row’s parent ListBox
.
fn emit_activate(&self)
fn connect_property_activatable_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_selectable_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<ListBoxRow>> ListBoxRowExt for O
[src]
fn changed(&self)
[src]
fn get_activatable(&self) -> bool
[src]
fn get_header(&self) -> Option<Widget>
[src]
fn get_index(&self) -> i32
[src]
fn get_selectable(&self) -> bool
[src]
fn is_selected(&self) -> bool
[src]
fn set_activatable(&self, activatable: bool)
[src]
fn set_header<P: IsA<Widget>>(&self, header: Option<&P>)
[src]
fn set_selectable(&self, selectable: bool)
[src]
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn emit_activate(&self)
[src]
fn connect_property_activatable_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_selectable_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId