fbed — frame buffer editor
is an editor for frame buffer images, designed to facilitate the
manipulation of existing images for the preparation of presentation quality
graphics. Although it does have the potential to generate fairly complex
images, it is meant mainly for touching up existing images; adding titles,
captions or other labels; cutting and pasting of one or more images; and
reducing images or portions thereof.
uses the frame buffer library
and therefore is available on all graphics devices which are supported
by this package. On start up, the program always attempts to open the
default frame buffer. This device is specified by the frame buffer library,
and is configurable on a per system basis. Often the user will want to
override this default by setting the environment variable
option is for editing
1024x1024 or high resolution
images; the default is low resolution, 512x512
The frame buffer's state can be toggled back and forth between
at any time during execution of the program.
-p option turns on the "pad" flag.
fbed allows function-to-key bindings and macro definition facilities in a fashion similar to some of the more versatile EMACS-style screen editors, such as jove(1).
is running on a graphics device, a cursor will appear on the screen.
The position of the cursor points to the
When run interactively,
with the standard input attached to a terminal,
the screen will be divided into 5 areas:
the top line will be referred to as the
the second line from the top will be called the
the bottom line of the screen will be the
the second line from the bottom will by the
and the rest of the screen is devoted to scrolling text output.
contains the current
Colors are expressed as a combination
of red, green, and blue intensity values; ranging from 0 to 255. The
color refers to the
which is pointed to by the
cursor on the graphics device.
color is used by functions that
require a color rather than prompting for it every time.
indicates how many pixels the cursor will move per keystroke
during key-activated cursor movement. Finally,
the size of the square of pixels filled in by the
is displayed in reversed video,
and contains the program name and version number as well as the current
is where the user will see prompts when the program requires
is used to print messages,
indicating to the user that an operation is on-going.
Modes of Input
The user interface consists of a list of provided commands, referred to as functions; and user-defined commands, called macros. In general, every key-stroke will immediately be processed (this is often popularly called raw mode input) and therefore, virtually every function or macro is executed by striking a particular key, without having to enter it by hitting RETURN. The key that activates a particular function or macro is said to be bound to that operation.
Many of the functions will require the user to type some additional information or arguments, and a prompt will appear in the lower left corner of the screen. When responding to such prompts, the style of input resembles that of Bourne and C Shell derivatives with in-line EMACS-style editing. This means that the following control keys have special meaning:
|^A||cursor to beginning of line|
|^B||cursor back one character|
|^D||delete character under cursor|
|^E||cursor to end of line|
|^F||cursor forward one character|
|^G||abort this function|
|^K||erase from cursor to end of line|
|^P||fetch last input typed to this prompt|
|^U||erase from start of line to cursor|
|^R||redraw line as it currently exists|
|^V||escape special meaning of next character typed|
|Back Space||move cursor backward one character|
|Delete||delete character behind cursor|
When attempting to fetch the last input typed, the user should keep in mind that this is specific to the particular function which is doing the prompting and to that particular question being asked by that function. Most of the prompts are intended to appear self-explanatory, but there are a couple of exceptions. The execute-function-or-macro function places the user in the prompted mode of input for the purpose of typing the name of the command. This is useful when the key binding is not known off-hand or a key binding does not exist, but the name of the command is known (or can be guessed at). In any case, it is an alternative to key-activated execution of a function or macro. When entering the prompted mode of command input, a `:' will appear in the bottom left of the terminal screen and the terminal's cursor will appear just ahead of it. Now, all of the above control key functions are in force, and command-completion is implemented as well. At any time while typing the name of the function or macro, the space bar may be hit to attempt command-completion. The command-completion logic will look at what has been typed, and if it represents the beginning of an existing function or macro, the remainder of that name which can be uniquely matched will appear. If there is no match, the portion of the name that has been typed that does not match will be deleted, starting at the end and working back. In other words, the user only needs to type the unambiguous root of the name. If the user has done so, hitting the space bar will show the complete name, or hitting the RETURN key will enter the command. If the RETURN key is struck, and there is no unique match, nothing will happen. Whenever the user is prompted for the name of a function or macro, and there are other functions that prompt for this specifically, then command-completion is provided. Another atypical prompt is generated by the argument-count function, and looks like M-. The cursor will appear right after the hyphen, and the user is expected to type a number (sequence of digits). This sequence of digits must be terminated by a command key-stroke. This number represents an count of how many times to execute the command bound to that final key-stroke. If a digit is bound to a function or macro, it will not be recognized by the argument-count function.
User-defined Macros and Key Bindings
The user may define a macro as a series of key-strokes. This is initiated by executing the start-macro-definition function. The message "Remembering..." will appear on the status line, and the user then types the key-strokes which will represent the macro definition. These key-strokes will be executed as the macro is defined. To end the macro definition, the user executes the stop-macro-definition function. Sometimes, the user will want to defer specifying the answers to prompts when defining a macro, so that he can supply the information when the macro is executed. In order to incorporate this into his macro, the user would type a '@' at the prompt. This will cause the function to fail while the user is defining the macro, but this will hopefully not cause any fatal side-effects. Immediately after defining the macro, or before defining another, the user should enable its execution by giving it a name with the name-keyboard-macro function. If the user desires, he may bind it to a key with the bind-macro-to-key function, or it may be executed by name only.
Another way of customizing the frame buffer editor is to change the binding of keys to functions. This is done by executing either bind-key-to-name or bind-key-to-key. The former will bind a key to either a function or macro by specifying its name, and the latter refers to the function or macro by a key that is currently bound to it.
Both key bindings and macro definitions can be saved in a file using write-macros-to-file and read back with read-macros-from-file. Whenever the frame buffer editor starts up, it looks for a file called .fbed_macros in the user's home directory, and reads it if it exists. A list of functions and macros and their key bindings can be obtained by executing the print-bindings function which is bound to `?' by default. Here is the standard listing:
Macros and functions which are not bound to a key will not be displayed.
This program may require a little practice; be sure to save a copy of the input files until you are confident. If you are using the program for the first time, you should start by listing the menu, finding the command for saving your image, and using such command if you don't already have a copy.
This program is currently under development.
It is known that aborting the execution of the certain functions will at times display bogus messages like "I seem to have lost my bindings."
There is currently a hard limit of 10 times BUFSIZ (defined in stdio.h) for the length of the macro startup file.
This software is Copyright (c) 1986-2016 by the United States Government as represented by U.S. Army Research Laboratory.