[cl-gtk2-devel] GtkDrawingArea

Erik Winkels aerique at xs4all.nl
Thu Feb 24 12:21:28 UTC 2011


Hello Doug,

On Wed, Feb 23, 2011 at 11:02:00PM -0500, Doug South wrote:
> 
> I'm trying to use a GtkDrawingArea with cl-gtk2 and am wondering if it
> is possible. I didn't have much luck with:
[...]
>     (let ((drawing-area (make-instance 'gtk:drawing-area :width 1500
> :height 300))
[...]
> As a sanity check, I tried doing the same thing in C:
[...]
> 	gtk_widget_set_size_request(drawing_area, 1500, 300);

I don't have a recent cl-gtk2 on hand, but have you looked at the sample
code that comes with it to see how things should be done?

For example, if you look at gtk/gtk.demo.lisp you'll see that heights and
widths are mostly set using {height,width}-request:

    (let* ((window (make-instance 'gtk-window :title "Test pixbuf" :width-request 600 :height-request 240))

However, I couldn't find a specific DrawingArea example.  There's one in my
Black Tie library but it uses an UI designed with Glade:

    http://github.com/aerique/black-tie/tree/master/examples

Regards,
Erik




More information about the cl-gtk2-devel mailing list