When making a geometry request, the child specifies an
XtWidgetGeometry structure.
To make a general geometry manager request from a widget, use XtMakeGeometryRequest.
typedef unsigned long XtGeometryMask;
typedef struct {
XtGeometryMask request_mode;
Position x, y;
Dimension width, height;
Dimension border_width;
Widget sibling;
int stack_mode;
} XtWidgetGeometry;
Depending on the condition, XtMakeGeometryRequest performs the following:
XtGeometryResult XtMakeGeometryRequest(w, request, reply_return)
Widget w;
XtWidgetGeometry *request;
XtWidgetGeometry *reply_return;
w Specifies the widget making the request. Must be of class RectObj or any subclass thereof.
request Specifies the desired widget geometry (size, position, border width, and stacking order).
reply_return Returns the allowed widget size, or may be NULL
if the requesting widget is not interested in handling XtGeometryAlmost.
If the widget is unmanaged or the widget's parent is not
realized, it makes the changes and returns XtGeometryYes.
If the parent's class is not a subclass of
compositeWidgetClass or the parent's geometry_manager field
is NULL, it issues an error.
If the widget's being_destroyed field is True, it returns
XtGeometryNo.
If the widget x, y, width, height and, border_width
fields are all equal to the requested values, it returns
XtGeometryYes; otherwise, it calls the parent's
geometry_manager procedure with the given parameters.
If the parent's geometry manager returns XtGeometryYes
and if XtCWQueryOnly is not set in request->request_mode and
if the widget is realized, XtMakeGeometryRequest calls the
XConfigureWindow Xlib function to reconfigure the widget's
window (set its size, location, and stacking order as
appropriate).
If the geometry manager returns XtGeometryDone, the
change has been approved and actually has been done. In
this case, XtMakeGeometryRequest does no configuring and
returns XtGeometryYes. XtMakeGeometryRequest never returns
XtGeometryDone.
Otherwise, XtMakeGeometryRequest just returns the resulting value from the parent's geometry manager.
Children of primitive widgets are always unmanaged; therefore, XtMakeGeometryRequest always returns XtGeometryYes when called by a child of a primitive widget.
The return codes from geometry managers are
typedef enum _XtGeometryResult {The request_mode definitions are from < X11/X.h >.
XtGeometryYes,
XtGeometryNo,
XtGeometryAlmost,
XtGeometryDone
} XtGeometryResult;
|
The Intrinsics also support the following value.
|
XtCWQueryOnly indicates that the corresponding geometry request is only a query as to what would happen if this geometry request were made and that no widgets should actually be changed.
XtMakeGeometryRequest, like the XConfigureWindow Xlib function, uses request_mode to determine which fields in the XtWidgetGeometry structure the caller wants to specify.
The stack_mode definitions are from < X11/X.h >:
|
The Intrinsics also support the following value.
|
For definition and behavior of Above, Below, TopIf, BottomIf, and Opposite. XtSMDontChange indicates that the widget wants its current stacking order preserved.