gtk-sharp0.0.0.0Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.A widget for displaying both trees and lists.
Widget that displays any object that implements the
interface.
To create a tree or list in GTK#, you need to use the interface, in conjunction with the
widget. This widget is designed around a
Model/View/Controller design and consists of four major parts:
, the tree view widget, the view column.The cell renderers (
and others)., the model interface.
The View is composed of the first three, while the last is the
Model. One of the prime benefits of the MVC design is that
multiple views can be created of a single model. For example,
a model mapping the file system could be created for a file
manager. Many views could be created to display various parts
of the file system, but only one copy need be kept in memory.
The purpose of the cell renderers is to provide extensibility
to the widget and to allow multiple ways of rendering the same
type of data. For example, consider how to render a boolean
variable. Should you render it as a string of "True" or
"False", "On" or "Off", or should you render it as a checkbox?
namespace Samples {
using System;
using System.Drawing;
using GLib;
using Gtk;
using GtkSharp;
public class TreeView {
public static void Main (string [] args)
{
TreeStore store = null;
Application.Init ();
store = new TreeStore ((int)TypeFundamentals.TypeString,
(int)TypeFundamentals.TypeString);
TreeIter iter = new TreeIter ();
for (int i=0; i<0; i++)
{
GLib.Value Name = new GLib.Value ("Demo " + i.ToString());
GLib.Value Type = new GLib.Value ("Data " + i.ToString());
store.Append (out iter);
store.SetValue (iter, 0, Name);
store.SetValue (iter, 1, Type);
}
Window win = new Window ("TreeView List Demo");
win.DeleteEvent += new DeleteEventHandler (delete_cb);
win.DefaultSize = new Size (400,250);
ScrolledWindow sw = new ScrolledWindow ();
win.Add (sw);
TreeView tv = new TreeView (store);
tv.HeadersVisible = true;
TreeViewColumn DemoCol = new TreeViewColumn ();
CellRenderer DemoRenderer = new CellRendererText ();
DemoCol.Title = "Demo";
DemoCol.PackStart (DemoRenderer, true);
DemoCol.AddAttribute (DemoRenderer, "text", 0);
tv.AppendColumn (DemoCol);
TreeViewColumn DataCol = new TreeViewColumn ();
CellRenderer DataRenderer = new CellRendererText ();
DataCol.Title = "Data";
DataCol.PackStart (DataRenderer, false);
DataCol.AddAttribute (DataRenderer, "text", 1);
tv.AppendColumn (DataCol);
sw.Add (tv);
sw.Show();
win.ShowAll ();
Application.Run ();
}
private static void delete_cb (System.Object o, DeleteEventArgs args)
{
Application.Quit ();
args.RetVal = true;
}
}
}
Gtk.ContainerAtk.ImplementorGLib.IWrapperGLib.IWrapperSystem.IDisposableMethodSystem.UInt32To be addedTo be added: an object of type 'uint'To be addedMethodSystem.Int32To be added
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'int'To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreeViewColumnDropFunc'
To be added: an object of type 'IntPtr'
To be added: an object of type 'Gtk.DestroyNotify'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'bool'
To be added: an object of type 'float'
To be added: an object of type 'float'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TargetEntry'
To be added: an object of type 'int'
To be added: an object of type 'Gdk.DragAction'
To be addedMethodGdk.PixmapTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gdk.Pixmap'To be addedMethodSystem.VoidTo be addedTo be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'Gtk.TreeViewColumn'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'bool'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'Gdk.Rectangle'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gdk.Rectangle'
To be addedMethodSystem.Int32To be added
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'int'
To be added: an object of type 'int'To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewColumn'
To be addedMethodSystem.BooleanTo be added
To be added: an object of type 'int'
To be added: an object of type 'int'
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'int'
To be added: an object of type 'int'
To be added: an object of type 'bool'To be addedMethodSystem.BooleanTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'bool'To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreeDestroyCountFunc'
To be added: an object of type 'IntPtr'
To be added: an object of type 'Gtk.DestroyNotify'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreeViewSearchEqualFunc'
To be added: an object of type 'IntPtr'
To be added: an object of type 'Gtk.DestroyNotify'
To be addedMethodSystem.VoidTo be addedTo be addedMethodSystem.Int32To be added
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'int'To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewDropPosition'
To be addedMethodSystem.VoidTo be addedTo be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gdk.ModifierType'
To be added: an object of type 'Gtk.TargetEntry'
To be added: an object of type 'int'
To be added: an object of type 'Gdk.DragAction'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'int'
To be added: an object of type 'int'
To be added: an object of type 'int'
To be added: an object of type 'int'
To be addedMethodSystem.BooleanTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'bool'To be addedMethodSystem.BooleanTo be added
To be added: an object of type 'int'
To be added: an object of type 'int'
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewDropPosition'
To be added: an object of type 'bool'To be addedMethodSystem.VoidTo be addedTo be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewDropPosition'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreeViewMappingFunc'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'int'
To be added: an object of type 'int'
To be addedMethodGtk.TreeViewColumnTo be added
To be added: an object of type 'int'
To be added: an object of type 'Gtk.TreeViewColumn'To be addedMethodSystem.BooleanTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'bool'
To be added: an object of type 'bool'To be addedMethodSystem.VoidTo be addedTo be addedMethodSystem.VoidTo be added
To be added: an object of type 'int'
To be added: an object of type 'int'
To be added: an object of type 'int'
To be added: an object of type 'int'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'Gdk.Rectangle'
To be addedMethodSystem.VoidTo be added
To be added: an object of type 'Gtk.TreePath'
To be added: an object of type 'Gtk.TreeViewColumn'
To be addedMethodSystem.VoidDisposes the resources associated with the object.ConstructorInternal constructor
Pointer to the C object.
An instance of TreeView, wrapping the C object.This is an internal constructor, and should not be used by user code.ConstructorTo be addedTo be added: an object of type 'Gtk.TreeView'To be addedConstructorTo be added
To be added: an object of type 'Gtk.TreeModel'
To be added: an object of type 'Gtk.TreeView'To be addedPropertySystem.UInt32The GLib Type for Gtk.TreeViewThe GLib Type for the Gtk.TreeView class.PropertyGtk.TreeModelTo be added
To be added: an object of type 'Gtk.TreeModel'
To be added: an object of type 'Gtk.TreeModel'To be addedPropertyGtk.TreeSelectionTo be addedTo be added: an object of type 'Gtk.TreeSelection'To be addedPropertyGdk.WindowTo be addedTo be added: an object of type 'Gdk.Window'To be addedPropertyGLib.ListTo be addedTo be added: an object of type 'GLib.List'To be addedPropertySystem.BooleanTo be added
To be added: an object of type 'bool'
To be added: an object of type 'bool'To be addedPropertySystem.BooleanTo be added
To be added: an object of type 'bool'
To be added: an object of type 'bool'To be addedPropertySystem.BooleanTo be added
To be added: an object of type 'bool'
To be added: an object of type 'bool'To be addedPropertyGtk.TreeViewColumnTo be added
To be added: an object of type 'Gtk.TreeViewColumn'
To be added: an object of type 'Gtk.TreeViewColumn'To be addedPropertySystem.BooleanTo be added
To be added: an object of type 'bool'
To be added: an object of type 'bool'To be addedPropertyGtk.AdjustmentTo be added
To be added: an object of type 'Gtk.Adjustment'
To be added: an object of type 'Gtk.Adjustment'To be addedPropertySystem.BooleanTo be added
To be added: an object of type 'bool'
To be added: an object of type 'bool'To be addedPropertyGtk.AdjustmentTo be added
To be added: an object of type 'Gtk.Adjustment'
To be added: an object of type 'Gtk.Adjustment'To be addedPropertySystem.Int32To be added
To be added: an object of type 'int'
To be added: an object of type 'int'To be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedEventTo be addedTo be addedConstructorInternal constructor
GLib type for the type
Creates a new instance of TreeView, using the GLib-provided typeThis is a constructor used by derivative types of that would have their own GLib type assigned to it. This is not typically used by C# code.