[cl-gtk2-devel] Various issues with using CL-GTK2 as Lisp UI
Kalyanov Dmitry
kalyanov.dmitry at gmail.com
Tue May 11 18:33:05 UTC 2010
On Tuesday 11 May 2010 17:06:21, Jos Dassen wrote:
> Hi,
>
> 1. When I make the GUI with Glade-3 and use cl-gtk2 builder, I get the
> basic GUI right. But I have not managed to create a Cairo surface which
> would allow me to use Cairo for my graphics. My GUI has a GtkDrawingArea
> widget, but using 'builder-get-object' I do not know how convert this to a
> Cairo surface. I have seen the cairo.demo.lisp, but this does not give me
> a clue on how to proceed. Anybody can help me with this ??
By using builder-get-object you can get the GtkDrawingArea widget. You should
subscribe to its 'expose' signal; in the signal handler, you create the cairo
context for GtkDrawingArea's GdkWindow (macro CL-GTK2-CAIRO:WITH-GDK-CONTEXT
does this), then bind it to cl-cairo2:*context* (macro CL-CAIRO2:WITH-CONTEXT
does this) and use functions from cl-cairo2 to draw on it.
----
Кальянов Дмитрий
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://mailman.common-lisp.net/pipermail/cl-gtk2-devel/attachments/20100511/4c4101bc/attachment.sig>
More information about the cl-gtk2-devel
mailing list