/* The section view preference types 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; /* where the enum's have the following meanings: 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 retrieves 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(); /* Get the tag of the section view. */ numchrs = strlen (sxview_name); ifail = uc5028 (sxview_name, numchrs, &sxview_tag); if (!ifail) { /* Query the section view background and crosshatch parameters */ ifail = UF_DRAW_ask_sxview_display (sxview_tag, &sxview_parms); } printf ("UF_DRAW_ask_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(); }