Re: [gnomemm] Creating a custom Gnome::Canvas::Item
- From: Murray Cumming <murrayc usa net>
- To: Michael Babcock <mbabcock la creatureshop henson com>
- Cc: gnomemm-list <gnomemm-list gnome org>
- Subject: Re: [gnomemm] Creating a custom Gnome::Canvas::Item
- Date: 17 Jul 2002 20:04:31 +0100
On Wed, 2002-07-17 at 19:54, Michael Babcock wrote:
> Hmmm. I'm not familiar with the internals of how gtkmm wraps gtk (or I
> try not to be), so tokens like GNOME_CANVAS_ITEM, g_object_new, and
> get_type don't mean much to me ;)
They aren't meant to, though they would to a GTK+ coder. Just trust me
on this one. If it works then we'll make it easier.
> I looked at line.{h,cc}g but it is also wrapping an existing C type. In
> the above what does get_type() return, the C equivalent of a
> Canvas::Item type or of a Canvas::Line type?
The most-derived wrapped type - Canvas::Item if you inherit from that.
> Do I have to create a new C
> type?
Hopefully not. Try it and see. If you do need to then we already have a
system for that too.
> I was hoping to be able to derive a new C++ Canvas::Item type and have
> the library handle the conversion issues between the C++ and the Glib
> object systems, like gtkmm does so that we can derive a new Gtk::Widget.
Like I said, I don't know how this is done in C, or whether it's
something that makes sense. If you just try it then we will know
something from your results.
> I guess I have to use the property system in order to get the canvas to
> properly update my new item when I change it, right?
Possibly. I don't know much about CanvasItems. Maybe they use properties
in the same way as Gtk::CellRenderers. I've never investigated them.
> Am I suppose to use
> the ConstructParams constructor for this?
Almost certainly not.
--
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]