Hello guys

If got some objectes which are direved of fltk::Item. I tried everything to 
redraw it from out of it`s handle-methode:

int                                     C_IxR_Item::handle                      
(int _event)
{
        int ret_ = fltk::Item::handle(_event);
        if (_event == fltk::ENTER)
                ret_ = 1;
        if (_event == fltk::PUSH)
        {
                std::cout << "tomäääääääää" << std::endl;
                this->set_flag(fltk::HIGHLIGHT);
                this->redraw();
                this->set_damage(fltk::DAMAGE_ALL);
                this->send(fltk::ENTER);
                this->send(fltk::RELEASE);
                this->send(fltk::HIDE);
                this->send(fltk::SHOW);
                this->hide();
                this->show();
                this->redraw();
                fltk::check();
                fltk::wait();
                fltk::flush();
        }
        return (ret_);
}

And I can`t call draw() directly because than my Item is drawn on the wrong 
position ...

If I move my mouse and leave the Item the draw-methode is called ...

The Item is part of menu that is popped up at the moment ...

But the draw-methode is never called, because the output doesn`t occur ...

void            C_IxR_Item::draw        (void)
{

        std::cout << "der Papagei is tot" << std::endl;
        // draw stuff here
}

As well I tested this:

int                                     C_IxR_Item::handle                      
(int _event)
{
        int ret_ = fltk::Item::handle(_event);
        if (_event == fltk::ENTER)
                ret_ = 1;
        if (_event == fltk::PUSH)
        {
                this->send(fltk::PUSH);
        }
        return (ret_);
}

and I ran into an infinite loop, so the event-handling isn`t the problem I 
think.

I extremly hope that one of you can help me, I go insane ...

THX

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

Reply via email to