Re: Subclassing Gtk2::CellRenderer (reprise)



muppet wrote:

Bjarne Steinsbø said:
Torsten Schoenfeld wrote:
To demonstrate how amazingly cool this is, I've attached two examples.
[snip]
This is just sooo great.  Here I am, thinking about having to write a
renderer for entering dates.  And before I even get started, Torsten
provides a finished solution that looks great.

well, not "finished" yet; this stuff is highly experimental!

Finished or not, it seems to work already! Of course I have not tried it out in production yet, and of course it could be further improved. But still... It's bl**dy marvelous!

hot on the heels of torsten's work on the renderers, i'm retooling the
cellrenderer class stuff to behave a little better.  after a bit of hacking
last night, i created something that will let you create a new subclass of
*any* cell renderer, by fiddling with the type system on the fly in XS.

i will post more info about this, and some code, later today.


Looking forward to it.

Wonder what happens when I start thinking about a renderer for
sets/flags (select multiple from a list).  Or sub-classing the
TreeStore... :-)

heh, i have ideas for that, but no code... yet.  implementing a treemodel
requires the ability to implement GInterfaces, which currently doesn't exist
in gtk2-perl.  my current plans for that are to have each interface offer a
constructor to which you supply references to the functions you want to be
called; that constructor puts together the proper marshalling for your
functions and returns a GInterface which you can supply to
Glib::Type::register (or Glib::Object::Subclass).  this will require a fair
amount of machinery in Glib, but should be generally useful.

if you'd like to be my guinea pig for the treemodel subclassing stuff, let me
know.  :-)

Sure! Keep the good stuff coming! I have no idea what you're talking about, nor what I'm agreeing to. But being a guinea pig is normally fun! :-)


Bjarne




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