[]Struct gtk::ListBox

pub struct ListBox(_, _);

A ListBox is a vertical container that contains ListBoxRow children. These rows can by dynamically sorted and filtered, and headers can be added dynamically depending on the row content. It also allows keyboard and mouse navigation and selection like a typical list.

Using ListBox is often an alternative to TreeView, especially when the list contents has a more complicated layout than what is allowed by a CellRenderer, or when the contents is interactive (i.e. has a button in it).

Although a ListBox must have only ListBoxRow children you can add any kind of widget to it via ContainerExt::add, and a ListBoxRow widget will automatically be inserted between the list and the widget.

GtkListBoxRows can be marked as activatable or selectable. If a row is activatable, ListBox::row-activated will be emitted for it when the user tries to activate it. If it is selectable, the row will be marked as selected when the user tries to select it.

The ListBox widget was added in GTK+ 3.10.

ListBox as Buildable

The ListBox implementation of the Buildable interface supports setting a child as the placeholder by specifying “placeholder” as the “type” attribute of a <child> element. See ListBoxExt::set_placeholder for info.

CSS nodes

list
╰── row[.activatable]

ListBox uses a single CSS node named list. Each ListBoxRow uses a single CSS node named row. The row nodes get the .activatable style class added when appropriate.

Implements

ListBoxExt, ContainerExt, WidgetExt, glib::object::ObjectExt, BuildableExt, ListBoxExtManual, WidgetExtManual, BuildableExtManual

Methods

impl ListBox[src]

pub fn new() -> ListBox[src]

Creates a new ListBox container.

Returns

a new ListBox

Trait Implementations

impl Clone for ListBox

impl Debug for ListBox

impl Default for ListBox[src]

impl Display for ListBox[src]

impl Eq for ListBox

impl Hash for ListBox

impl IsA<Buildable> for ListBox

impl IsA<Container> for ListBox

impl IsA<Widget> for ListBox

impl Ord for ListBox

impl<T: ObjectType> PartialEq<T> for ListBox

impl<T: ObjectType> PartialOrd<T> for ListBox

impl StaticType for ListBox

Auto Trait Implementations

impl RefUnwindSafe for ListBox

impl !Send for ListBox

impl !Sync for ListBox

impl Unpin for ListBox

impl UnwindSafe for ListBox

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.