DESIGN (kwidgets) functions


LIBRARY ROUTINE

xvw_create_viewport - create a viewport object

LIBRARY CALL

xvobject xvw_create_viewport(
   xvobject parent,
   char     *name)

INPUT

OUTPUT

none

RETURN VALUE

The viewport object on success, NULL on failure

DESCRIPTION

Creates a viewport widget. The viewport provides a way of restricting a potentially overlarge display to a predefined area, while at the same time allowing its contents (consisting of other GUI objects) to occupy as much space as necessary.

The viewport object is made up of four other GUI objects: a "plane" object, a clip object, a vertical scrollbar, and a horizontal scrollbar.

The plane object component of the viewport object implements a "virtual area", only part of which can be seen in the viewport. The plane object is the actual parent of the viewport's children; in this way, the the object(s) created inside the viewport can take up more space than the viewport itself.

The clip object component of the viewport is what dictates the size of the viewport itself. By clipping out all portions of the plane object that lie outside the bounds of the viewport size, the contents of the viewport are only visible when they are in the predefined range.

The viewport contains horizontal and vertical scrollbars; these scrollbars are used to control which portion of the plane object is visible in the viewport.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DESIGN/objects/library/kwidgets/src/Viewport.c

SEE ALSO

kwidgets(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.