Re: XForms: Re: Splash Screen

amit (amit@eduplus.ca)
Mon, 25 May 1998 17:46:50 +0000

# To subscribers of the xforms list from amit <amit@eduplus.ca> :

Steve Lamont wrote:

> # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
>
> > Would you suggest a canvas or a form with a pixmap on it? How would i define
> > a time-out, so it would be displaed for around 4-5 seconds and then hide
> > itself..
>
> I'd suggest using a Pixmap object but it really doesn't make a lot of
> difference.
>
> You can use the timeout callback -- see fl_add_timeout() for details.
>
> spl

okay I have made a form consisting simply of a pixmap button. The pixmap is the
logo, and my intention was that if you click on the button, it would call upon its
callback which would kill itself and load the menu.

My problem is that if I try to create and display the form, the menu still
appears. Rather than waiting for the form to dissapear,,

I don't want it to create the menu form and call fl_do_forms() untill the splash
screen is hidden. So what I have tried is to make the spash screen callback return
an integer, and if true only then would it create the menu form and call
fl_do_forms.

here is my main() function....I hope this explains things a little better than me.

int
main (int argc, char *argv[])
{
display = fl_initialize (&argc, argv, "Menu", 0, 0);
fdui_splash = create_form_splash();
fl_show_form (fdui_splash->splash,FL_PLACE_FREE_CENTER,FL_NOBORDER,"Splash");
if (hide_splash)
{
fdui = create_form_menu ();
fl_set_form_position (fdui->menu, 100, 100);
fl_show_form (fdui->menu,FL_PLACE_POSITION,FL_FULLBORDER,"Menu");
fl_do_forms ();
}
return 0;

(hide_splash is the callback of the pixmap button (splash screen) which simply
hides and frees the form.)

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/