From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16381.19081.326477.851368 at akasha.ijm.jussieu.fr> Date: Thu, 8 Jan 2004 13:18:17 +0100 To: Artem Prisyznuk Cc: lablgtk at kaba.or.jp Subject: Re: Some question about lablgtk2 In-Reply-To: References: Artem Prisyznuk [Thursday 8 January 2004] : > Hello, > > I start develop aplication using lablgtk2, so in development > process some questions was raised. > > 1) I read tutorial about GtkTreeView > > http://scentric.net/temp/tutorial/sec-custom-models.html#sec-custom-models-when > > and I found very useful features in native gtk+-2.0: > > - create custom list and tree models; > - create custom cell renderer; > > Is it possible in lablgtk2 use this features? Right now, no. But it should be feasible. - for GtkTreeModel : we have to make a GObject that forwards all methods of the GtkTreeModel interface to an ocaml object. - ditto for renderers, derive GtkCellRenderer, and implement its virtual method by forwarding them to an ocaml object. > 2) In gtk exists function gtk-tree-model-foreach, and > gtk_tree_model_iter_has_child. > > It very useful for movement on tree_model. But I not found analog > of these function in lablgtk. Yes, these functions are in the CVS now. I can send you a patch if you want. > 3) It is possible save my custom data type in model store. For > ex. I need some like: > > type my_custom_type = ......; > > let cols = new GTree.column_list;; > let my_data_column = cols#add my_custom_type;; Right now, no. There's no point because the renderers wouldn't know what to do with the caml value, but if custom renderers are available, maybe. -- Olivier