> >
> > On 19.02.2009, at 22:18, Justinas wrote:
> >
> > > How to make window blink in taskbar and title? (for event
> > > notification)
> >
> > FLTK has no interface to blink the title bar (it is not a cross
> > platform thing, so there is no interface for it).
> >
> > As an alternatie, you could blink the window contents itself:
> >
> > win->color(FL_BLACK);
> > win->redraw();
> > fl_wait(0.2);
> > win->color(FL_WHITE);
> > win->redraw();
> > fl_wait(0.2);
> >
> > ----
> > http://robowerk.com/
> >
> >
>
> Thanks for you quick answer

I would rather use fl callback timer instead of lock the whole thread.

something like this:
class Foo: ... public (some Flk class)
{
    public:
       Foo(...):Fl_....()
       { c= 0;}
       void StartBlink()
       {
        StaticTick(this);
       }
       void Tick()
       {
           c = 0;
           Fl_Color currentColor = ( (c++ % 2) == 0 )?FL_RED:FL_WHITE;
           color(currentColor);
           redraw();
       }
       static void StaticTick(void* object)
       {
            Foo* instance = (Foo*) object;
            instance->Tick();
            Fl::repeat_timeout(1, StaticTick, (void*)instance);
       }
private:
    int c;
}

This is just an idea, I didn't compiled the code. I think that doing this way, 
you won't lock another graphic tasks.

J.Marcelo Auler
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to