Re: XForms: fl_winhide // fl_winshow

From: Nicolas Castagne (Nicolas.Castagne@imag.fr)
Date: Fri May 11 2001 - 04:44:34 EDT

  • Next message: Steve Lamont: "Re: XForms: fl_winhide // fl_winshow"

    # To subscribers of the xforms list from Nicolas Castagne <Nicolas.Castagne@imag.fr> :

    Thx for your answer... Let me precise the pb...

    > > 1) with Forms windows, I use fl_show_form. As a consequence, a
    > > form that was iconified before UI iconifyuing will be maped, whereas I
    > > wouldlike to re-display its iconic aspect.
    > >
    > > 2) in addition, on GL windows, if I use fl_winshow, the program
    > > asks the user to place interactively the form (as it was its first
    > > apparition), whereas I wouldlike it to be displayed at the position it had
    > > before UI iconifying. Of course, fl_initialposition has no effect on
    > > this, because it must be called before creating (and not displying) the
    > > window.
    > >
    > > To solve thiese problems, a kind of 'XUnwithdraw' procedure
    > > procedure would be of a grat help - but it does not exist in Xlib, of
    > > course :)
    >
    > You may want to just use XUnmapWindow() and XMapWindow() rather than
    > fl_hide_form() and fl_show_form().

    I had tried this a couple of days ago... But it does not solve the two
    problems, since :

    1) XMapWindow used on a HIDDEN form will display it entirely, even though
    it was iconified before hiding. On the contrary, I would prefer to display
    the form with the exact aspect (iconified or maped) it had before hiding.

    2) XMapWindow on a hidden GL window will display it entirely, even though
    it was iconified before hiding (same pb).

    3) if the GL window (created with fl_glwincreate) was mapped before
    hiding, XMapWindow will ask the user to place interactively the GL
    windows, in spite displaying it at the position it had. So, I would like
    to be able to precise a kind of "initial position," not before "creating"
    the window but before displaying it a second time...

    > > I am currently upgrading a program using XForms 0.88 - and
    > > especially working on a process to iconify the whole UI in a single
    > > icon.
    >
    > Do you mean you're updating *to* 0.88 or from 0.88 to 0.89? Not that
    > it means much in this context but 0.89 is much closer to being
    > bug-free (though that's in an asymptotic context, of course :-)).
    lol:)

    I upgrade a prg built on XForms 088 - and in the upgrade process, i will
    soon upgrade to 089. But this is not the real pb I have, since I think
    what I wanna do will not be taken into account in 0.89...

    Wish you will understand me better :)

    Thx, Nicolas

    > Here's a rough little example:
    >
    > #include "forms.h"
    > #include "try.h"
    >
    > void hide_cb( FL_OBJECT *ob, long data )
    > {
    >
    > FD_hidden *fd_hidden = ( ( FD_try * ) ob->form->fdui )->vdata;
    >
    > if ( fl_get_button( ob ) )
    > XUnmapWindow( fl_get_display(), fd_hidden->hidden->window );
    > else
    > XMapWindow( fl_get_display(), fd_hidden->hidden->window );
    >
    > }
    >
    > int main( int argc, char *argv[] )
    > {
    >
    > FD_try *fd_try;
    > FD_hidden *fd_hidden;
    >
    > fl_initialize( &argc, argv, 0, 0, 0 );
    > fd_try = create_form_try();
    > fd_hidden = create_form_hidden();
    >
    > fl_show_form( fd_try->try,
    > FL_PLACE_CENTERFREE,
    > FL_FULLBORDER,
    > "try" );
    > fd_try->vdata = fd_hidden;
    >
    > fl_show_form( fd_hidden->hidden,
    > FL_PLACE_CENTERFREE,
    > FL_TRANSIENT,
    > "Foo!" );
    >
    > while ( 1 )
    > fl_do_forms();
    >
    > }
    >
    > spl
    > _________________________________________________
    > 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/
    >
    >

    _________________________________________________
    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 : Fri May 11 2001 - 04:56:27 EDT