rfddev.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 766 行 · 第 1/2 页

GML
766
字号
:H2.Defining a Device
:I1.defining a device
:I2 refid='device'.defining
:P.
The device definition combines the specification of device
setup characteristics, driver definition, and font definitions.
The :HP2.DEVICE:eHP2.
:I2 refid='device'.device block
block is processed by the GENDEV program
to create a device definition.
The device definition to be used for the processing of a document
is specified on the &WGML. command line.
:FIG id='devblk' place=inline frame=box.
&gml.DEVICE
   <attributes>
   <pause block>
   <devicefont block>
   <defaultfont block>
   <fontpause block>
   <rule block>
   <box block>
   <underscore block>
   <pagestart block>
&gml.eDEVICE.
:FIGCAP.The DEVICE Block
:EFIG.
:P.
A device block begins with the :HP2.&gml.device:eHP2.
:IH1 id='ddevice' print='&gml.device tag'.device tag
:I1.device tag
tag and
ends with the :HP2.&gml.edevice:eHP2.
:IH1 id='dedevic' print='&gml.edevice tag'.edevice tag
:I1.edevice tag
tag.
The attributes of the device block must all be specified.
The various blocks of information following the attributes
are not all required to define the device.
When they are specified, they must be in the order shown in
:FIGREF refid='devblk'..
:H3.Attributes of the Device Block
:FIG place=inline frame=box.
defined_name          = 'character string'
member_name           = 'character string'
driver_name           = 'character string'
output_name           = 'character string'
output_suffix         = 'character string'
page_width            = horizontal-base-units
page_depth            = vertical-base-units
horizontal_base_units = number
vertical_base_units   = number
:FIGCAP.Device Attributes
:EFIG.
:FIG place=inline frame=box.
defined_name          = 'x2700'
member_name           = 'x2700'
driver_name           = 'x2700drv'
output_name           = ''
output_suffix         = 'x2700'
page_width            = 2400
page_depth            = 3300
horizontal_base_units = 300
vertical_base_units   = 300
:FIGCAP.Example of the Device Attributes
:EFIG.
:SET symbol='local' value='device'.
:INCLUDE file='rfddef'.
:IH1 id='dadevic'.device attributes
:I2.defined_name
The defined name is used to identify the device on the
&WGML. command line.
:INCLUDE file='rfdmem'.
:I2 refid='dadevic'.member_name
:H4.DRIVER_NAME Attribute
:P.
The :HP2.driver_name:eHP2.
:I1.driver_name attribute
:I2 refid='dadevic'.driver_name
attribute specifies a character value that is
the defined name of a driver definition.
The driver definition contains the control sequences
used to produce the output for the device.
:H4 id='devout'.OUTPUT_NAME Attribute
:P.
If the output is to be directed to a specific device, such as a printer,
the :HP2.output_name:eHP2.
:I1.output_name attribute
:I2 refid='dadevic'.output_name
attribute specifies the name of that device.
A record specification may be part of the output name
(see :HDREF refid='files'.).
If a device does not exist with the specified name,
the attribute value will be used to create an output file name.
If the null string('') is specified as the attribute value, the file
name of the input source document will be used.
:H4.OUTPUT_SUFFIX Attribute
:P.
The character value of the :HP2.output_suffix:eHP2.
:I1.output_suffix attribute
:I2 refid='dadevic'.output_suffix
attribute will be
suffixed to the output name.
If the null string('') is specified as the attribute value, no
file suffix will be added.
:H4.PAGE_WIDTH Attribute
:P.
The :HP2.page_width:eHP2.
:I1.page_width attribute
:I2 refid='dadevic'.page_width
attribute specifies
the physical page width of the output page in horizontal base units.
The page width defined in the document layout may be smaller than
this value.
:H4.PAGE_DEPTH Attribute
:P.
The :HP2.page_depth:eHP2.
:I1.page_depth attribute
:I2 refid='dadevic'.page_depth
attribute specifies
the physical page depth of the output page in vertical base units.
:I1.vertical_base_units
The page depth defined in the document layout may be smaller or
larger than this value.
If the page depth in the document layout is larger than this value,
&WGML. will produce one document page over several of the device
pages.
:H4.HORIZONTAL_BASE_UNITS Attribute
:P.
The value of the :HP2.horizontal_base_units:eHP2.
:I1.horizontal_base_units attribute
:I2 refid='dadevic'.horizontal_base_units
:I1.horizontal_base_units
attribute is a positive integer number.
A horizontal base unit is the smallest unit of space that the
output device can advance in a horizontal direction.
The attribute value specifies the number of horizontal base units
which are equivalent to one inch of horizontal space.
:H4.VERTICAL_BASE_UNITS Attribute
:P.
The value of the :HP2.vertical_base_units:eHP2.
:I1.vertical_base_units attribute
:I2 refid='dadevic'.vertical_base_units
attribute is a positive integer number.
A vertical base unit is the smallest unit of space that the
output device can advance in a vertical direction.
The attribute value specifies the number of vertical base units
:I1.vertical_base_units
which are equivalent to one inch of vertical space.
:H3.PAUSE Block
:P.
The :HP2.pause:eHP2.
:I1.pausing
:I2 refid='ddevice'.pause block
block is used to
cause various actions to occur at the
terminal while &WGML. is processing the document.
The issuing of messages and pausing while changes to the output device
are made can be controlled through the pause block.
If pausing or messages are not required, the pause block may be omitted.
:FIG place=inline frame=box.
&gml.PAUSE
   place                = START|DOCUMENT
                          |DOCUMENT_PAGE
                          |DEVICE_PAGE
   &gml.value.
      <device functions>
   &gml.evalue.
