Sorry, I accidentally sent this off of the list. The original email is
below.

---------- Forwarded message ----------
From: natan yellin <[EMAIL PROTECTED]>
Date: Fri, Jun 6, 2008 at 3:47 PM
Subject: Re: (Gtkmm) How to use Gdk::Window in Gtk::DrawingArea
To: [EMAIL PROTECTED]


This is also doable with Cairo. You can create a cairo context for the
DrawingArea's GdkWindow and then draw onto that.

Natan


On Thu, May 29, 2008 at 2:48 PM, Paul Davis <[EMAIL PROTECTED]>
wrote:

>
> On Thu, 2008-05-29 at 15:53 +0800, Dinh Khac Thanh wrote:
> >
> > Hi all,
> >
> > I am porting a program from Qt to Gtkmm and needs to draw some
> > "items"(basically a "item" contains an icon, a label and some other
> > small details) on a drawing area. In the Qt source, it is implemented
> > like this: each "item" inherited from CanvasRectangle and then will be
> > put on a Canvas. However I got trouble implementing in gtkmm.
> >
> > I decided to use a Gtk::DrawingArea widget as the canvas and
> > Gdk::Window as the items and then use draw_pixmap() to put them on the
> > canvas. I made up a "item" class which inherits from Gdk::Window and
> > contains method to draw icon/text/etc on itself. The problem arises
> > when Gdk::Window's constructor is called. I cannot find Gdk::Window's
> > constructor details in the gtkmm online reference, thus I cannot
> > implement the "item"'s constructor.
> >
> > Could anyone help me with Gdk::Window 's constructor details or
> > suggest a different approach ? Thank you in advance.
>
> use GnomeCanvas, not DrawingArea. despite its name, its not part of
> Gnome. there is a *mm wrapper for it. you will save yourself significant
> work.
>
> --p
>
>
>
> _______________________________________________
> gtk-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to