Scrolling lets you work on a document that is larger than the window, but by the same token it means that much of the document is hidden at any one time. Suppose the user needs to refer to two widely separated portions of a document at the same time. The user could open another window on the same document and scroll both windows to different locations; however, windows must be resized individually so that they don’t overlap. A more convenient solution is to divide a window into separate “panes,” as shown in the figure below, each of which can display a different portion of the document.
A Window with Two Views on a Document
A window that can be divided into multiple panes is called a "splitter window." A splitter window contains split boxes at the top of the vertical scroll bar and at the left of the horizontal scroll bar. By double-clicking a split box, the user can divide a window vertically or horizontally into panes. The panes are separated by a "split bar"; each pane can be scrolled independently to display a different portion of the document. The user can also drag the split bar to resize both panes at once.
The following figure shows a Scribble window split into two panes.
Scribble Document Window Split into Two Panes
Each pane in a splitter window represents a separate view object. In the figure above, each pane is an instance of the CScribbleView
class, but it’s not necessary for the panes to use the same view class. You can use different classes for different panes. This technique is useful when, for example, you want one pane to display an outline of a document while the other pane displays the full text.