2 * Copyright (C) 2010 Red Hat Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 (** This is the base class for the file tree.
21 The types and functions in this file should be considered
22 private to the file tree implementation.
24 See {!Filetree} for the full description and public interface. *)
30 model : GTree.tree_store;
31 hash : (int, hdata) Hashtbl.t;
32 index_col : int GTree.column;
33 mode_col : string GTree.column;
34 name_col : string GTree.column;
35 size_col : int64 GTree.column;
36 date_col : string GTree.column;
37 link_col : string GTree.column;
40 and hdata = state_t * content_t
50 | ErrorMessage of string
53 | Directory of Slave.direntry
54 | File of Slave.direntry
56 val store_hdata : t -> Gtk.tree_iter -> hdata -> unit
57 val get_hdata : t -> Gtk.tree_iter -> hdata
58 (* Store/retrieve hdata structure in a model row. *)
60 val find_child_node_by_hdata : t -> Gtk.tree_iter -> hdata -> Gtk.tree_iter
61 (* [find_child_node_by_hdata t row hdata] searches the direct children
62 of [row] looking for one which exactly matches [hdata] and returns
63 that child. If no child found, raises [Not_found]. *)
65 val get_pathname : t -> Gtk.tree_iter -> Slave.source * string
66 (* Get the full path to a row by chasing up through the tree to the
67 top. This also returns the source (eg. operating system or single