bg_txtdef()

Defines background text on a form

Call  
#include <vv_form.h>
BG_TXTPTR bg_txtdef(wn_rb, wn_cb, stp, att, fmp)

int wn_rb

Row in form window to begin writing text

int wn_cb Column in form window to begin writing text
UCHAR *stp Pointer to the text string to place on form
UCHAR att Video attribute with which to display the text
FORMPTR fmp Form on which to place the text
Description of Parameters

wn_cb: Specify the column to start writing the string or one of the following defined values:

CENTER_TEXT

Centers the text on the form

LEFT_TEXT Places the text flush left on the form
RIGHT_TEXT Places the text flush right on the form
Returns  
POINTER A pointer to the background text structure.
NULLP Error. VV_ERR is set to the following:
  MEMLACK Insufficient memory is available to define a background text structure.
Description

bg_txtdef() allocates memory for a new node in the linked list of background items in the form structure. The node for this background text is inserted in the appropriate place in the linked list. The order of the nodes are maintained so that all scrollable region backgrounds are listed first, followed by all lines, then all boxes, and then all text background items.

The structure members are initialized to those values passed in the call. If the beginning column is specified as CENTER_TEXT, LEFT_TEXT, or RIGHT_TEXT, the column coordinate is calculated appropriately.

Related Functions

bg_boxdef(), bg_linedef()

Cautions

The string cannot be a NULLP.


Home Contents Previous Next