183 lines
7.7 KiB
HTML
183 lines
7.7 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>Using Window Services APIs</title>
|
||
|
<!-- Begin Header Records ========================================= -->
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- YYMMDD USERID Change description -->
|
||
|
<!-- DSMMST1 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
||
|
<!-- at RCHVMW2 on 29 Jan 1999 at 16:05:09 -->
|
||
|
<!-- File Edited November 2001 -->
|
||
|
<!-- End Header Records -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- Java sync-link -->
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>Using Window Services APIs</h2>
|
||
|
|
||
|
<p>A window is created using a window and a low-level environment description.
|
||
|
The window description provides the window attributes, a pointer to data that
|
||
|
is specified by the using application, and several exit routines that the
|
||
|
window module calls when a window is moved, resized, or deleted so the using
|
||
|
program can perform the appropriate actions. The low-level environment
|
||
|
description is the same as that used on the Create Low-Level Environment
|
||
|
(QsnCrtEnv) API to create a low-level environment. A window is implemented as a
|
||
|
low-level environment where the user data pointer describes the window itself.
|
||
|
Thus, a window can be manipulated through the low-level APIs or through the
|
||
|
window APIs by using the same window handle. This implementation is similar to
|
||
|
the concept of inheritance in object-oriented programming languages. DSM window
|
||
|
support uses graphical user interface (GUI) when the underlying control unit
|
||
|
supports it.</p>
|
||
|
|
||
|
<p>Each window has the low-level environment window mode enabled. The low-level
|
||
|
environment window area is set to the usable area in the window, which consists
|
||
|
of the area inside the border and attributes that can be accessed by screen I/O
|
||
|
services. (It does not include the message line.) Use relative coordinates when
|
||
|
specifying a row and column on an I/O API. The upper left corner of the usable
|
||
|
area is (1,1). To use absolute coordinates with a window, disable the low-level
|
||
|
environment window mode with the Set Low-Level Environment Window Mode
|
||
|
(QsnSetEnvWinMod) API.</p>
|
||
|
|
||
|
<p><a href="#FIGWINPIC1">Figure 1</a> shows the components of a DSM window.
|
||
|
The window in this example has a specified depth of 13 rows and a width of 19
|
||
|
columns.</p>
|
||
|
|
||
|
<p>The attributes of a DSM window are similar to those of a data description
|
||
|
specifications (DDS) window. The initial size and location of a DSM window are
|
||
|
specified using the location of the upper-left window border character and the
|
||
|
number of rows and columns within the window. For DSM windows, the leading
|
||
|
window attribute, right continuation attribute, or message line can be
|
||
|
specified separately. Unlike a DDS window, a DSM window does not require the
|
||
|
following:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>A border
|
||
|
|
||
|
<p>If a window is defined with no border, no extra space is used on the display
|
||
|
for the border characters or their attributes (L and B in <a href=
|
||
|
"#FIGWINPIC1">Figure 1</a>). An area of the screen is cleared starting from
|
||
|
the specified location for the upper left corner of the window and continues
|
||
|
for the number of rows and columns given as the window size. <a href=
|
||
|
"#FIGWINPIC4">Figure 2</a> shows an example of a window with no border.</p>
|
||
|
|
||
|
<p><strong>Note:</strong> In discussions throughout the DSM sections that refer
|
||
|
to window borders, this should be taken to mean the top/bottom window row or
|
||
|
left/right window column for a window with no borders.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>Window border attributes
|
||
|
|
||
|
<p>If a window is defined with no border attributes (L and B in <a href=
|
||
|
"#FIGWINPIC1">Figure 1</a>), no extra space for these is used on the display.
|
||
|
<a href="#FIGWINPIC2">Figure 3</a> shows a window with no border
|
||
|
attributes.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>Leading window attribute
|
||
|
|
||
|
<p>The leading window attribute (A in <a href="#FIGWINPIC1">Figure 1</a>) is
|
||
|
part of the addressable window area. If specified, this attribute takes up an
|
||
|
extra screen character and does not reduce the size of the window area. <a
|
||
|
href="#FIGWINPIC3">Figure 4</a> shows a window defined with no leading window
|
||
|
attribute. The window text directly follows the window border character.
|
||
|
Attribute characters can be written inside the window if desired.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>Right continuation attribute
|
||
|
|
||
|
<p>If the right continuation attribute (R in <a href="#FIGWINPIC1">Figure
|
||
|
1</a>) is specified on a window description, DSM determines the appropriate
|
||
|
attribute to use, based on the screen image underlying the window. If the
|
||
|
window is not a GUI window, right-continuation-attribute correction is
|
||
|
performed for display-screen and presentation screen DBCS-only attributes. (No
|
||
|
correction is performed for extended primary attributes and DBCS data types).
|
||
|
When a window is placed on a screen that supports extended attributes, all
|
||
|
extended attributes are cleared prior to displaying the window. To have the
|
||
|
right continuation attribute handle extended attributes, you must use a display
|
||
|
that supports GUI windows and specify GUI window support on the window
|
||
|
description.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>Message line
|
||
|
|
||
|
<p>Specifying a message line on a window description decreases the number of
|
||
|
lines in the window area by 1, as shown in Figure 1.
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong><em><a name="FIGWINPIC1">Figure 1. DSM Window Layout</a></em></strong></p>
|
||
|
|
||
|
<p><img src="RBAFX647.gif" alt="DSM Window Layout"></p>
|
||
|
|
||
|
<table cellpadding="2">
|
||
|
<tr>
|
||
|
<th align="left" valign="top">Key</th>
|
||
|
<th align="left" valign="top"> </th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>L</em></td>
|
||
|
<td align="left" valign="top">Left border attribute</td>
|
||
|
</tr><tr>
|
||
|
<td align="left" valign="top"><em>.</em></td>
|
||
|
<td align="left" valign="top">Top and bottom border</td>
|
||
|
</tr><tr>
|
||
|
<td align="left" valign="top"><em>R</em></td>
|
||
|
<td align="left" valign="top">Right continuation attribute</td>
|
||
|
</tr><tr>
|
||
|
<td align="left" valign="top"><em>:</em></td>
|
||
|
<td align="left" valign="top">Left and right border</td>
|
||
|
</tr><tr>
|
||
|
<td align="left" valign="top"><em>A</em></td>
|
||
|
<td align="left" valign="top">Leading window attribute</td>
|
||
|
</tr><tr>
|
||
|
<td align="left" valign="top"><em>w</em></td>
|
||
|
<td align="left" valign="top">Window area</td>
|
||
|
</tr><tr>
|
||
|
<td align="left" valign="top"><em>m</em></td>
|
||
|
<td align="left" valign="top">Message line</td>
|
||
|
</tr><tr>
|
||
|
<td align="left" valign="top"><em>B</em></td>
|
||
|
<td align="left" valign="top">Right border attribute</td>
|
||
|
</tr></table>
|
||
|
|
||
|
<p><strong><em><a name="FIGWINPIC4">Figure 2. DSM Window with No
|
||
|
Border</a></em></strong></p>
|
||
|
|
||
|
<p><img src="RBAFX648.gif" alt="DSM Window with No Border"></p>
|
||
|
|
||
|
<p><strong><em><a name="FIGWINPIC2">Figure 3. DSM Window with No Border
|
||
|
Attributes</a></em></strong></p>
|
||
|
|
||
|
<p><img src="RBAFX649.gif" alt="DSM Window with No Border Attributes"></p>
|
||
|
|
||
|
<p><strong><a name="FIGWINPIC3">Figure 4. DSM Window with No Leading Window
|
||
|
Attribute</a></strong></p>
|
||
|
|
||
|
<p><img src="RBAFX650.gif" alt="DSM Window with No Leading Window Attribute"></p>
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
||
|
"dsm.htm">Dynamic Screen Manager APIs</a> | <a href="aplist.htm">APIs by
|
||
|
category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|