[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

swinopen Subroutine

Purpose

Creates a restricted subwindow.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

Int32 swinopen(Int32 *parentid)

FORTRAN Syntax

INTEGER*4 FUNCTION SWINOP(parentid)
INTEGER*4 parentid

Description

The swinopen subroutine creates a subwindow inside a parent window. The subwindow is mapped (created and displayed) immediately upon receipt of this call. The subwindow then becomes the current window.

Subwindows have no border and therefore cannot be moved by the applications user. Other than this, subwindows behave very much like windows created with the winopen subroutine.

When a subwindow is created, a completely independent graphics context is also created for it. That is, subwindows have their own current color linestyle, pattern, matrix stack, viewport stack, attribute stack, name stack, and so on. These attributes are not shared with the parent. The attributes are initialized to their default values (for example, empty stack). See the greset subroutine for the list of default values.

The position of a subwindow is measured relative to the origin of the parent window. Subwindows move with the parent window. If a parent window is moved, all of its subwindows move with it.

Subwindows are clipped to the boundaries of the parent window. That is, by drawing inside a subwindow, one can never draw outside of the boundaries of the parent window. Otherwise, subwindows can be positioned arbitrarily inside a parent window, even if such positioning means that the subwindow is completely clipped. If a subwindow is exposed or otherwise needs redrawing, both the parent and the subwindow receive redraw events.

Because subwindows cannot be moved or resized by the user, none of the window constraint subroutines have any meaning and therefore do not affect the state of a subwindow. Window constraint subroutines include the minsize, maxsize, and stepunit subroutines. Because subwindows have no border, they cannot be given a title. Subwindows also cannot be iconified.

Subwindows can be pushed and popped. Subwindows can be positioned or moved with either the prefposition or prefsize subroutine followed by a call to the winconstraints subroutine, or by using the winposition or winmove subroutine.

Subwindows can have sub-subwindows. The origin of a sub-subwindow is measured relative to the origin of the subwindow (its parent).

Note: This subroutine cannot be used to add to a display list.

Parameter

parentid Specifies the identifier, or handle, of the parent window.

Return Value

The identifier, or handle, for the subwindow.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Creating a new window with the winopen subroutine.

Creating and Managing Windows.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]