Re: XForms: Expose rectangle at FL_DRAW ?

From: Angus Leeming (a.leeming@ic.ac.uk)
Date: Thu Jun 20 2002 - 07:06:50 EDT

  • Next message: Angus Leeming: "Re: XForms: Expose rectangle at FL_DRAW ?"

    # To subscribers of the xforms list from Angus Leeming <a.leeming@ic.ac.uk> :

    On Thursday 20 June 2002 4:43 am, John Levon wrote:
    > # To subscribers of the xforms list from John Levon <moz@compsoc.man.ac.uk>
    > :
    >
    >
    > How do I find out the actual exposed rectangle that needs drawing ?
    > The XEvent * xev is NULL when I get an FL_DRAW (xforms 1.0rc3)
    >
    > thanks
    > john

    This looks like the relevant code path:

    static void
    fl_handle_form(FL_FORM * form, int event, int key, XEvent * xev)
    {
         ...
         switch (event) {
        case FL_DRAW: /* form must be redrawn */
            fl_redraw_form(form);
            break;
         ...

    void fl_redraw_form(FL_FORM * form)
    {
        FL_OBJECT *ob;
        for (ob = form->first; ob; ob = ob->next)
            ob->redraw = 1;

        redraw_marked(form);
    }

    static void
    redraw_marked(FL_FORM * form)
    {
         ...
         ob = form->first;
         ...
        for (; ob; ob = ob->next)
        {
            if (ob->visible && ob->redraw-- > 0 &&
                (!ob->is_child || ob->parent->visible))
            {
                fl_create_object_pixmap(ob);
                    ...
                fl_handle_object(ob, FL_DRAW, 0, 0, 0, 0);
                    ...
                fl_show_object_pixmap(ob);
            }
        }
    }

    So, the question becomes how do you get hold of the XEvent within
    redraw_marked? Add a globally accessible cache of key, xev that is set in
    fl_handle_form before calling fl_redraw_form ?

    Angus

    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Thu Jun 20 2002 - 07:21:59 EDT