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

prefposition Subroutine

Purpose

Constrains the size of a window.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void prefposition
(Int32 x1, Int32 x2,
Int32 y1, Int32 y2)

FORTRAN Syntax

SUBROUTINE PREFPO(x1, x2, y1, y2)
INTEGER*4 x1, x2, y1, y2

Description

The prefposition subroutine sets the location and constrains the size, in pixels, of a window. With the prefposition subroutine, the applications programmer can prevent the user from resizing a window.

To remove constraints from a window, call the winconstraints subroutine immediately after calling the winopen subroutine. Calling the winconstraints subroutine twice in a row also removes the constraints from the window.

Note: This process nullifies all constraints, not just that of size.

If the prefposition subroutine call is followed by a call to the winopen subroutine, the window manager creates and maps the window immediately. A rubberband outline is not shown.

If the prefposition subroutine call is followed by a call to the winconstraints subroutine, the current window is resized. The resizing occurs at the time of the winconstraints call; the prefposition subroutine has no effect on the current window until that time.

The window manager controls both how the prefposition subroutine parameters are interpreted and where a window is finally placed. For more information on the window manager operation, see the discussion on "Window Placement" in GL3.2 Version 4 for AIX: Programming Concepts.

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

Parameters

x1 Specifies the x-coordinate position (in pixels) of one corner of the window.
y1 Specifies the y-coordinate position (in pixels) of the point of one corner of the window.
x2 Specifies the x-coordinate position (in pixels) of the opposite corner of the window.
y2 Specifies the y-coordinate position (in pixels) of the opposite corner of the window.

Example

The example C language program colored.c uses the prefposition subroutine to specify a window's original location size.

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

Specifying pixel values to be added to a window with the fudge subroutine.

Obtaining the position of a window with the getorigin subroutine.

Obtaining the size of a window with the getsize subroutine.

Constraining the size of a window with the prefsize subroutine.

Specifying a window size change in discrete steps with the stepunit subroutine.

Binding window constraints to the current window with the winconstraints subroutine.

Creating a window with the winopen subroutine.

Creating and Managing Windows.


[ Previous | Next | Contents | Glossary | Home | Search ]