Re: XForms: fl_winhide // fl_winshow

From: Steve Lamont (
Date: Tue May 08 2001 - 12:17:40 EDT

  • Next message: Michal Szymanski: "XForms: different visuals in windows of the same app?"

    # To subscribers of the xforms list from Steve Lamont <> :

    > 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 :-)).

    > 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().

    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 );
              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,
                        "try" );
          fd_try->vdata = fd_hidden;
          fl_show_form( fd_hidden->hidden,
                        "Foo!" );
          while ( 1 )
    To unsubscribe, send the message "unsubscribe" to or see
    XForms Home Page:
    List Archive:

    This archive was generated by hypermail 2b29 : Tue May 08 2001 - 12:24:25 EDT