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
         Creating & Destroying Windows
         Window Resizing Primitives
         Preserving Window Arrangements
         Pop-up Windows
         . . .
      File Primitives
         File Reading Primitives
         File Writing Primitives
         Line Translation Primitives
         . . .
         Tagging Internals
      . . .

Previous   Up    Next
Creating & Destroying Windows  Primitives and EEL Subroutines   Preserving Window Arrangements


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

Window Resizing Primitives

user window short window_height;
user window short window_width;
int text_height()
int text_width()
int window_content_width()

The window_height variable contains the height of the current window in lines, including any mode line or borders. Setting it changes the size of the window. Each window must have at least one line of height. The window_width variable contains the width of the current window, counting any borders the window may have. If you set these variables to illegal values, Epsilon will adjust them to the closest legal values.

The text_height( ) and text_width( ) primitives, on the other hand, exclude borders and mode lines from their calculations, returning only the number of lines or columns of the window available for the display of text.

If the buffer has been set to display line numbers, text_width( ) doesn't count the columns used for them, but the similar window_content_width( ) primitive does. With line numbers off, the two return the same value.

int window_edge(int orien, int botright)
#define TOPLEFT         (0)
#define BOTTOMRIGHT     (1)

The window_edge( ) primitive tells you where on the screen the current window appears. For the first parameter, specify either HORIZONTAL or VERTICAL, to get the column or row, respectively. For the second parameter, provide either TOPLEFT or BOTTOMRIGHT, to specify the corner. Counting starts at the upper left corner of the screen, which has 0 for both coordinates.



Previous   Up    Next
Creating & Destroying Windows  Primitives and EEL Subroutines   Preserving Window Arrangements


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