&gml.ePAUSE.
:FIGCAP.The PAUSE Block
:EFIG.
:P.
A pause block begins with the :HP2.&gml.pause:eHP2.
:IH1 print='&gml.pause tag'.pause tag
:I1 id='dapause'.pause tag
tag and ends with the :HP2.&gml.epause:eHP2.
:IH1 print='&gml.epause tag'.epause tag
:I1.epause tag
tag.
The place attribute and value section must both be specified.
:FIG place=inline frame=box.
&gml.PAUSE
   place = document
   &gml.value.
      %text( "Press enter to start the document." )
      %recordbreak()%wait()%clear3270()
   &gml.evalue.
&gml.ePAUSE.
:FIGCAP.Example of the PAUSE Block
:EFIG.
:H4.PLACE Attribute
:P.
The :HP2.place:eHP2.
:I2 refid='dapause'.place attribute
attribute specifies the point during processing
when &WGML. should evaluate the pause block.
The attribute value may be one of the keywords
:HP1.START:eHP1.,
:HP1.DOCUMENT:eHP1.,
:HP1.DOCUMENT_PAGE:eHP1.,
or
:HP1.DEVICE_PAGE:eHP1..
A separate pause block may be specified for each of the different
attribute values.
:DL break.
:DT.START
:DD.The pause block is evaluated when &WGML. begins processing
    the source input data.
:DT.DOCUMENT
:DD.The pause block is evaluated when &WGML. begins processing
    the document text.
:DT.DOCUMENT_PAGE
:DD.The pause block is evaluated at the beginning of each document
    page.
    A document page is the amount of output that &WGML.
    formats for a page in the document.
    The document page may be smaller or larger than the physical
    page produced by the output device.
    If the page being printed is both the document page and the
    device page, the document page pause block takes precedence
    over the device page pause block.
:DT.DEVICE_PAGE
:DD.The pause block is evaluated when &WGML. begins a new page
    on the output device.
:eDL.
:H4.VALUE Section
:P.
The :HP2.value:eHP2. section specifies the pausing control sequences
to be output,
:INCLUDE file='rfdvalue'.
:H3.DEVICEFONT Block
:P.
A number of different device definitions may use the same fonts.
In some cases, the fonts available to one device may be a subset
of the fonts available to another device.
The device font block
:I2 refid='ddevice'.device font block
:I1.fonts
is used to define the fonts available to the
device definition.
One device font block is specified for each of the available fonts.
:FIG place=inline frame=box.
&gml.DEVICEFONT
   fontname    = 'character string'
   fontswitch  = 'character string'
   fontpause   = 'character string'
   resident    = YES | NO
&gml.eDEVICEFONT.
:FIGCAP.The DEVICEFONT Block
:EFIG.
:P.
A devicefont block begins with the :HP2.&gml.devicefont:eHP2.
:IH1 print='&gml.devicefont tag'.devicefont tag
:I1 id='dadevfo'.devicefont tag
tag and ends with the :HP2.&gml.edevicefont:eHP2.
:IH1 print='&gml.edevicefont tag'.edevicefont tag
:I1.edevicefont tag
tag.
All of the attributes of a device font block must be specified.
:FIG place=inline frame=box.
&gml.DEVICEFONT
        fontname   = 'vintage12'
        fontswitch = "x27 font switch"
        fontpause  = ""
        resident   = no
