Lisp HUG Maillist Archive

buffer to window

I have a capi interface with an editor pane. When an editor command is 
executed I have the buffer from which I would like to get my top level 
interface instance. I don't see simple way to do this. I thought 
something like this might work:

(defun buffer-window (buffer)
   (let ((win (first (editor::buffer-windows buffer)))) ; 
(editor:current-window) does not seem to work outside the built-in 
editor
     (when win
       (capi:editor-window (editor:window-text-pane win)))))

But this returns a window of type editor::wm-window, not my capi 
interface window.

Thanks for any suggestions,

John DeSoi, Ph.D.


Re: buffer to window

Hello John,

| I have a capi interface with an editor pane. When an editor command is 
| executed I have the buffer from which I would like to get my top level 
| interface instance. I don't see simple way to do this. I thought 
| something like this might work:
| 
| (defun buffer-window (buffer)
|    (let ((win (first (editor::buffer-windows buffer)))) ; 
| (editor:current-window) does not seem to work outside the built-in 
| editor
|      (when win
|        (capi:editor-window (editor:window-text-pane win)))))

(capi:top-level-interface win)
--
Sincerely,
Dmitri Ivanov
lisp.ystok.ru


Re: buffer to window

Unable to parse email body. Email id is 2020

Updated at: 2020-12-10 08:57 UTC