Working In Multi-Edit

What Is The Difference Between A File, Buffer And Window?

Files, buffers, and windows all have different meanings in different contexts. When working within Multi-Edit, the term files refers to the data stored on media, such as a hard drive. A file is accessed via a path and filename. Buffer refers to the file data that is stored by Multi-Edit in memory. The term window refers to the interface used to view and manipulate the data within a buffer.

There are typically two types of text editors: stream editors and line editors. A stream editor deals with all of the data as one long stream of text, while a line editor breaks the data into lines based upon delimiter characters that denote the end of a line. Multi-Edit can do both. Multi-Edit can load a file as “Binary” and treat it as a continuous stream of data, or Multi-Edit can load a file as a text file, in which case it breaks the data into lines of text. How it does this depends upon the type of file that is being loaded.

Buffers A Multi-Edit file buffer is actually a data record that contains important information about a file such as its filename, size, date, and time loaded, and pointers to the first and last line records in a double linked list. Since there is no direct way a user can access this information, a Multi-Edit window is created containing a field that points to a buffer record. Each buffer record has at least one, and sometimes more than one, window pointing to it.

Windows A Multi-Edit window is used to manipulate the data of a file via the Multi-Edit buffer. As mentioned before, each file is stored internally in a Multi-Edit buffer and has at least one window pointing to it. Deleting a window will remove the associated buffer. A window can be visible or hidden and is what is seen and used by the user. Each window generally shows a portion of a file, except for small files that can be viewed completely within the window. A cursor is used to represent the position where the text will be inserted. Since Multi-Edit is a line-editor, only the line the cursor is on can be directly manipulated, therefore the cursor must first be positioned to a line and column before editing is accomplished.

When a second window points to the same buffer, the two windows are said to be linked. This is indicated by the linked chain bitmap beside the window letter, located in the lower left-hand corner of each window.

A related feature is called Single Window mode. This feature was implemented to provide an emulation of Brief style windows. When enabled, each window is resized to fill the entire client area and only one window is viewed at a time unless the split window feature is used. If a window is split while in Single Window mode, a new window is created and is automatically linked to the current window, and then the windows are split as previously described. The difference is seen when switching to another window. When a new window is selected, it is first determined if the window is already being shown on the screen, and if it is, a new window is created, resized to the same size and position as the original window, linked to the selected buffer, and then shown. If the original window was a linked window, then it is deleted. If the selected window is not one of the windows shown already, then it will be resized to the same size and position as the original window and shown. The only way to get back to showing a single window is to do an un-split. When closing a window in Single Window mode, the current window is deleted and replaced with the next visible window. Single Window mode may be enabled under Tools | Customize | Windowing.

 
doc/manual2k8/working_in_me.txt · Last modified: 2008/07/09 14:53 (external edit)     Back to top