Chapter Contents

Previous

Next
WINFO

WINFO



Returns information about the current window

Category: Window


Syntax
Values for Info-item
Example
See Also

Syntax

rc=WINFO(info-item<,aux-info>);

rc
contains the return code for the operation.

Type: Numeric

info-item
specifies either a characteristic of the window or an action. See Values for Info-item.

Type: Character

aux-info
specifies an additional argument that is required by some info-item actions:

pane-number (for PANECOL, PANECCOL, PANECROW, and PANEROW)
is the number of the pane to be queried. For example, in an extended table the non-scrollable section is pane 1 and the scrollable portion is pane 2.

item-id (for PMENUGRAY)
is the item identifier that you specified with the ID= option for the ITEM statement in PROC PMENU when you built the menu. Use the negative of the ID number to gray a selection, and use the positive ID number to ungray a selection.

item-id (for PMENUSTATE)
is the item identifier that you specified with the ID= option for the ITEM statement in PROC PMENU when you built the menu. Use the negative of the ID number to turn off the check mark or radio button for the selection, and use the positive ID number to turn on the check mark or radio button. Whether the menu selection gets a check mark or radio button depends on the value of the STATE= option when the menu was built.

flag (for POPUP)
can have the following values:
0 disables pop-up events.
1 enables pop-up events.

Type: Numeric


Values for Info-item

The following list explains the meaning of the return code, rc, for each value that you can specify for info-item:

BACKCOLOR
WINFO returns 1 if the device supports background colors.

BATCH
WINFO returns 1 if the application is running in batch mode.

COMMAND
WINFO returns 1 if the window has a command line.

CURSCREEN
WINFO returns the number of the SCREEN or FRAME entry in which the cursor is located.

CURSORCOL
WINFO returns the column number of the cursor position.

CURSORROW
WINFO returns the row number of the cursor position.

GRAPHICS
WINFO returns 1 if the user's output device supports graphics.

ICON
WINFO returns the number of Institute-supplied icons available under the user's host operating system. See the SAS documentation for your operating system for information about whether SAS software supports icons under your host operating system.

LOGON
WINFO returns 1 if a logon was specified when the SAS/AF application was invoked.

MAXCOL
WINFO returns the maximum number of columns to which the window can grow, excluding the command and border areas.

MAXROW
WINFO returns the maximum number of rows to which the window can grow, excluding the command and border areas.

MONO
WINFO returns 1 if the device is monochrome.

NSCREEN
WINFO returns information about the windows currently open in an application:

FSEDIT applications return the number of screens that are defined for the current FSEDIT window.

FSVIEW applications return 4 to indicate the four parts of the FSVIEW window: the column title area, the row number or ID column area, the data area, and the area above the column titles.

SAS/AF applications return 1 or 2 if you used ^^^ or ¬ ¬ ¬ to divide the entry's window into two or more frames.

NUMCOLS
WINFO returns the current number of columns in the window.

NUMROWS
WINFO returns the current number of rows in the window.

NUMXINCH
WINFO returns the number of pixels per horizontal inch of the window (valid only for FRAME entries).

NUMYINCH
WINFO returns the number of pixels per vertical inch of the window (valid only for FRAME entries).

NUMXPIXEL
WINFO returns the window width in pixels (valid only for FRAME entries).

NUMYPIXEL
WINFO returns the window height in pixels (valid only for FRAME entries).

PANECCOL
WINFO returns the column position of the cursor relative to the pane of the window in which it resides. Use aux-info to specify the pane.

PANECROW
WINFO returns the row position of the cursor relative to the pane of the window in which it resides. Use aux-info to specify the pane.

PANECOL
WINFO returns the number of columns in a specified pane. Use aux-info to specify the pane.

PANEROW
WINFO returns the number of rows in a specified pane. Use aux-info to specify the pane.

PMENU
WINFO returns 1 if a PMENU entry has been specified for this program regardless of whether the PMENU facility is currently active for the window.

PMENUGRAY
WINFO returns 0 when it grays or ungrays selections in the window's pull-down menus. Use aux-info to specify which selection to gray or ungray.

PMENUSTATE
WINFO returns 0 when it enables or disables the state of a selection in the window's pull-down menus. Use aux-info to specify the state.

POPUP
WINFO returns 0 when it enables or disables pop-up events in the window. Use the aux-info argument to specify whether events are to be enabled or disabled.

STARTCOL
WINFO returns the current column on which the window starts.

STARTROW
WINFO returns the current row on which the window starts.

UICON
WINFO returns the number of user-defined icons available under the user's host operating system.

XPIXCELL
WINFO returns the width (in pixels) of the font used in the SAS windowing environment.

XPIXEL
WINFO returns the horizontal location (in pixels) of the most recent mouse event.

YPIXCELL
WINFO returns the height (in pixels) of the font used in the SAS windowing environment.

YPIXEL
WINFO returns the vertical location (in pixels) of the most recent mouse event.


Example

Store the current size of the window, and then resize it back to its original size:

sr=winfo('startrow');
sc=winfo('startcol');
nr=winfo('numrows');
nc=winfo('numcols');
call display('top half');
call wdef(sr,sc,nr,nc);

See Also

WDEF

WREGION


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.