5.14 Window
Emacsy aims to offer the minimal amount of intrusion to acquire big
gains in program functionality. Windows is an optional module for
Emacsy. If you want to offer windows that behave like Emacs windows,
you can, but you aren’t required to.
- Class: <window>
The window class contains a renderable window that is associated with
a buffer.
- Class: <internal-window>
The internal window class contains other windows.
- Variable: root-window
- Variable: window-configuration-change-hook
- Variable: current-window
- Scheme Procedure: initialize (obj <internal-window>) initargs
- Scheme Procedure: window? o
- Scheme Procedure: window-live? o
- Scheme Procedure: frame-root-window
- Scheme Procedure: edges->bcoords edges
Emacs uses the edges of windows (left top right bottom), but
I’m more comfortable using bounded coordinate systems
(left bottom width height). So let’s write some converters.
- Scheme Procedure: bcoords->edges coords
- Scheme Procedure: window-clone (window <window>)
- Scheme Procedure: selected-window
- Scheme Procedure: update-window (window <internal-window>)
- Scheme Procedure: window-tree (w <internal-window>)
- Scheme Procedure: window-tree (w <window>)
- Scheme Procedure: window-list #:optional (w root-window)
- Interactive Procedure: split-window #:optional (window (selected-window)) (size 0.5) (side (quote below))
-
Be careful with deep-clone. If you deep clone one window that
has references to other windows, you will clone entire object graph.
- Interactive Procedure: split-window-below #:optional (size 0.5)
-
- Interactive Procedure: split-window-right #:optional (size 0.5)
-
- Interactive Procedure: delete-window #:optional (window (selected-window))
-
- Interactive Procedure: other-window #:optional (count 1)
-
Cycling order for recenter-top-bottom.
- Interactive Procedure: recenter-top-bottom #:optional arg
-