Objects supported by crisp – Crunch CRiSP File Editor 6 User Manual

Page 38

Advertising
background image

Page 38

associated with it. When they are displayed in a window the character map associated with the window is
used to view the buffer. (Windows always have a character map associated with them). If a buffer has a
character map associated with it (via set_buffer_cmap()), then this is used to override the window definition.

Associating character maps with buffers is important to understand because it controls the mapping between
the externally visible column position in a line and the internal character pointer to the text. This is important
because of the effect of inserting text in one window, and doing an undo in another which is using an
alternate character map.

Having a fixed width character map can make it easier to write a hex mode editor to move from one
character position to another.

Objects supported by CRiSP

CRiSP supports a variety of high level data structures, or objects, which can be manipulated within the
macro language. Most of these you will already be familiar with by virtue of using CRiSP.

One of the most fundamental types of object within CRiSP is the buffer(pg. 33). Buffers are intimately tied up
with files and windows. A buffer is a temporary holding area for a file whilst it is being edited, and a window
is simply a view onto a file.

The following summary summarizes the different types of objects available within CRiSP.

Name

Description

buffer(pg.
33).

CRiSP is a file editor. Each file is stored in a temporary area called a buffer. The
buffer object has numerous attributes, such as read-only status, undoability,
current line number. Buffers are created from files, and after modifications, can be
saved back to a file on disk.

bookmarks

A bookmark is a saved buffer position which allows you to save a position and
jump back to it using a memorable name.

colorizers

A colorizer is a description of the syntactic elements of a language which is used
so that when files of a particular type are edited, the appropriate colorization
process will take place.

Colors(pg.
46).

CRiSP supports various operations on colors in order to allow various aspects of
the screen display to be customised by the user. In addition color mappings are
defined to allow the colorization of buffers to be affected.

dialog
boxes

Dialog boxes are representations of the GUI dialog boxes used in many parts of
the CRiSP user interface. Dialog boxes are very powerful and sophisticated
objects and are described below in further detail. Dialog boxes consist of sub-
objects, such as push buttons and input fields, which can respond to user actions.

Keyboard(p
g. 87).

A keyboard is a mapping of function keys to macro functions and provide the basis
for all editing activity. Keyboards can be made context sensitive so that functions
are only invoked within the context of a particular buffer, for example.

Regions(pg.
40).

A region is a highlighted block of text associated with a buffer, usually used for
cutting and pasting type operations.

registered
macro(pg.
42).

Registered macros are macros which are invoked when particular events are
triggered, for example, after an idle timeout, or when a buffer is modified or
deleted. These macros are invoked automatically when the associated event
takes place.

scraps

A scrap is a temporary buffer used for holding the contents of the cut and paste
buffer. CRiSP supports multiple scraps.

screens

A screen is a GUI object which corresponds to a collection of windows with a
dialog box. For example, when CRiSP comes up you are presented with a single
top level window containing an editing area, as well as a status bar, scrollbar and
menu bar. The editing area is an instance of a screen. If multiple top level
windows are created (e.g. from the Windows->New Window) menu option, then
each of these is a screen.

Advertising