2

The documentation for gtk2hs CellRenderer says:

The primary use of a CellRenderer is for drawing a certain graphical elements on a Drawable

Looking at the corresponding page for GTK+ I see it has a function

render(cr, widget, background_area, cell_area, flags)

which invokes the virtual render function. However I can't find anything like that in gtk2hs.

So how do I get a CellRenderer onto a Cairo Drawable in gtk2hs?

Paul Johnson
  • 17,438
  • 3
  • 42
  • 59
  • Looking at the API, and based on this commit by Duncan Coutts (https://sourceforge.net/p/gtk2hs/mailman/gtk2hs-commit/?viewmonth=200407), that function is not exported by gtk2hs. Unless you find a workaround, I'd suggest emailing the gtk2hs mailing list, and/or implementing the function in haskell yourself (using Haskell's FFI to rely on the existing implementation in C; see https://hackage.haskell.org/package/gtk3-0.14.6/docs/src/Graphics-UI-Gtk-ModelView-CellRenderer.html#cellRendererStopEditing and the bottom of that file). – Ivan Perez Nov 14 '16 at 08:09

0 Answers0