Lisp HUG Maillist Archive

CAPI:OUTPUT-PANE DIFFICULTY

Message
GREETINGS/HELP
 
;;;HERE IS AN EXAMPLE GIVEN IN THE MANUAL ENTRY FOR OUTPUT-PANE
 

(defun display-circle (self x y width height)  (declare (ignore x y width height))  (gp:draw-circle self 200 200 200 :filled t))
 
(capi:contain (make-instance               'capi:output-pane              
                                           :display-callback 'display-circle)              
                                           :best-width 200               
                                           :best-height 200)
 
;;;;IT WORKS.  HOWEVER, I WANT TO INCORPORATE THE OUTPUT-PANE IN THE INTERFACE BELOW IN ORDER TO DISPLAY OTHER SUCH GP ITEMS USING THE FUNCTION output-pane-display-callback.    BUT THE CODE AS IT APPEARS HERE DOES NOT WORK.
 

 (defun display  (self x y width height)  (declare (ignore x y width height))  (gp:draw-circle self 200 200 200 :filled t))
 
(capi:define-interface test  ()
              ()
              (:panes
 
               (click    capi:radio-button
                         :text "click here"
                         :callback-type :interface
                         :callback #'(lambda (interface)  (setf (capi:output-pane-display-callback output)  'display))
                         :text "FOLD")            
 

               (output  capi:output-pane
                        :font (gp:gf nil "times" :medium :roman 10)
                        :accessor display-circle
                        :callback nil
                        :best-width '(:character 200)) )
   
              (:layouts
               (default-layout
 
                capi:grid-layout
                '("" "" "" "" click "" ""  output  )
               :columns 1
 
               :x-adjust :center))
       (:default-initargs  
        :min-width 1000  :min-height 500
        :title "test array          "))  
 

(capi:display (make-instance 'test))
 
 
I WOULD APPRECIATE YOUR HELP.
 
Cyril Fefer

Re: CAPI:OUTPUT-PANE DIFFICULTY

Unable to parse email body. Email id is 1193

Updated at: 2020-12-10 09:00 UTC