&gml.eDEVICEFONT.
:FIGCAP.Example of the DEVICEFONT Block
:EFIG.
:H4.FONTNAME Attribute
:P.
The :HP2.fontname:eHP2.
:I2 refid='dadevfo'.fontname attribute
attribute specifies a character value.
This value is the defined name value in a font definition.
:H4.FONTSWITCH Attribute
:P.
The :HP2.fontswitch:eHP2.
:I2 refid='dadevfo'.fontname attribute
attribute specifies a character value which
is the font switch method to be used when switching into the
font.
The attribute value must be an identifier defined by a font
switch block in the driver definition.
If the value is the null('') string, no font switching is performed.
:H4.FONTPAUSE Attribute
:P.
The :HP2.fontpause:eHP2.
:I2 refid='dadevfo'.fontpause attribute
attribute specifies a character value which
is the font pausing method to be used when switching into the
font.
The attribute value must be an identifier defined by a font
pause block in the current device definition.
If the value is the null('') string, no font pausing is performed.
:H4.RESIDENT Attribute
:P.
The :HP2.resident:eHP2.
:I2 refid='dadevfo'.resident attribute
attribute defines the resident status of the font
in the output device.
With some devices, information must be sent to the device for
each of the fonts being used.
To reduce the time required for printing a document, information
about the most commonly used fonts often 'reside'
on the device permanently.
The keywords :HP1.YES:eHP1.
or :HP1.NO:eHP1. may be specified as the attribute value.
:DL.
:DT.YES
:DD.The font resides permanently on the device.
:DT.NO
:DD.The font does not reside on the device.
:eDL.
:H3.DEFAULTFONT Block
:P.
The :HP2.defaultfont:eHP2.
:I2 refid='ddevice'.default font block
:I1.fonts
block specifies a font to be used with this
device when processing a document.
A default font block is specified for each default font to be
defined.
:FIG place=inline frame=box.
&gml.DEFAULTFONT
   font                 = number
   fontname             = 'character string'
   font_height          = number
   font_space           = number
   fontstyle            = PLAIN|UNDERSCORE
                          |BOLD|USBOLD
                          |UNDERLINE|ULBOLD
&gml.eDEFAULTFONT.
:FIGCAP.The DEFAULTFONT Block
:EFIG.
:P.
A default font block begins with the :HP2.&gml.defaultfont:eHP2.
:IH1 print='&gml.defaultfont tag'.defaultfont tag
:I1 id='dadeffo'.defaultfont tag
tag and ends with the :HP2.&gml.edefaultfont:eHP2.
:IH1 print='&gml.edefaultfont tag'.edefaultfont tag
:I1.edefaultfont tag
tag.
Most of the attributes in the default font block must be specified.
The attributes font_height and font_space are only necessary if
the font is scaled.
:FIG place=inline frame=box.
&gml.DEFAULTFONT
   font         = 1
   fontname     = 'times-italic'
   font_height  = 10
   font_space   = 2
   fontstyle    = plain
&gml.eDEFAULTFONT.
:FIGCAP.Example of the DEFAULTFONT Block
:EFIG.
:H4.FONT Attribute
:P.
The value of the :HP2.font:eHP2.
:I2 refid='dadeffo'.font attribute
attribute must be a
non-negative integer number value.
The font numbers zero through three correspond to the
highlight phrase tags in the GML document.
They also correspond directly to the font numbers used in the
layout definition.
The default font with a font number of zero must be specified.
All font numbers used in the document
which are not defined with the default font block
or the font option on the &WGML. command line will be
assigned the values specified in the font zero default font block.
:H4.FONTNAME Attribute
:P.
The :HP2.fontname:eHP2.
:I2 refid='dadeffo'.fontname attribute
attribute specifies a character value.
This value is a font name defined by a device font block
in the device definition.
The font name must be specified in a devicefont block within
the current device definition.
:H4.FONT_HEIGHT Attribute
:P.
The :HP2.font_height:eHP2.
:I2 refid='dadeffo'.font_height attribute
attribute specifies a number value.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?