garrigue / lablgtk

LablGTK 2 and 3: an interface to the GIMP Tool Kit
https://garrigue.github.io/lablgtk
Other
89 stars 40 forks source link

Feature request: add entry_completion to cell_renderer_text #153

Open nguermond opened 2 years ago

nguermond commented 2 years ago

I would like to add an entry_completion to a cell_renderer_text for my project (see an example in python). This requires the signal

signal editing_started : CellEditable GtkTreePathString

of cell_renderer (see gtk documentation).

There seems to be missing an implementation of CellEditable:

Warning: no conversion for type CellEditable in class GtkCellRenderer

but I don't know what needs to be done. If someone could point me in the right direction I would be happy to try to implement this.

garrigue commented 1 year ago

Sorry not to have answered this question. This is not trivial. Basically, you need to create a new widget on the ocaml side, which is not well supported. For an example of how to do that, you can see GtkTree.CustomModel, GTree.custom_tree_model_type, ml_gtktree.c.