## window.sl

Window management routines for programmers.

### Installation

Put the file somewhere on your jed_library_path and

       autoload ("save_windows_cmd", "window.sl");
       autoload ("restore_windows_cmd", "window.sl");

in your .jedrc file.

If you need to use the functions in your modes, use

      require("window");

### create_windows(Integer_Type s0, Integer_Type s1 [, ...])

Create a configuration of windows with the desired sizes. Window sizes are defined top to bottom (first param is for topmost window).

The first window with a desired size of 0 will be 'elastic' - it's size will shrink or grow so that other windows. If none of the parameters is 0, the bottom window will be elastic. If the screen is too small, the function may fail.

Example:

       create_windows(4, 0, 2)

will create 3 windows:

     File   Edit   Mode   Search   Buffers   Windows   System   Help
     [EOB]

     -**-----|V0.99.16| Buffer1 () | 1/9,1-------------------------

     -**-----|V0.99.16| Buffer1 () | 9/9,1-------------------------
     [EOB]

     -**-----|V0.99.16| Buffer1 () | 9/9,1-------------------------

The top one has 4 lines, the bottom one 2 lines and the middle has the rest.

### create_windows_rel(Integer_Type s0, Integer_Type s1 [, ...])

Create a configuration of windows with the desired relative sizes. All sizes must be equal or greater than 1.

Example:

       create_windows(40, 60)

will create 2 windows:

     File   Edit   Mode   Search   Buffers   Windows   System   Help
     [EOB]

     -**-----|V0.99.16| Buffer1 () | 9/9,1-------------------------

     [EOB]

     -**-----|V0.99.16| Buffer1 () | 9/9,1-------------------------

The top one is 40% of total height, the bottom one will is 60% of total height.

### WindowInfo_Type save_windows ()

Save window configuration with buffer positions.

Returns a linked list of window information (WindowInfo_Type).

### restore_windows(WindowInfo_Type list)

Restore a configuration of windows that was previously stored with save_windows().

### save_windows_cmd()

Save window configuration with buffer positions into a local variable.

Suitable for a menu entry.

### restore_windows_cmd()

Restore a previously saved configuration of windows. The configuration must have been stored with save_windows_cmd().

Suitable for a menu entry.

### select_top_window()

Select the window at the top of the screen.

### select_bottom_window()

Select the window at the bottom of the screen. The minibuffer is never selected even if it is active.

### select_next_window()

Select the next window. Same as otherwindow().

### select_prev_window()

Select the previous window.