#include #include #include #include #include #include #include #include static char *FallBack[] = { "*.borderWidth: 1", NULL }; int main(int argc, char **argv) { XtAppContext app; Widget Shell; Widget Form; Widget BottomLabel; XtSetLanguageProc(NULL, NULL, NULL); Shell = XtVaAppInitialize(&app, "Shell", NULL, 0, &argc, argv, FallBack, NULL); Form = XmCreateForm(Shell,"Form",NULL,0); XtVaSetValues(Form, XmNmarginHeight, 10, NULL); BottomLabel = XmCreateLabel(Form,"BottomLabel",NULL,0); XtVaSetValues(BottomLabel, XmNwidth, 70, XmNheight, 17, XmNrecomputeSize, False, XmNtopAttachment, XmATTACH_NONE, XmNtopPosition, 80, XmNbottomAttachment, XmATTACH_POSITION, XmNbottomPosition, 80, NULL); XtManageChild(BottomLabel); XtManageChild(Form); XtRealizeWidget(Shell); /* Note: the following values are the result of * querying the current geometry. */ /* toplevel should be replaced with to correct applicationShell */ { static XtWidgetGeometry Expected[] = { CWWidth | CWHeight , 50, 50, 72, 24, 0,0,0, /* Form */ CWWidth | CWHeight | CWX | CWY, 0, 0, 70, 17, 0,0,0, /* BottomLabel */ }; PrintDetails(Shell,Expected); }; LessTifTestMainLoop(Shell); exit(0); }