Please enable JavaScript to view this site.

ESL Documentation

Definition

Define a graphical region.

[enabled|disabled] [visible|invisible]

[[color] COLOR] [primary]

graphical region GR_NAME

size XSIZE YSIZE

at {[position] X Y|default position}

[in PARENT_NAME1 [in PARENT_NAME2] ... ]

[window size WINDOW_XSIZE WINDOW_YSIZE

at [position] WINDOW_X WINDOW_Y]

[[color] COLOR foreground]

[priority is PRIORITY_NO]

[parameter is PAR_STRING]

[[extended] helpid is HELP_ID]

[[size|[color] COLOR] border]

[title bar TITLE_STRING]

[system menu]

[horizontal scroll bar [scroll by SCROLL_INC] ]

[vertical scroll bar [scroll by SCROLL_INC] ]

[no scale]

[action bar AB_NAME]

[popup menu STANDALONE_PULLDOWN_NAME]

[minimize button [using MINIMIZE_ICON_FILE] ]

[maximize button]

[pointer [is] POINTER_FILE]

[DRAWING_STATEMENT] ...

enabled | disabled

Define the region as selectable or not. If you define the region as disabled, it is displayed grayed and cannot be selected. The default is enabled.

visible | invisible

A visible object is displayed when it is defined. An invisible object is not displayed until you specifically make it visible. The default is visible.

color COLOR

A string value, integer value, or color keyword representing an ESL color that you want to use for the background of the region. The default background COLOR is black.

primary

This is the program's primary region.

GR_NAME

The identifier for the graphical region.

size XSIZE YSIZE

Integer values representing the dimensions of the region's viewport in X Y coordinates of the parent. These refer to the dimensions of the viewport itself, and do not include the space occupied by the frame. To override the default window size, use the window size attribute.

at position X Y

Integer values representing the position of the viewport in the parent's coordinate system (not the position of the outside frame).

at default position

When the parent is a graphical region, position this graphical region at the graphics cursor of the parent; otherwise, position the object at 0 0.

in PARENT_NAMEn

The identifier for a parent object. If the region is primary, you cannot specify ancestry; the region's parent is always in desktop. To place a region outside of a primary region, specify its ancestry as in desktop. The default ancestry for a non-primary region is in primary region.

window size WINDOW_XSIZE WINDOW_YSIZE

Integer values representing the dimensions of the region's window, in X Y coordinates of the object. The window defines what portion of the region's contents are visible in the viewport.

at position WINDOW_X WINDOW_Y

Integer values representing the position of the region's window.

color COLOR foreground

A string value, integer value, or color keyword representing an ESL color that you want to use for the foreground of the region. The default foreground COLOR is white.

priority is PRIORITY_NO

An integer value representing the priority of the region. You cannot assign a priority to the primary region or regions whose ancestry is in desktop. The default priority is 0.

parameter is PAR_STRING

A string value representing the parameter of the region. The default parameter string is "".

helpid is HELP_ID

A string or integer value representing the identifier of the help panel you want displayed when the user requests help for this region. This should match the help panel defined in the library specified by the help library declaration. The default HELP_ID is "".

extended

This is the extended help panel ID for this region and its children.

border

Put a border around the region. If you specify border or COLOR border, ESL draws a one-pixel border of the color indicated (white, by default). If you specify other frame attributes for the region, then the border specification will result in a one-pixel wide border in the Windows or PM border color. Note that frame attributes or child of desktop causes ESL to ignore COLOR border.

size border

Surround the region with a sizing border that can be used to resize the region.

title bar TITLE_STRING

A string value representing the title that will appear in the region's title bar. The title bar can be used for repositioning the region.

system menu

The region will contain a system menu. The system menu button will be in the upper left corner.

horizontal scroll bar

Include a scroll bar along the bottom edge of the region just inside the border, if one exists. Scroll the region's contents as specified by SCROLL_INC.

The horizontal scroll bar contains solid arrows and a slider, whether or not there is information outside the region's window.

scroll by SCROLL_INC

An integer value representing the number of units in the region's co-ordinate system by which you want the region's window position to change when one of the arrows in the scroll bar is pressed. When paging, the page increment is the X or Y window size minus one scroll increment. The default SCROLL_INC is one unit.

vertical scroll bar

Include a vertical scroll bar along the far right edge of the region just inside the border, if one exists. Scroll the region's contents as specified by SCROLL_INC.

The vertical scroll bar contains solid arrows and a slider, whether or not there is information outside the region's window.

no scale

Do not scale the region's contents when changing the region size (i.e., the window size is constrained by the viewport). When the size of the region is changed, its window size is changed in parallel. Resizing the region thus exposes or covers more of the region's contents, rather than causing the contents to be rescaled to fit into the new size of the region. Note that the window size attribute will have no effect if you include this attribute.

action bar AB_NAME

The identifier for an action bar template you want included. Only regions that are children of the desktop can have action bars.

popup menu STANDALONE_PULLDOWN_NAME

The identifier for the standalone pulldown template.

minimize button

Include a minimize button in the upper right-hand corner of the region.

using MINIMIZE_ICON_FILE

A string value representing the name, including the extension, of the file containing the icon to use when the region is minimized.

maximize button

Include a maximize button in the upper right-hand corner of the region. (The maximize button will turn into a restore button when the region is maximized.)

pointer is POINTER_FILE

A string value representing the name, including the extension, of the file containing the bitmap to use as a pointer whenever the pointer is over this region.

DRAWING_STATEMENT

A drawing statement.

Description

Use this statement to define a graphical region, which is a rectangular portion of the screen in which other objects can be drawn.

In a windowed application, the primary region must be the first object you define. There can be only one primary region. All other regions and keys are, by default, children of the primary region.

Only the region specification, the identifier, the size specifications, and the at [position] specification are required, and they must be specified in the order shown in the model. Other attributes are optional, using the defaults described.

You can specify the attributes after in PARENT_NAMEn in any order.

When you define a region's size, you are actually defining two characteristics: the region's viewport and the region's window. You can also specify the window size separately.

The region size only includes the area of the viewport itself. It does not include the frame attributes, which are external to the viewport. If the size of the primary region is the same as the screen size, you will not be able to see any frame attributes.

Disabling a region disables its viewport and its frame, as well as the region's children. The primary region should not be disabled.

The scroll bars and the slider are disabled when there is nothing to be scrolled into the window.

When you specify a system menu and a minimize and/or maximize button, and do not specify a title bar, a title bar with the name of the program executable is added.

Example

# In this example, color 26 picks up the Windows

# window background color, and color 27 picks

# up the Windows window foreground color.

enabled visible color 26 primary graphical region

PrimaryWindow

size 510 280

at position 26 40

color 27 foreground

size border

title bar "Primary Window"

system menu

horizontal scroll bar scroll by 6

vertical scroll bar scroll by 16

no scale

action bar PrimaryWindowActionBar

minimize button using "minbuttn.ico"

maximize button

pointer is "myptr.ptr"

move to 255 260

font "large" black text center "ACME COMPANY"

move -1 1

font "large" black text center "ACME COMPANY"

move -1 1

font "large" blue text center "ACME COMPANY"