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 12:53:47 +0100
On Wed, 2002-07-17 at 01:59, Michael Babcock wrote:
> Does anybody have an example that creates a new Canvas::Item class by
> derivation in C++?
>
> There is no default constructor,
A default constructor would probably just call g_object_new() without
property values, but I'm not sure whether that would create anything
useful. You could try to simulate it by calling the base cast
constructor, like so:
Thing::Thing(Group& parentx, int something)
: Gnome::Canvas;:Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
{
item_construct(parentx);
}
That's just some code that I copied from line.ccg and modified.
If that is useful then we could add a real default constructor to make
it easier.
--
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]