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

Re: Sizeing windows

At  5:05 PM 9/4/93 -0400, Robert Bruce Findler wrote:
>I have a window and I want to constrain it so that when you size the
>window, it will only allow a certain ratio of height to width. Which
>method should I shadow to do this? view-click-event-handler does not get
>called when a user clicks in the grow box of a window.

There is some code in the Interface Toolkit that should get you started.
Look at the function GROW-GRAY-RECT in the file
"ccl:interface tools;ift-utils.lisp" and the use of it in the
GROW-WINDOW method in "ccl:interface tools;dialog-editor.lisp".
If you rename GROW-WINDOW to WINDOW-GROW-EVENT-HANDLER, specialize
on your window class, and modify GROW-GRAY-RECT to maintain the
ratio that you desire, you should be golden.