[GRASS5] Embedding GRASS display in my application
Sajith VK
sajithvk at hotpop.com
Tue May 4 11:10:24 EDT 2004
Hi all,
Thanks Glynn for the help...(And sorry for delay in trying)
It worked perfectly when I passed XID of a window, But nothing
happended when I passwd XID of a gnomecanvas.window...
May be some issue with gnomecanvas or so.. I will try...
B/w I read that display modules and XDRIVER communicates
through sockets/fifo. (Am I correct?).. Can I read the
draw instrucions from the socket/fifo and write myown
functions to render them to my canvas? If possible it offers
me highest flexibility....
Sorry if my question is meaningless, I am just a bigginer
in grass programming....
Thanks for your help,
On Sun, 2004-04-25 at 00:11, Glynn Clements wrote:
> > Thanks! it is enough, I dont plan to use my application is windows.
> > But will it render on my canvas, or in the entire window?
> > The driver knows only XID of my window, how can it render
> > on my canvas, which is one amoung several widgets in my window?
> > My window has menus, toobar etc and a canvas widget on which
> > I want to render the GRASS display...
>
> In which case, you need to pass the XID of the canvas widget's window,
> not the top-level window.
>
> X "windows" aren't limited to top-level windows (the ones with a title
> bar etc); each widget normally has its own window. Most toolkits have
> some exceptions, e.g. menu items are often "gadgets", which are just
> rectangular regions of the parent window, but "canvas" widgets (e.g.
> GtkDrawingArea, XmDrawingArea) usually have their own window.
>
> Incidentally, XDRIVER doesn't draw directly onto the window. Instead,
> it creates a background pixmap for the window, and draws on that. That
> eliminates the need to redraw the window in response to Expose events.
--
"Freedom Matters"
Sajith VK
More information about the grass-dev
mailing list