Annotation of rpl/modules/motif/XtPopup.rplc, revision 1.1

1.1     ! bertrand    1: #include "src/rplexternals.h"
        !             2: #include "motif.h"
        !             3: 
        !             4: declareExternalFunction(XtPopup)
        !             5:    declareObject(grab);
        !             6:    declareObject(widget);
        !             7: 
        !             8:    string              gv;
        !             9: 
        !            10:    XtGrabKind          xt_gv;
        !            11: 
        !            12:    HEADER
        !            13:        declareHelpString("Popup a widget\n"
        !            14:                "    2: widget\n"
        !            15:                "    1: flag (XtGrabNonexclusive/XtGrabExclusive)\n");
        !            16:        numberOfArguments(2);
        !            17:    FUNCTION
        !            18:        if (initializationDone eq true) then
        !            19:            pullFromStack(grab, string);
        !            20:            returnOnError(freeObject(grab));
        !            21: 
        !            22:            pullFromStack(widget, external);
        !            23:            returnOnError(freeObject(grab); freeObject(widget));
        !            24: 
        !            25:            getString(grab, gv);
        !            26: 
        !            27:            if (strcmp(gv, "XtGrabNonexclusive") eq 0) then
        !            28:                xt_gv = XtGrabNonexclusive;
        !            29:            elseIf (strcmp(gv, "XtGrabExclusive") eq 0) then
        !            30:                xt_gv = XtGrabExclusive;
        !            31:            orElse
        !            32:                executionError("Unknown grab value");
        !            33:                returnOnError(freeObject(grab); freeObject(widget));
        !            34:            endIf
        !            35: 
        !            36:            ifIsExternal(widget, WIDGET) then
        !            37:            orElse
        !            38:                executionError("Type mismath error");
        !            39:                returnOnError(freeObject(grab); freeObject(widget));
        !            40:            endIf
        !            41: 
        !            42:            XtPopup(target((Widget *) objectContainer(widget)), xt_gv);
        !            43: 
        !            44:            freeObject(widget);
        !            45:            freeObject(grab);
        !            46:        orElse
        !            47:            executionError("Application not initialized");
        !            48:            returnOnError();
        !            49:        endIf
        !            50:    END
        !            51: endExternalFunction
        !            52: 
        !            53: // vim: ts=4

CVSweb interface <joel.bertrand@systella.fr>