Lugaru's Epsilon
Programmer's
Editor

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
         . . .
         Displaying Status Messages
         Printf-style Format Strings
         Other Display Primitives
         Highlighted Regions
         Character Coloring
         . . .
      File Primitives
         File Reading Primitives
         File Writing Primitives
         Line Translation Primitives
         . . .
         Tagging Internals
      . . .

Previous   Up    Next
Printf-style Format Strings  Primitives and EEL Subroutines   Highlighted Regions


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

Other Display Primitives

term_write(int col, int row, char *str, int count,
           int colorclass, int clear)
term_write_attr(int col, int row, int chartowrite,
                int attrtowrite)
term_clear()
term_position(int col, int row)

The following primitives provide low-level screen control. The term_clear( ) primitive clears the screen. The term_position( ) primitive positions the cursor to the indicated row and column. The term_write( ) primitive puts characters directly on the screen. It puts count characters from str on the screen at the row and column in the specified colorclass. If clear is nonzero, it clears the rest of the line. The term_write_attr( ) primitive writes a single character at the specified location on the screen. Unlike term_write( ), which takes a color class, this primitive takes a raw foreground/background color attribute pair. This primitive does nothing in Epsilon for Windows or under the X11 windowing system. For all these primitives, row and col start at 0, and the coordinate 0,0 refers to the upper left corner of the screen. If a keyboard macro is running, the term_ primitives are ignored.

fix_cursor()    /* EEL subr. */
user int normal_cursor;
user int overwrite_cursor;
user int virtual_insert_cursor;
user int virtual_overwrite_cursor;
#define CURSOR_SHAPE(top, bot)      ((top) * 1000 + (bot))
#define GUI_CURSOR_SHAPE(height, width, offset) \
            ((offset * 1000 + (height)) * 1000 + (width))
int cursor_shape;

During screen refresh, Epsilon calls the EEL subroutine fix_cursor( ) to set the shape of the cursor. The subroutine chooses one of four variables depending upon the current modes, and copies its value into the cursor_shape variable, which holds the current cursor shape code. The Windows and X11 versions set the gui_cursor_shape variable in a similar way, from a different set of four variables. All these variables use values constructed by the GUI_CURSOR_SHAPE() or CURSOR_SHAPE() macros. See Cursor Shapes for details on these variables.

windows_set_font(char *title, int fnt_code)

The windows_set_font( ) primitive displays a Windows font selection dialog, allowing the user to pick a different font. It takes two parameters. Title specifies the title of the dialog box to display. The fnt_code says whether to set Epsilon's main font (FNT_SCREEN), the font for printing (FNT_PRINTER), or the font for Epsilon's dialogs (FNT_DIALOG). It's only available in the Windows GUI version of Epsilon. See the has_feature variable. The Unix version of Epsilon runs a separate program for its font dialog.

int using_oem_font(int screen)
char using_new_font;

The using_oem_font( ) primitive returns a nonzero value if the specified screen's font uses the OEM character set, rather than the ANSI/Windows character set. It takes a screen number. This primitive always returns 0 under Unix. The primitive variable using_new_font will be nonzero whenever some screen's font has been changed since the end of the last screen refresh, or when a new screen has been created, for example by displaying a dialog.



Previous   Up    Next
Printf-style Format Strings  Primitives and EEL Subroutines   Highlighted Regions


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.