*"表題 レイアウト GTOOL3(GGLAY3)
*
*"履歴 90/08/21 沼口  敦
*"履歴 95/05/29 竹広真一 for dcl-5.0
*"     97/12/01 竹広真一 SET -> STX
*
*********************************************************************
*"         << レイアウト, 題名表示 >>
*********************************************************************
      SUBROUTINE GGLAY3
     I         ( HHEAD )
*
      CHARACTER  HHEAD ( * )*(*)         !" ヘッダー
*
#ifdef SYS_IBMS
      INCLUDE    (GZSIZE)                !" NCC, NDC, NED
#else
#include         "gzsize.F"              !" NCC, NDC, NED
#endif
      CHARACTER  HTITL   *(NCC*2)
      CHARACTER  HDSET   *(NCC)
      CHARACTER  HUNIT   *(NCC)
      CHARACTER  HITEM   *(NCC)
      CHARACTER  HUTIM   *4
      CHARACTER  HTIME   *(NCC)
      CHARACTER  HDATE   *(NCC)
      CHARACTER  HDATEX  *(NCC)
      CHARACTER  HDATIM  *(NCC*3)
      INTEGER    NHE  ( NED )
      CHARACTER  HFNUM   *(NCC)
      CHARACTER  HDNUM   *(NCC)
      CHARACTER  HAITM   *(NCC)
      CHARACTER  HS      *(NCC)
      CHARACTER  HE      *(NCC)
      CHARACTER  HRAN    *(NCC)
      CHARACTER  HEDS    *(100)
      CHARACTER  HP      *8
      DATA       NDESC  / 24 /
      DATA       VRATIO / 0.70 /
      DATA       VXMINI  / 0.10 /
      DATA       VXMAXI  / 0.949 /
      DATA       VYMINI  / 0.10 /
      DATA       VYMAXI  / 0.524 /
      DATA       STITL  / 0.015 / 
      DATA       SAXSL  / 0.01 / 
      DATA       SAXST  / 0.01 / 
      DATA       SREMK  / 0.01 / 
      DATA       SCONL  / 0.01 / 
      LOGICAL    LUNIT  / .TRUE. /             !" ユニットベクトル
      DATA       VXULOC  /0.06/                !"  〃 位置：ｘ
      DATA       VYULOC  /0.02/                !"  〃 位置：ｙ
      LOGICAL    LTONS  /.TRUE. /              !" トーンスケール
      DATA       TXSLOC  /0.05/                !"  〃 位置：ｘ
      DATA       TYSLOC  /0.02/                !"  〃 位置：ｙ
      DATA       TXSWDH  /0.25/                !"  〃 幅  ：ｘ
      DATA       TYSWDH  /0.02/                !"  〃 幅  ：ｙ
      INTEGER    TLNUM   /4/                   !"  〃 ラベルの数
      LOGICAL    LLINT   /.TRUE./              !" 線種コメント
      REAL       LTVX1   /0.22/                !"  〃 位置：ｘ(1)
      REAL       LTVX2   /0.55/                !"  〃 位置：ｘ(2)
      REAL       LTWDH   /0.08/                !"  〃 幅
      LOGICAL    OLCNTL
*
*"         < 1. 初期化 >
*
      CALL GRFRM
      CALL GGAXRS
      CALL GGLTRS
