public FolderTreeView(FolderTreeModel tree_model)
            : base(tree_model)
        {
            folder_tree_model = tree_model;

            HeadersVisible = false;

            TreeViewColumn column = new TreeViewColumn ();

            CellRendererPixbuf pixbuf_renderer = new CellRendererPixbuf ();
            column.PackStart (pixbuf_renderer, false);
            column.SetCellDataFunc (pixbuf_renderer, PixbufDataFunc as TreeCellDataFunc);

            CellRendererTextProgress folder_renderer = new CellRendererTextProgress ();
            column.PackStart (folder_renderer, true);
            column.SetCellDataFunc (folder_renderer, FolderDataFunc as TreeCellDataFunc);

            AppendColumn (column);

            Gtk.Drag.SourceSet (this, Gdk.ModifierType.Button1Mask | Gdk.ModifierType.Button3Mask,
                    (TargetEntry[])folderTreeSourceTargetList, Gdk.DragAction.Copy | Gdk.DragAction.Move);
        }
示例#2
0
        public FolderTreeView(FolderTreeModel tree_model) : base(tree_model)
        {
            folder_tree_model = tree_model;

            HeadersVisible = false;

            var column = new TreeViewColumn();

            var pixbuf_renderer = new CellRendererPixbuf();

            column.PackStart(pixbuf_renderer, false);
            column.SetCellDataFunc(pixbuf_renderer, PixbufDataFunc);

            var folder_renderer = new CellRendererTextProgress();

            column.PackStart(folder_renderer, true);
            column.SetCellDataFunc(folder_renderer, FolderDataFunc);

            AppendColumn(column);

            Drag.SourceSet(this, Gdk.ModifierType.Button1Mask | Gdk.ModifierType.Button3Mask,
                           (TargetEntry[])folderTreeSourceTargetList, Gdk.DragAction.Copy | Gdk.DragAction.Move);
        }