12.07.2015 Views

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NAMESYNOPSISsm_setbkstat - set background text for status line#include "smdefs.h"void sm_setbkstat (message, attr)char *message;int attr;DESCRIPTIONThe message is saved, to be shown on the status line whenever there is no higherpriority message to be displayed. The highest priority messages are those passedto sm_d_msg_line, sm_err_reset, sm_quiet_err, or sm_query_msg; the next highestare those attached to a field by means of the status text option (see the <strong>JYACC</strong><strong>FORMAKER</strong> Author's <strong>Guide</strong>). Background status text has lowest priority.Attr is the initial display attribute for the message, and is a combination ofthe following values.ColorsHighlightsBLACK BLUE BLANK REVERSEGREEN CYAN UNDERLN BLINKRED MAGENTA HILIGHTYELLOW WHITE DIMThe background colors defined in smdefs.h (B_BLACK and so forth) are alsoavailable.sm_setstatus sets the background status to an alternating ready/wait flag; youshould turn that feature off before using this function.Refer to sm_d_msg_line for an explanation of how to embed attribute changes andfunction key names into your message.VARIANTS AND RELATED FUNCTIONSsm_setstatus (flag);sm_d_msg_line (message, attribute);EXAMPLE#include "smdefs.h"#define PAUSE sleep (3)/* The hierarchy of status messages. Assume the field* "mama" has status text reading "Mama bear", and that* the home field has none. */sm_d_msg_line ("", WHITE);sm_setstatus (0);sm_setbkstat ("Baby bear", MAGENTA);PAUSE;sm_n_gofield ("mama");PAUSE;sm_d_msg_line ("Papa bear", BLUE | HILIGHT);PAUSE;sm_home ();PAUSE;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!