[]Struct gtk::TreeStore

pub struct TreeStore(_, _);

The TreeStore object is a list model for use with a TreeView widget. It implements the TreeModel interface, and consequentially, can use all of the methods available there. It also implements the TreeSortable interface so it can be sorted by the view. Finally, it also implements the tree [drag and drop][gtk3-TreeView-drag-and-drop] interfaces.

TreeStore as Buildable

The TreeStore implementation of the Buildable interface allows to specify the model columns with a <columns> element that may contain multiple <column> elements, each specifying one model column. The “type” attribute specifies the data type for the column.

An example of a UI Definition fragment for a tree store:

<object class="GtkTreeStore">
  <columns>
    <column type="gchararray"/>
    <column type="gchararray"/>
    <column type="gint"/>
  </columns>
</object>

Implements

TreeStoreExt, glib::object::ObjectExt, BuildableExt, TreeDragDestExt, TreeDragSourceExt, TreeModelExt, TreeSortableExt, TreeStoreExtManual, BuildableExtManual, TreeSortableExtManual

Implementations

impl TreeStore[src]

pub fn new(column_types: &[Type]) -> TreeStore[src]

Creates a new tree store as with n_columns columns each of the types passed in. Note that only types derived from standard GObject fundamental types are supported.

As an example, gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_PIXBUF); will create a new TreeStore with three columns, of type gint, gchararray, and gdk_pixbuf::Pixbuf respectively.

n_columns

number of columns in the tree store

Returns

a new TreeStore

Trait Implementations

impl Clone for TreeStore

impl Debug for TreeStore

impl Display for TreeStore[src]

impl Eq for TreeStore

impl Hash for TreeStore

impl IsA<Buildable> for TreeStore

impl IsA<TreeDragDest> for TreeStore

impl IsA<TreeDragSource> for TreeStore

impl IsA<TreeModel> for TreeStore

impl IsA<TreeSortable> for TreeStore

impl Ord for TreeStore

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

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

impl StaticType for TreeStore

Auto Trait Implementations

impl RefUnwindSafe for TreeStore

impl !Send for TreeStore

impl !Sync for TreeStore

impl Unpin for TreeStore

impl UnwindSafe for TreeStore

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, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, 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<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, 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 = Infallible

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.