Lisp HUG Maillist Archive

Variable-sized panes for column/row layouts?

So, I don't know if what I'd like to do is easily done.

I'd like to resize the height of a child output pane based on the width 
of the layout it is in. For example, let's say I have an output pane I'm 
display text into. As the width of the pane shrinks, the height of the 
pane should increase in order to compensate.

Has anyone tried doing this before?

I've thought about doing this in the resize-callback of the output-pane, 
which gets called when the layout resizes it, but if I change the 
geometry in there will it recursively call the callback? I've also 
thought about making a subclass of column-layout with its own 
calculate-layout method, but I haven't done that before and without an 
example, and I'd rather not go down an arduous path without knowing 
that's what I'm supposed to do.

Jeff M.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Variable-sized panes for column/row layouts?

Jeffrey Massung wrote on Tue, 14 Jan 2014 09:07:21 -0600 19:07:

| I've thought about doing this in the resize-callback of the
| output-pane, which gets called when the layout resizes it, but if I
| change the geometry in there will it recursively call the callback?

IMHO, the resize-callback is fine. As all resize events are handled in the
same thread, the following code should work:

(defvar %inside-resize-callback% nil)
(defun pane-on-resize (pane x y width height)
  (unless %inside-resize-callback%)
    (let ((%inside-resize-callback% t))
     ...)))
--
Sincerely,
Dmitry Ivanov
lisp.ystok.ru

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


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