LABELON(3R)

NAME
labelon, labeloff, labelicon, labeltext - window labeling

SYNOPSIS
#include <dmd.h>
#include <label.h>

void labelon ( )

void labeloff ( )

void labelicon (bp, pos)
Bitmap *bp;
int pos;

labeltext (s, n, f)
char *s;
int n;
int f;

DESCRIPTION
The labelon function puts a label at the top of the window. The label area is LABEL_HEIGHT pixels high and spans the full interior width of the window. The label area is automatically updated to indicate the window's current host and if that host is multiplexed. It also indicates if scroll lock or caps lock is active for that window and if the application running in the window has requested the printer. Drect is changed to the new smaller size of the interior of the window.

The labeloff function removes the label from the window and changes Drect to the new larger size.

The labelicon function draws the given bitmap into the label. The bitmap is clipped to 16 pixels high and to the right edge of the label area. Its leftmost edge is aligned to position pos. Positions are 16 pixels apart, starting with position 1 (L_HOST_POSITION) at the left edge of the label area. The first 5 positions (1 to 5) are used by the terminal for the following default information:

    L_HOST_POSITION
        current host connection

    L_MUX_POSITION
        current host environment

    L_PRINT_POSITON
        printer request status

    L_SCROLL_POSITION
        scroll lock key status

    L_CAP_POSITION
        caps lock key status

It is not recommended for an application to override those fields with its own bitmaps. The first position index that an application should use is L_USER_POSITION which guarantees non-interference with the terminal.

Clipped portions of a label bitmap are not remembered by the terminal if the window is made larger.

The function labeltext displays the string s of n characters in the label area of the window based on the flag f. The possible values for f are:

    L_LEFT
        left justify the string from the L_USER_POSITION index position

    L_RIGHT
        right justify the string in the label area

    L_CENTER
        center the string in the full length label area

The font used to display the string is the terminal's medium font. The display mode is F_XOR; therefore, labeltext will superimpose the new string over any existing label strings. If there is not enough room in the label area for all characters to fit, the string will be clipped off.

When the window is reshaped, the terminal only redraws the label area with the default information. Any user supplied icons and strings must be redrawn by the application.

Any application that makes use of both labelicon and labeltext should make sure that they do not write to the same positions of the label area.