------------------------------------------------------------------ -- -- NAME: INQ_WS_DESCRIPTION_TABLE_1A - BODY -- DISCREPANCY REPORTS: ------------------------------------------------------------------ -- file: INQ_WS_DSCR_TBL_B.ADA -- level: 1a, 2a with CGI_SUBTYPES_A; with WSM; with GKS_OPERATING_STATE_LIST; with GKS_ERRORS; use CGI_SUBTYPES_A; use WSM; use GKS_OPERATING_STATE_LIST; use GKS_ERRORS; package body INQ_WS_DESCRIPTION_TABLE_1a is -- The package INQ_WS_DESCRIPTION_TABLE_1a contains procedures that -- inquire into the workstation description table. -- -- The procedures in the package INQ_WS_DESCRIPTION_TABLE_1a -- check the operating state. If GKS is closed, the error -- indicator #8 is returned. Otherwise, WS_MANAGER is called. -- It may return an error indicator of #22 or #39 which is -- passed to the application program via ERROR_INDICATOR. If the WS_MANAGER -- doesn't detect an error, it returns the appropriate information -- with an error indicator of 0. procedure INQ_DYNAMIC_MODIFICATION_OF_WS_ATTRIBUTES (TYPE_OF_WS : in WS_TYPE; ERROR_INDICATOR : out ERROR_NUMBER; POLYLINE_REPRESENTATION : out DYNAMIC_MODIFICATION; POLYMARKER_REPRESENTATION : out DYNAMIC_MODIFICATION; TEXT_REPRESENTATION : out DYNAMIC_MODIFICATION; FILL_AREA_REPRESENTATION : out DYNAMIC_MODIFICATION; PATTERN_REPRESENTATION : out DYNAMIC_MODIFICATION; COLOUR_REPRESENTATION : out DYNAMIC_MODIFICATION; TRANSFORMATION : out DYNAMIC_MODIFICATION) is -- The WS_MANAGER returns values of IMM (immediately) or -- IRG (implicitly regenerated) on the given workstation -- for each of the following: -- polyline bundle representation -- polymarker bundle representation -- text bundle representation -- fill area bundle representation -- pattern representation -- colour representation -- workstation transformation -- -- TYPE_OF_WS - This is the identifier of the workstation on which -- the dynamic modification attributes are being inquired. -- -- ERROR_INDICATOR - This is the error indicator. Its value represents -- the type of error, if any, that occurred. -- -- POLYLINE_REPRESENTATION - The dynamic modification value for the -- polyline representation. -- -- POLYMARKER_REPRESENTATION - The dynamic modification value for the -- polymarker representation. -- -- TEXT_REPRESENTATION - The dynamic modification value for the text -- representation. -- -- FILL_AREA_REPRESENTATION - The dynamic modification value for the -- fill area representation. -- -- PATTERN_REPRESENTATION - The dynamic modification value for the -- pattern representation. -- -- COLOUR_REPRESENTATION - The dynamic modification value for the -- colour representation. -- -- TRANSFORMATION - The dynamic modification value for the -- transformation matrix. GKS_INSTR : CGI_INQ_DYNAMIC_MODIFICATION_OF_WS_ATTRIBUTES; begin -- The following case inquires the GKS_OPERATING_STATE_LIST to see -- if GKS is in the proper state before proceeding with the call -- to WS_MANAGER. if (CURRENT_OPERATING_STATE = GKCL) then ERROR_INDICATOR := NOT_GKOP_WSOP_WSAC_SGOP; -- error 8 POLYLINE_REPRESENTATION := DYNAMIC_MODIFICATION'first; POLYMARKER_REPRESENTATION := DYNAMIC_MODIFICATION'first; TEXT_REPRESENTATION := DYNAMIC_MODIFICATION'first; FILL_AREA_REPRESENTATION := DYNAMIC_MODIFICATION'first; PATTERN_REPRESENTATION := DYNAMIC_MODIFICATION'first; COLOUR_REPRESENTATION := DYNAMIC_MODIFICATION'first; TRANSFORMATION := DYNAMIC_MODIFICATION'first; else -- Call to workstation manager with inquiry parameter. GKS_INSTR.WS_TO_INQ_DYM_OF_WS_ATTRIBUTES := TYPE_OF_WS; WS_MANAGER(GKS_INSTR); ERROR_INDICATOR := GKS_INSTR.ERROR_INDICATOR; -- Return the inquired information. POLYLINE_REPRESENTATION := GKS_INSTR.DYM_POLYLINE_REP_INQ; POLYMARKER_REPRESENTATION := GKS_INSTR.DYM_POLYMARKER_REP_INQ; TEXT_REPRESENTATION := GKS_INSTR.DYM_TEXT_REP_INQ; FILL_AREA_REPRESENTATION := GKS_INSTR.DYM_FILL_AREA_REP_INQ; PATTERN_REPRESENTATION := GKS_INSTR.DYM_PATTERN_REP_INQ; COLOUR_REPRESENTATION := GKS_INSTR.DYM_COLOUR_REP_INQ; TRANSFORMATION := GKS_INSTR.DYM_TRANSFORMATION_INQ; end if; end INQ_DYNAMIC_MODIFICATION_OF_WS_ATTRIBUTES; procedure INQ_DEFAULT_DEFERRAL_STATE_VALUES (TYPE_OF_WS : in WS_TYPE; ERROR_INDICATOR : out ERROR_NUMBER; DEFERRAL : out DEFERRAL_MODE; REGENERATION : out REGENERATION_MODE) is -- In the procedure INQ_DEFAULT_DEFERRAL_STATE_VALUES the WS_MANAGER -- returns one of the following values as the default deferral mode: -- ASAP - as soon as possible -- BNIG - before the next interaction globally -- BNIL - before the next interaction locally -- ASTI - at some time -- along with the default value of the implicit regeneration mode, -- either SUPPRESSED or ALLOWED. -- -- TYPE_OF_WS - The identifier of the workstation on which the default -- deferral state is being inquired. -- -- ERROR_INDICATOR - This is the error indicator. Its value represents -- the type of error, if any, that occurred. -- -- DEFERRAL - This is the default deferral state of the workstation. -- -- REGENERATION - This is the default value of the implicit -- regeneration mode. GKS_INSTR : CGI_INQ_DEFAULT_DEFERRAL_STATE_VALUES; begin -- The following if inquires the GKS_OPERATING_STATE_LIST to -- see if GKS is in the proper state before proceeding with the -- call to the WS_MANAGER. if (CURRENT_OPERATING_STATE = GKCL) then ERROR_INDICATOR := NOT_GKOP_WSOP_WSAC_SGOP; -- error 8 DEFERRAL := DEFERRAL_MODE'first; REGENERATION := REGENERATION_MODE'first; else -- Call to workstation manager with inquiry parameter. GKS_INSTR.WS_TO_INQ_DEFAULT_DEFERRAL_STATE_VALUES := TYPE_OF_WS; WS_MANAGER(GKS_INSTR); ERROR_INDICATOR := GKS_INSTR.ERROR_INDICATOR; -- Return the information inquired. DEFERRAL := GKS_INSTR.DEFAULT_DEFERRAL_INQ; REGENERATION := GKS_INSTR.DEFAULT_REGENERATION_INQ; end if; end INQ_DEFAULT_DEFERRAL_STATE_VALUES; procedure INQ_NUMBER_OF_SEGMENT_PRIORITIES_SUPPORTED (TYPE_OF_WS : in WS_TYPE; ERROR_INDICATOR : out ERROR_NUMBER; NUMBER_OF_PRIORITIES : out NATURAL) is -- In the procedure INQ_NUMBER_OF_SEGMENT_PRIORITIES_SUPPORTED the -- WS_MANAGER returns the number of segment priorities. -- (A value of zero means a continuous range of priorities is -- supported.) An error indicator of 0 is returned to the application -- program along with the requested data. -- -- TYPE_OF_WS - This is the identifier of the workstation on which -- the dynamic modification attributes are being inquired. -- -- ERROR_INDICATOR - This is the error indicator. Its numeric represents -- the type of error, if any, that occurred. -- -- NUMBER_OF_PRIORITIES - This is the number of segment priorities -- supported by this workstation returned -- by WS_MANAGER. GKS_INSTR : CGI_INQ_NUMBER_OF_SEGMENT_PRIORITIES_SUPPORTED; begin -- The following if inquires the GKS_OPERATING_STATE to see if -- GKS is in the proper state before proceeding with the call -- to WS_MANAGER. if (CURRENT_OPERATING_STATE = GKCL) then ERROR_INDICATOR := NOT_GKOP_WSOP_WSAC_SGOP; -- error 8 NUMBER_OF_PRIORITIES := NATURAL'first; else -- Call to workstation manager with inquiry parameter. GKS_INSTR.WS_TO_INQ_NUMBER_OF_SEGMENT_PRIORITIES_SUPPORTED := TYPE_OF_WS; WS_MANAGER(GKS_INSTR); ERROR_INDICATOR := GKS_INSTR.ERROR_INDICATOR; -- Return the information inquired. NUMBER_OF_PRIORITIES := GKS_INSTR.NUMBER_OF_PRIORITIES_INQ; end if; end INQ_NUMBER_OF_SEGMENT_PRIORITIES_SUPPORTED; procedure INQ_DYNAMIC_MODIFICATION_OF_SEGMENT_ATTRIBUTES (TYPE_OF_WS : in WS_TYPE; ERROR_INDICATOR : out ERROR_NUMBER; TRANSFORMATION : out DYNAMIC_MODIFICATION; VISIBLE_TO_INVISIBLE : out DYNAMIC_MODIFICATION; INVISIBLE_TO_VISIBLE : out DYNAMIC_MODIFICATION; HIGHLIGHTING : out DYNAMIC_MODIFICATION; PRIORITY : out DYNAMIC_MODIFICATION; ADDING_PRIMITIVES : out DYNAMIC_MODIFICATION; DELETION_VISIBLE : out DYNAMIC_MODIFICATION) is -- The procedure INQ_DYNAMIC_MODIFICATION_OF_SEGMENT_ATTRIBUTES -- receives from the WS_MANAGER the values of IMM (immediately) -- or IRG (implicitly regenerated) on the given workstation -- for each of the following: -- segment transformation changeable -- visibility changeable from visible to invisible -- visibility changeable from invisible to visible -- highlighting changeable -- segment priority changeable -- adding primitives to the open segment -- segment deletion immediately visible -- -- TYPE_OF_WS - This is the identifier of the workstation on which -- the dynamic modification attributes are being inquired. -- -- ERROR_INDICATOR - This is the error indicator. Its value represents -- the type of error, if any, that occurred. -- -- TRANSFORMATION - The dynamic modification value for -- transformation. -- -- VISIBLE_TO_INVISIBLE - The dynamic modification value for visible -- to invisible. -- -- INVISIBLE_TO_VISIBLE -The dynamic modification value for invisible -- to visible. -- -- HIGHLIGHTING - The dynamic modification value for highlighting. -- -- PRIORITY - The dynamic modification value for priority. -- -- ADDING_PRIMITIVES - The dynamic modification value for adding -- primitives. -- -- DELETION_VISIBLE - The dynamic modification value for segment -- deletion visibility. GKS_INSTR : CGI_INQ_DYNAMIC_MODIFICATION_OF_SEGMENT_ATTRIBUTES; begin -- The following if inquires the GKS_OPERATING_STATE_LIST to see -- if GKS is in the proper state before proceeding with the call -- to WS_MANAGER. if (CURRENT_OPERATING_STATE = GKCL) then ERROR_INDICATOR := NOT_GKOP_WSOP_WSAC_SGOP; -- error 8 TRANSFORMATION := DYNAMIC_MODIFICATION'first; VISIBLE_TO_INVISIBLE := DYNAMIC_MODIFICATION'first; INVISIBLE_TO_VISIBLE := DYNAMIC_MODIFICATION'first; HIGHLIGHTING := DYNAMIC_MODIFICATION'first; PRIORITY := DYNAMIC_MODIFICATION'first; ADDING_PRIMITIVES := DYNAMIC_MODIFICATION'first; DELETION_VISIBLE := DYNAMIC_MODIFICATION'first; else -- Call to workstation manager with inquiry parameter. GKS_INSTR.WS_TO_INQ_DYM_OF_SEGMENT_ATTRIBUTES := TYPE_OF_WS; WS_MANAGER(GKS_INSTR); ERROR_INDICATOR := GKS_INSTR.ERROR_INDICATOR; -- Return information inquired. TRANSFORMATION := GKS_INSTR.SEGMENT_TRANSFORMATION_INQ; VISIBLE_TO_INVISIBLE := GKS_INSTR.VISIBLE_TO_INVISIBLE_INQ; INVISIBLE_TO_VISIBLE := GKS_INSTR.INVISIBLE_TO_VISIBLE_INQ; HIGHLIGHTING := GKS_INSTR.DYM_HIGHLIGHTING_INQ; PRIORITY := GKS_INSTR.DYM_PRIORITY_INQ; ADDING_PRIMITIVES := GKS_INSTR.ADDING_PRIMITIVES_INQ; DELETION_VISIBLE := GKS_INSTR.DELETION_VISIBLE_INQ; end if; end INQ_DYNAMIC_MODIFICATION_OF_SEGMENT_ATTRIBUTES; end INQ_WS_DESCRIPTION_TABLE_1a;