Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Primitives and EEL Subroutines
      Buffer Primitives
         Changing Buffer Contents
         Moving Text Between Buffers
         Getting Text from a Buffer
         . . .
         Listing Buffers
      Display Primitives
         . . .
         Buffer Text in Windows
         Window Titles and Mode Lines
         Normal Buffer Display
            Screen Dimensions
            Character Display
            Character Widths and Columns
         Displaying Status Messages
         Printf-style Format Strings
         . . .
      File Primitives
         File Reading Primitives
         File Writing Primitives
         Line Translation Primitives
         . . .
         Tagging Internals
      . . .

Previous   Up    Next
Window Titles and Mode Lines  Primitives and EEL Subroutines   Screen Dimensions


Epsilon User's Manual and Reference > Primitives and EEL Subroutines > Display Primitives >

Normal Buffer Display

Epsilon provides many primitives for altering the screen contents. This section describes those relating to the automatic display of buffers that happens after each command, as described below.

refresh()
maybe_refresh()

The refresh( ) primitive does a standard screen refresh, showing the contents of all Epsilon windows. The maybe_refresh( ) primitive calls refresh( ) only if there is no type-ahead. This is usually preferred since it lets Epsilon catch up with the user's typing more quickly. Epsilon calls the latter primitive after each command executes.

user window char build_first;
user buffer char must_build_mode;
user char full_redraw;
user char all_must_build_mode;

Epsilon normally displays each window line by line, omitting lines that have not changed. When a command has moved point out of the window, Epsilon must reposition the display point (the buffer position at which to start displaying text) to return point to the window. However, Epsilon sometimes does not know that repositioning is required until it has displayed the entire window. When it discovers that point is not in the window, Epsilon moves the display point to a new position and immediately displays the window again. Certain commands which would often cause this annoying behavior set the build_first variable to prevent it.

When the build_first variable is set, the next redisplay constructs each window internally first, checks that point is in the window, and only then displays it. The variable is then set back to zero. A build_first redisplay is slower than a normal redisplay, but it never flashes an incorrect window.

Epsilon "precomputes" most of the text of each mode line, so it doesn't have to figure out what to write each time it updates the screen. Setting the must_build_mode variable to 1 warns Epsilon that any mode lines for the current buffer must be rebuilt. The make_mode( ) subroutine in disp.e sets this to 1, and Epsilon rebuilds the mode lines of all windows displaying this buffer.

Setting the all_must_build_mode variable to 1 is like setting must_build_mode to 1 for all buffers.

Setting the full_redraw variable rebuilds all mode lines, as well as any precomputed information Epsilon may have on window borders, screen colors, and so forth.

It is necessary to set full_redraw when some settings affecting the display have been changed. Set the full_redraw variable nonzero if the size of the tab character has changed, if color class settings have changed, if the display class of any character has been changed via the _display_class array, or if any draw- variable has been set.

Each time the mode line changes, the make_mode( ) subroutine calls any function whose name starts with do_when_make_mode_. Such functions receive no parameters.

screen_messed()

The screen_messed( ) primitive causes the next refresh( ) to completely redraw the entire screen.

user window int display_column;

The window-specific variable display_column determines how Epsilon displays long lines. If negative, Epsilon displays buffer lines too big to fit on one screen line on multiple screen lines, with a \ or graphic character (see the _display_characters variable described below) to indicate that the line has been wrapped. If display_column is 0 or positive, Epsilon only displays the part of a line that fits on the screen. Epsilon also skips over the initial display-column columns of each line when displayed. Horizontal scrolling works by adjusting the display column.

int next_screen_line(int n)
int prev_screen_line(int n)

The next_screen_line( ) primitive assumes point is at the beginning of a screen line, and finds the nth screen line following that one by counting columns. It returns the position of the start of that line.

The prev_screen_line( ) primitive is similar. It returns the start of the nth screen line before the one point would be on. It does not assume that point is at the start of a screen line.

If Epsilon is scrolling long lines of text rather than wrapping them (because display_column is greater than or equal to zero), these primitives go to the beginning of the appropriate line in the buffer, not the display_column'th column. In this mode, next_screen_line(1) is essentially the same as nl_forward( ), and prev_screen_line(0) is like to_begin_line( ).



Previous   Up    Next
Window Titles and Mode Lines  Primitives and EEL Subroutines   Screen Dimensions


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.