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

Movable borders between independent views

Jonathan meeks writes
 I plan to have two independent views separated by an adjustable
 border (much like the backtrace window).  i would like to make
 the border a dialog that, when clicked, creates a ghost border
 that moves with the mouse vertically (within certain size constraints).
 When one lets go of the mouse the two views resize with the border
 at the location the ghost box was dropped.

I assume that the ghost border affects views within the same
window. The technique used in the backtrace window 
is called pane-splitting. One use is to
allow multiple views into the same document a la Microsoft Word.
Another is to change the size of related views. For examples on
pane-splitting, see scroll-bar-dialog-items.lisp in the library
folder. In particular see the routines:
            pane-splitter split-pane pane-splitter-corners
            pane-splitter-position set-pane-splitter-position
            draw-pane-splitter-outline pane-splitter-outline-position
That should give you ideas about starting. You can also look at
Cartier's apropos system available from the contrib directory.
He has examples that should how to constrain a window to "grow"
vertically within certain limits.