*
      CALL GGPSET ( 'VRATIO' , VRATIO )
      CALL GGPSET ( 'VXMIN'  , VXMINI )
      CALL GGPSET ( 'VXMAX'  , VXMAXI )
      CALL GGPSET ( 'VYMIN'  , VYMINI )
      CALL GGPSET ( 'VYMAX'  , VYMAXI )
      CALL GGPSET ( 'STITL'  , STITL  )
      CALL GGPSET ( 'SAXSL'  , SAXSL  )
      CALL GGPSET ( 'SAXST'  , SAXST  )
      CALL GGPSET ( 'SREMK'  , SREMK  )
      CALL GGPSET ( 'SCONL'  , SCONL  )
      CALL GGPSET ( 'LUNIT'  , LUNIT  )
      CALL GGPSET ( 'VXULOC' , VXULOC )
      CALL GGPSET ( 'VYULOC' , VYULOC )
      CALL GGPSET ( 'LTONS'  , LTONS  )
      CALL GGPSET ( 'TXSLOC' , TXSLOC )
      CALL GGPSET ( 'TYSLOC' , TYSLOC )
      CALL GGPSET ( 'TXSWDH' , TXSWDH )
      CALL GGPSET ( 'TYSWDH' , TYSWDH )
      CALL GGPSET ( 'TLNUM'  , TLNUM  )
      CALL GGPSET ( 'LLINT'  , LLINT  )    
      CALL GGPSET ( 'LTVX1'  , LTVX1  )
      CALL GGPSET ( 'LTVX2'  , LTVX2  )
      CALL GGPSET ( 'LTWDH'  , LTWDH  )
*
      CALL UZPGET( 'RSIZET2', RSIZT2 )
      CALL UZPGET( 'ROFFXT' , ROFFXT )
      IF ( ROFFXT .LT. RSIZT2 ) CALL UZPSTX( 'ROFFXT', RSIZT2 )
*
*"         < 2. ビューポート(仮座標)設定 >
*
      CALL SGSVPT ( VXMINI, VXMAXI , VYMINI , VYMAXI )
      CALL SGSWND ( 0.   , 1.    , 0.    , 1.  )
      CALL SGSTRN (1)
      CALL SGSTRF
*
      CALL SGPSTX ( 'IFONT', 2 )
*
      CALL GHCGTS ( HHEAD, 'TITL',  HTITL  )
      CALL GHCGET ( HHEAD, 'DSET',  HDSET  )
      CALL GHCGET ( HHEAD, 'UNIT',  HUNIT  )
*
      CALL GUQTIM ( HHEAD , RT    , HUTIM  )
      IF ( RT .GT. 9999900.0 ) THEN
         CALL CHVAL  ( 'D'      , RT    , HTIME  )
      ELSE
         CALL CHVAL  ( '(F10.1)', RT    , HTIME  )
      ENDIF
      NHT = LENC( HTIME )
*
      CALL GGPGET ( 'STITL'  , STITL )
      CALL UZPSTX ( 'RSIZEC2', STITL )
*
      CALL UZPGET ( 'ROFFXT', ROFF   )
      CALL UXMTTL ( 'T', HUNIT , -1. )
*
      HDATIM = HTIME(1:NHT)//HUTIM
      CALL GHCGET ( HHEAD, 'DATE',  HDATE  )
      IF ( HDATE .NE. ' ' ) THEN
         HDATEX        = ' ' 
         HDATEX(1:2)   = HDATE(3:4)
         HDATEX(3:3)   = '/'
         HDATEX(4:5)   = HDATE(5:6)
         HDATEX(6:6)   = '/'
         HDATEX(7:8)   = HDATE(7:8)
         HDATEX(9:9)   = '-'
         HDATEX(10:11) = HDATE(10:11)
         HDATEX(12:12)   = ':'
         HDATEX(13:14) = HDATE(12:13)
         NHT    = LENC( HDATIM )         
         HDATIM = HDATIM(1:NHT)//'   '//HDATEX
      ENDIF
      CALL UZPSTX ( 'ROFFXT', ROFF   )
      CALL UXMTTL ( 'T', HDATIM,  1. )
*
      CALL UZPGET ( 'ROFFXT', ROFF   )
      CALL UXMTTL ( 'T', HTITL , -1. )
      CALL UZPSTX ( 'ROFFXT', ROFF   )
      CALL SGPGET ( 'LCNTL', OLCNTL  )
      CALL SGPSTX ( 'LCNTL', .FALSE. )
      CALL UXMTTL ( 'T', HDSET ,  1. )
      CALL SGPSTX ( 'LCNTL', OLCNTL  )
*
      CALL UZPSTX ( 'ROFFXT' , 0. )
*
      RETURN
      END
