/************************************************************************ ** ** FILE : stewininst.c ** ** ZWECK : ** ** AUTOR : Michael C. Ancutici ** Universitaet Stuttgart, Fakultaet Informatik ** ** DATUM : 14.03.93 ** *************************************************************************/ #include "stewin.H" #include "hawin.h" /* #include "istemov" #include "istemovn" */ #include "istedel" void SteWinPressOK( w, event, params, num_params) Widget w; XEvent *event; String *params; Cardinal *num_params; { SteWinSayOK(w, (XtPointer)0, (XtPointer)0); } void SteWinPressCan( w, event, params, num_params) Widget w; XEvent *event; String *params; Cardinal *num_params; { SteWinSayCancel(w, (XtPointer)0, (XtPointer)0); } void SteWinInst( Parent) Widget Parent; { Dimension w1,h1; Position x,y; static XtActionsRec window_actions[] = { {"SteWinPressOK", SteWinPressOK}, {"SteWinPressCan", SteWinPressCan}}; /* static Pixmap ISteMovPixMap; static Pixmap ISteMovnPixMap; */ static Pixmap ISteDelPixMap; static char *SteLabel[] = { "Name : ", "Token : ", "Breakcondition :", "OK", "Cancel"}; SteShell = XtVaCreatePopupShell( "SteShell", transientShellWidgetClass, Parent, NULL); StePane = XtVaCreateManagedWidget( "StePane", /* widget name */ panedWidgetClass, /* widget class */ SteShell, /* parent widget */ NULL); /* terminate argument list */ SteAForm = XtVaCreateManagedWidget( "SteAForm", /* widget name */ formWidgetClass, /* widget class */ StePane, /* parent widget */ NULL); /* terminate argument list */ SteNrLabel = XtVaCreateManagedWidget( "SteNrLabel", /* widget name */ labelWidgetClass, /* widget class */ SteAForm, /* parent widget */ XtNlabel, "Place nnn", NULL); /* terminate argument list */ SteNameLabel = XtVaCreateManagedWidget( "SteNameLabel", /* widget name */ labelWidgetClass, /* widget class */ SteAForm, /* parent widget */ XtNlabel, SteLabel[0], NULL); /* terminate argument list */ SteNameText = XtVaCreateManagedWidget( "SteNameText", /* widget name */ asciiTextWidgetClass, /* widget class */ SteAForm, /* parent widget */ XtNstring, "1234567890", XtNeditType,XawtextEdit, /* argument list */ NULL); /* terminate argument list */ SteMarkeLabel = XtVaCreateManagedWidget( "SteMarkeLabel", /* widget name */ labelWidgetClass, /* widget class */ SteAForm, /* parent widget */ XtNlabel, SteLabel[1], NULL); /* terminate argument list */ SteMarkeText = XtVaCreateManagedWidget( "SteMarkeText", /* widget name */ asciiTextWidgetClass, /* widget class */ SteAForm, /* parent widget */ XtNstring, "123", XtNeditType,XawtextEdit, /* argument list */ NULL); /* terminate argument list */ SteBreakLabel = XtVaCreateManagedWidget( "SteBreakLabel", /* widget name */ labelWidgetClass, /* widget class */ SteAForm, /* parent widget */ XtNlabel, SteLabel[2], NULL); /* terminate argument list */ SteBreakText = XtVaCreateManagedWidget( "SteBreakText", /* widget name */ asciiTextWidgetClass, /* widget class */ SteAForm, /* parent widget */ XtNstring, "> 100", XtNeditType,XawtextEdit, /* argument list */ NULL); /* terminate argument list */ SteBPane = XtVaCreateManagedWidget( "SteBPane", panedWidgetClass, StePane, XtNorientation, XtEvertical, NULL); SteOKCom = XtVaCreateManagedWidget( "SteOKCom", /* widget name */ commandWidgetClass, /* widget class */ SteBPane, /* parent widget */ XtNlabel, SteLabel[3], NULL); /* terminate argument list */ SteCanCom = XtVaCreateManagedWidget( "SteCanCom", /* widget name */ commandWidgetClass, /* widget class */ SteBPane, /* parent widget */ XtNlabel, SteLabel[4], NULL); /* terminate argument list */ ISteDelPixMap = XCreateBitmapFromData( XtDisplay( SteShell), RootWindowOfScreen( XtScreen( SteShell)), istedel_bits, istedel_width, istedel_height ); SteDLabel = XtVaCreateManagedWidget( "SteDLabel", labelWidgetClass, SteBPane, XtNlabel, "", NULL); SteDelCom = XtVaCreateManagedWidget( "SteDelCom", /* widget name */ commandWidgetClass, /* widget class */ SteBPane, /* parent widget */ XtNbitmap, ISteDelPixMap, XtNmax, 40, NULL); /* terminate argument list */ XtTranslateCoords( HaGraphPlane, /* berechne absolute Koordinaten*/ (Position) 20, (Position) 20, &x, &y); XtVaSetValues( SteShell, /* Positioniere AskShell */ XtNx, x, XtNy, y, NULL); XtAppAddActions( AppContext, window_actions, XtNumber(window_actions)); XtAddCallback( SteOKCom, XtNcallback, SteWinSayOK, 0); XtAddCallback( SteCanCom, XtNcallback, SteWinSayCancel, 0); XtAddCallback( SteDelCom, XtNcallback, SteWinSayDel, 0); }