[Gtk-sharp-list] Help with TreeModel

Adam Lofts adam@negligible.co.uk
Thu, 29 Jul 2004 21:00:55 +0100


Hi,

I'm writing an app that uses gstreamer# and gtk#, and want to represent
a gstreamer pipeline in a treeview - (a gstreamer pipeline is a tree of
gstreamer elements).

My first thought was to make my top-level gstreamer element implement
the TreeModel interface, but this didn't seem possible in managed code -
can it be done?

I then tried to keep a 'mirrored' representation of my pipeline in a
TreeStore object. I then ran into problems like:

(/home/adam/devel/Videx2/bin/Debug/Videx2.exe:5093): Gtk-WARNING **:
gtktreestore.c:821: Unable to convert from TimeLine to GtkSharpValue

Where TimeLine is a class implementing the Gst.Thread object.

I seem to be able to create 'wrapper' classes to hold a reference to my
pipeline elements and put these in a TreeStore - but it seems such an
ugly solution.

Can anyone help me out?

Thanks,
Adam