Using image as pinboard-layout background
Folks, I would like to use an image as the background in a class derives from pinboard layout. What is the easiest way to accomplish this? Thanks, Joel -- http://wagerlabs.com/uptick
Folks, I would like to use an image as the background in a class derives from pinboard layout. What is the easiest way to accomplish this? Thanks, Joel -- http://wagerlabs.com/uptick
I don't know as if this is a great way to do it, but here's a fairly quick This is just proof of concept, i.e. you'd probably want to find a nice way to setup this code; it's not particularly clean now. Nonetheless, I hope it helps. I'm going to assume for the moment that you can load and display images. To display the image on the background, you could do something like this (not the cleanest code in the world, but it illustrates the point) ;; define an interface that has a pinboard-layout (capi:define-interface pbl () () (:panes (pbl capi:pinboard-layout :description (list (make-instance 'capi:text-input-pane :x 20 :y 100) (make-instance 'capi:push-button-panel :x 30 :y 200 :items '(1 2 3)))))) ;; Here, we make an instance of one (you could probably do this in ;; an initialize-interface). pinboard-layout is a derived from output-pane, ;; so you can get/set the display-callback. We save the old callback, and ;; make a new one which will call the old one after drawing the background. (let ((pb (make-instance 'pbl))) (with-slots (pbl) pb (let ((old-display (capi:output-pane-display-callback pbl))) (setf (capi:output-pane-display-callback pbl) #'(lambda (pane x y w h) (gp:draw-circle pane x y 30) (funcall old-display pane x y w h))))) (capi:display pb)) (capi:display (make-instance 'pbl)) On 10/08/05, Joel Reymont <joelr1@gmail.com> wrote: > Folks, > > I would like to use an image as the background in a class derives > from pinboard layout. > > What is the easiest way to accomplish this? > > Thanks, Joel > > -- > http://wagerlabs.com/uptick > > > > -- ===================== Joshua Taylor tayloj@rpi.edu
Unable to parse email body. Email id is 4359