CLIM mail archive



    Date: Tue, 25 Jun 1991 18:40 EDT
    From: Richard Lamson <>

	Date: Tue, 25 Jun 91 14:37:00 CDT
	From: David Neves <>

	In CLIM 1.0.

	I would like to have bitmapped buttons.

	Suppose I had some Lisp code to put up a bitmap.  I would now like to have
	CLIM know that this bitmap is on the screen so that I could define a
	presentation-to-command translator.  How can I do this?

    In general, anything you can draw can be a presentation.  Surround the
    code which does the output with WITH-OUTPUT-AS-PRESENTATION.

      (with-output-as-presentation (:stream window :object 'button :type 'my-button)
	(render-button window))

    where RENDER-BUTTON actually does the drawing you want.

I think someone already pointed out that there is no real language in
CLIM 1.0 for displaying bitmaps, except to use DRAW-RECTANGLE* with an
ink that is a pattern (the thing you get from MAKE-PATTERN)
corresponding to the bitmap.  (The function DRAW-ICON implements this
idiom.)  However, there is a bug in the alignment of untiled patterns
that causes the icon to come out wrong on every platform I have tried.

This bug should be fixed in CLIM 1.0.

CLIM 2.0 should do a better job of describing the issues surrounding
bitmaps and images.


Main Index | Thread Index