/* The section view preference structures are as follows: */ typedef struct { UF_DRAW_sx_background_t sx_background; UF_DRAW_sx_crosshatch_t sx_crosshatch; } UF_DRAW_sxview_prfs_t; typedef enum { UF_DRAW_sx_background_off = 0, UF_DRAW_sx_background_on } UF_DRAW_sx_background_t; typedef enum { UF_DRAW_sx_crosshatch_off = 0, UF_DRAW_sx_crosshatch_on } UF_DRAW_sx_crosshatch_t; /* UF_DRAW_sx_background_off = section view background is off, UF_DRAW_sx_background_on = section view background if on. UF_DRAW_sx_crosshatch_off = section view crosshatch is off, UF_DRAW_sx_crosshatch_on = section view crosshatch if on. */ /* The code in the following example sets the section view display preference settings. */ #include #include #include #include #include #include void ufusr(char *param, int *retcod, int param_len) { int ifail = 0; int numchrs; tag_t sxview_tag = NULL_TAG; char error_message[133]; char * sxview_name = "sx@3"; UF_DRAW_sxview_prfs_t sxview_parms; ifail = UF_initialize(); if (!ifail) { numchrs = strlen (sxview_name); ifail = uc5028 (sxview_name, numchrs, &sxview_tag); } if (!ifail) { /* Set section view crosshatch parameter on */ sxview_parms.sx_background = UF_DRAW_sx_background_on; sxview_parms.sx_crosshatch = UF_DRAW_sx_crosshatch_off; ifail = UF_DRAW_set_sxview_display (sxview_tag, &sxview_parms); } printf ("UF_DRAW_set_sxview_display sample "); if (ifail) { ifail = UF_get_fail_message( ifail, error_message ); printf( "fails.\nError is: %s\n", error_message ); } else printf( "is successful.\n" ); UF_terminate(); }