Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtConfigure(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtMakeGeometryRequest(1)

XtMakeResizeRequest(1)

XtMoveWidget(1)

XtResizeWidget(1)

XtTranslateCoords(1)

 

Name

XtConfigureWidget — move and/or resize widget. 

Synopsis

void XtConfigureWidget(w, x, y, width, height, border_width)

    Widget w;
    Position x;
    Position y;
    Dimension width;
    Dimension height;
    Dimension border_width;

Arguments

wSpecifies the widget. 

x, ySpecify the widget’s new x and y coordinates. 

width, height, border_width
Specify the widget’s new dimensions.

Description

XtConfigureWidget moves and/or resizes a widget according to the specified width, height, and position values.  It returns immediately if the specified geometry fields are the same as the old values.  Otherwise, XtConfigureWidget writes the new x, y, width, height, and border_width values into the widget and, if the widget is realized, makes an Xlib XConfigureWindow call on the widget’s window. 

If either the new width or the new height is different from its old value, XtConfigureWidget calls the widget’s resize procedure to notify it of the size change. 

A parent widget can use XtConfigureWidget to set the geometry of its children.  It may also be used to reconfigure a sibling widget.  A child widget can use XtMakeGeometryRequest and XtMakeResizeRequest to request more space from a parent. 

If only the size of a widget is to be changed, XtResizeWidget is simpler to use;  similarly, if only the location of a widget is to be changed, use XtMoveWidget. 

The x and y coordinates are specified with respect to the origin in the upper-left corner of the screen.  Widget coordinates can be converted to screen coordinates with XtTranslateCoords. 

Note that once a widget is resized or otherwise reconfigured by its parent, it may need to do additional processing in its own resize method.  Widgets usually need to know when they have changed size so that they can lay out their displayed data again to match the new size.  When a parent resizes a child, it calls XtResizeWidget, which updates the geometry fields in the widget, configures the window if the widget is realized, and calls the child’s resize method to notify the child.  The resize procedure pointer is of type XtWidgetProc. 

If a class need not recalculate anything when a widget is resized, it can specify NULL for the resize field in its class record.  This is an unusual case and should occur only for widgets with very trivial display semantics.  The resize method takes a widget as its only argument. 

See Also

XtMakeGeometryRequest(1), XtMakeResizeRequest(1), XtMoveWidget(1), XtResizeWidget(1), XtTranslateCoords(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026