CLIM mail archive

[Prev][Next][Index][Thread]

Re: Pointer-documentation ....



Hi,
I have seen my mail would be delivered as NeXT-Mail, sorry...

You can globally define the pointer-documentation-output-window with 

(setf *pointer-documentation-output* pointer-output).
pointer-output is normally the pointer-documentation pane of your  
application. Remark, on the symbolics the sheet-applications have no  
pointer-documentation panes.

(defmacro with-pointer-documentation ((pointer-output) &body body)
  "Set during the execution of the body the default pointer  
documentation
stream of the given pointer-output."
  (let ((ret (gensym)))
    `(let ((,ret  *pointer-documentation-output*))
       (if (and ,pointer-output (streamp ,pointer-output))
	   (setf *pointer-documentation-output* ,pointer-output)
	   (setf *pointer-documentation-output* 

		 (clim::frame-pointer-documentation-output      
*application-frame*)))
       ,@body
       (setf *pointer-documentation-output* ,ret))))

If you use the tracking-pointer, you have two ways to get a  
pointer-documentation:
1. For the objects, that must be documented, exist a special  
presentation type and 


(define-presentation-method highlight-presentation 

			    ((type ..) record stream state)
  (case state
	(:highlight 

	   (clear-window *pointer-documentation-output*)
	   (format *pointer-documentation-output* "Hallo..."))
	(t (clear-window *pointer-documentation-output*)))

This works only if a button is not pressed.

2. Write Inside of the tracking-pointer 

   (tracking-pointer (())
	(:pointer-motion (window x y)
	   (clear-window *pointer-documentation-output*)
	   (when (pointer-on-object x y) 

                  ;; this function must be defined
               (format *pointer-documentation-output* "Hallo..."))
	...


Bye,
   Jan 

0,,


Main Index | Thread Index