Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pgse(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GENERALIZED STRUCTURE ELEMENT(3P)  —  SUNPHIGS LIBRARY

NAME

GENERALIZED STRUCTURE ELEMENT − create a generalized structure element

SYNOPSIS

C Syntax

void
pgse ( id, gse )
Pintid;gse identifier
Pgserec∗gse;gse data record

FORTRAN Syntax

SUBROUTINE pgse ( GSEID, LDR, DATREC )
INTEGERGSEIDGSE identifier
INTEGERLDRdimension of data record array
CHARACTER∗80DATREC(LDR) data record

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

GENERALIZED STRUCTURE ELEMENT creates a structure element which may be used to:

•  set the highlight colour index
•  set the character set for a codeset
•  set the font for a codeset

Support for GSEs is implementation dependent. 

C Input Parameters

id
The identifier of the generalized structure element to insert. Recognized identifiers are defined in phigs.h as:

-1PUGSE_HIGHLIGHT_COLOUR_INDEXSet Highlight Color Index
-2PUGSE_CHAR_SET_FOR_CODESETSet Character Set for Codeset
-3PUGSE_FONT_FOR_CODESETSet Font for Codeset

gse
A pointer to a Pgserec union containing the data record required by the GSE function specified in the id parameter.  Pgserec is defined in phigs.h as:

typedef union {
Pgse0001recgse1_datarec;/∗ GSE 1 data record ∗/
Pdataunsupported;/∗ unsupported GSE data record ∗/
/∗ implementation defined GSE’s ∗/
Pugse0001recugse1_datarec;/∗ GSE -1 data record ∗/
Pugse0002recugse2_datarec;/∗ GSE -2 data record ∗/
Pugse0003recugse3_datarec;/∗ GSE -3 data record ∗/
} Pgserec;

Pugse0001rec is used when id is PUGSE_HIGHLIGHT_COLOUR_INDEX. Pugse0001rec is defined in phigs.h as:

typedef struct {
Pinthighlight_colour;
} Pugse0001rec;

The highlight colour component specifies the new highlighting colour index to use when highlighting output primitives. 

Pugse0002rec is used when id is PUGSE_SET_CHAR_SET_FOR_CODESET.  Pugse0002rec is defined in phigs.h as:

typedef struct {
Pcodesetcodeset;/∗ codeset to set ∗/
Pintcharset;/∗ character set for codeset ∗/
} Pugse0002rec;

The codeset field of this record specifies which EUC codeset the character set is intended for.  It is defined in phigs.h as:

typedef enum {
CODESET_ALL = -1,
CODESET_0,
CODESET_1,
CODESET_2,
CODESET_3
} Pcodeset;

The CODESET_ALL enumeration value specifies that the character set should be used for all the codesets. 

The character set component specifies the value of the character set attribute used when displaying text in the specified codeset. 

Pugse0003rec is used when id is PUGSE_SET_FONT_FOR_CODESET.  Pugse0003rec is defined in phigs.h as:

typedef struct {
Pcodesetcodeset;/∗ codeset to set ∗/
Pintfont;/∗ font for codeset ∗/
} Pugse0003rec;

The codeset field of this record specifies which EUC codeset the font is intended for.  It is defined in phigs.h as:

typedef enum {
CODESET_ALL = -1,
CODESET_0,
CODESET_1,
CODESET_2,
CODESET_3
} Pcodeset;

The CODESET_ALL enumeration value specifies that the font should be used for all the codesets. 

The font component specifies the value of the font attribute used in rendering text in the specified codeset. 

FORTRAN Parameters

GSEID
The generalized structure identifier defines the function this generalized structure element is to perform. Currently the valid identifiers are:

-1PUGSEHLCISet Highlight Colour Index
-2PUGSESETCSFCSet Character Set for Codeset
-3PUGSESETFTFCSet Font for Codeset

LDR
The dimension of DATREC (returned by the PACK DATA RECORD subroutine). 

DATREC
A data record packed by the PACK DATA RECORD subroutine containing the information needed by the GSE specified by GSEID. 

The arguments passed to PACK DATA RECORD when GSEID = PUGSEHLCI should be as follows:

ILThe number of integers = 1. 

IAContains one integer value, specifying the highlight colour index. 

RLThe number of real values = 0. 

SLThe number of strings = 0. 

The arguments passed to PACK DATA RECORD when GSEID = PUGSESETCSFC should be as follows:

ILThe number of integers = 2. 

IAContains two integer values.  The first specifies which EUC codeset the character set is intended for, valid values are defined in phigs77.h as follows:

-1PCODESETALL
0PCODESET0
1PCODESET1
2PCODESET2
3PCODESET3

The PCODESETALL value specifies that the character set should be used for all the codesets. 

The second specifies the value of the character set attribute used when displaying text in the specified codeset. 

RLThe number of real values = 0. 

SLThe number of strings = 0. 

The arguments passed to PACK DATA RECORD when GSEID = PUGSESETFTFC should be as follows:

ILThe number of integers = 2. 

IAContains two integer values.  The first specifies which EUC codeset the font is intended for valid values are defined in phigs77.h as follows:

-1PCODESETALL
0PCODESET0
1PCODESET1
2PCODESET2
3PCODESET3

The PCODESETALL value specifies that the font should be used for all the codesets. 

The second specifies the value of the font attribute used when displaying text in the specified codeset. 

RLThe number of real values = 0. 

SLThe number of strings = 0. 

Execution

If the current edit mode is INSERT, then GENERALIZED STRUCTURE ELEMENT is inserted into the currently open structure after the element currently pointed to by the element pointer. If the edit mode is REPLACE, then GENERALIZED STRUCTURE ELEMENT replaces the element pointed to by the element pointer.  In either case, the element pointer is updated to point to the new element. 

Set Highlight Colour Index

This GSE is used to set a highlighting colour index entry in the PHIGS traversal state list. This entry will be used when highlighting subsequent output primitives, overriding the colour index from other attributes.  If the specified colour index is negative, an error is generated and the element is not created. 

The default highlighting colour index is the maximum colour index value on the workstation.  The default highlighting on a monochrome workstation yields no visual distinction for primitives with colour index 1 (the default). 

Set Character Set for Codeset

This GSE is used to set the current character set entry in the PHIGS traversal state list for one or all of the codesets.  The character set attributes associate character sets with the EUC codesets.  See INTRO_INTERNATIONALIZATION for a description of EUC character encoding.  The character set controls the characters available when displaying the following output primitives:

•  TEXT
•  TEXT 3
•  ANNOTATION TEXT RELATIVE
•  ANNOTATION TEXT RELATIVE 3

The character sets available are defined as constants in phigs.h and PARAMETER statements in phigs77.h (FORTRAN):

ValueC NameFORTRAN Namecswidth Character Set
1 PCS_ASCIIPCSASCII1ISO-646 (ASCII)
-1  PCS_GREEKPCSGREEK1Greek
-2 PCS_SYMBOLPCSSYMBOL1Symbol
-3 PCS_CARTOGRAPHICPCSCARTOGRAPHIC1Cartographic
-4 PCS_KANJIPCSKANJI2JIS-X0208 (Japanese Kanji)†
† Formerly, JIS-C6226, this will be available when the Kanji Font library is installed.

The cswidth of a character set is the number of bytes in the input string needed to specify an output character.  See INTRO_INTERNATIONALIZATION. 

The default character set for all codesets is 1.  During traversal, if a specified character set is not available, font 1 and character set 1 will be used. 

Set Font for Codeset

This GSE is used to set the current text font entry in the PHIGS traversal state list for one or all of the codesets.  The font attributes associate fonts with the EUC codesets.  See INTRO_INTERNATIONALIZATION for a description of EUC character encoding.  The font controls the specification of the shapes of the symbols representing each character in the character set used in the following output primitives:

•  TEXT
•  TEXT 3
•  ANNOTATION TEXT RELATIVE
•  ANNOTATION TEXT RELATIVE 3

All the font indices have named constants defined in phigs.h and phigs77.h (FORTRAN), as shown below:

The ASCII fonts available are:

ValueC NameFORTRAN NameStyle
1PFONT_MONOPFONTMONOMonospaced
-2 PFONT_SIMPLEXPFONTSIMPLEXSimplex
-3 PFONT_DUPLEXPFONTDUPLEXDuplex
-4 PFONT_COMPLEXPFONTCOMPLEXComplex
-5 PFONT_TRIPLEXPFONTTRIPLEX Triplex
-6 PFONT_ITALIC_COMPLEXPFONTITALICCMPLXItalic Complex
-7 PFONT_ITALIC_TRIPLEXPFONTITALICTRPLXItalic Triplex
-10 PFONT_SCRIPT_SIMPLEXPFONTSCRIPTSMPLXScript Simplex
-11 PFONT_SCRIPT_COMPLEXPFONTSCRIPTCMPLXScript Complex

Additional fonts available for the ASCII character set for compatibility with previous releases are:

ValueC NameFORTRAN Name
-8 PFONT_GREEK_SIMPLEX PFONTGREEKSMPLX
-9 PFONT_GREEK_COMPLEX PFONTGREEKCMPLX
-12 PFONT_CARTOGRAPHIC PFONTCARTO
-13 PFONT_SYMBOL PFONTSYMBOL

The Greek fonts available are:

ValueC NameFORTRAN NameStyle
1PFONT_MONO PFONTMONOMonospaced
-2 PFONT_SIMPLEX PFONTSIMPLEXSimplex
-4 PFONT_COMPLEXPFONTCIMPLEXComplex

The symbol fonts available are:

ValueC NameFORTRAN NameStyle
1 PFONT_MONO PFONTMONOMonospaced
-2 PFONT_SIMPLEX PFONTSIMPLEXSimplex

The cartographic fonts available are:

ValueC NameFORTRAN NameStyle
1 PFONT_MONO PFONTMONOMonospaced
-2 PFONT_SIMPLEX PFONTSIMPLEXSimplex

The Kanji fonts available are:

ValueC NameFORTRAN NameStyle
1PFONT_MONOPFONTMONOMonospaced

The extent of a string to be rendered using the character sets attribute is inquirable via ESCAPE_-9, INQUIRE EXTENDED TEXT EXTENT. 

When the set font for codeset GSE element is traversed, the current text font entry for one or all of the codesets in the PHIGS traversal state list is set to the specified font.  When the current text font ASF (Aspect Source Flag) is set to INDIVIDUAL, the font for each of the codesets will be taken from this attribute for text output primitives which follow in the structure network. 

The font attributes select fonts from those available on the workstation.  The default font for all codesets is 1.  During traversal, if a font is not available in the specified character set, font 1 in that character set will be used. 

When the text font ASF is set to BUNDLED, the fonts will be taken from the workstation’s representation indicated by the current text index. See INTRO_INTERNATIONALIZATION and ESCAPE_-10, SET EXTENDED FONT TEXT REPRESENTATION for a discussion of text representations using codes sets.  In this case, any font set with this GSE will have no effect. 

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

SEE ALSO

PACK DATA RECORD (3P)
SET HIGHLIGHTING FILTER (3P)
INTRO INTERNATIONALIZATION (7P)

Sun Release 4.0  —  Last change: 1 August 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026