Re: using member functions as callback for Gtk::TreeModelFilter



danielrichter said the following:
Hello,

I'm creating a little program with a filtered listStore and a combobox to
choose the filter.

I have found the Gtk::TreeModelFilter, which allows exactly what I need. In
this time I use a static callback function for sorting. The problem is, that
I need data, which are stored on my List object, which is derived from a
ListView. To access the data, I have to assign a member function, but I
don't know how I can do that.

What can I give a member function to set_visible_func()?

At the moment I use a workaround, which assigns a pointer to the object as
static member to the class, but this doesn't seem to be a clear solution.

Hope anyone can help me.

The chapter of the online book on signals might be helpful to you:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/chapter-signals.html

--
José Alburquerque
jaalburquerque cox net



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]