Re: Threads ?:(



Hi,
   this  really looks dirty ;) but functional (didn't tryied for now).But
I found workingg example with timeouts(of cource in documentation ;),
and i will try to implement like there. And if it won't be working then
i'll ask ;). But really thanks for help
> I don't know how you implemented it, but if I were to try to get it to
> work
> quick and dirty:
>
> Create an integer in the private area of the class, set it to 0 in the
> constructor.  Use a switch in the on_expose_event(GdkEventExpose* /* event
> */) function to determine which image to load.  Incriment the integer.  Do
> a
> sleep(1) for a 1 second sleep and then run queue_draw() to force a run of
> on_expose_event() again.  I don't know what the outcome would be of an
> expose event occuring during the sleep().  You could use a boolean value
> to
> control whether or not the integer incriments as a safety against the
> integer incrimenting when you don't want it to.
>
> Ex:
>
> int count=0;
> bool up=true;
>
> on_expose_event()
> {
>      switch(count)
>      {
>           case 1:
>           {
>                 . . .
>           }
>           .
>           .
>           .
>           default:
>      }
>
>      if(up)
>      {
>           up=false;
>           sleep(1);
>           up=true;
>           queue_draw();
>      }
> }
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
> ____________ Informacia od NOD32 ____________
> Skontrolovane antivirusovym systemom na Mail Serveroch
> spolocnosti IMAFEX s.r.o. Liptovsky Mikulas.
>
> http://www.imafex.sk
>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]