Hello

I really do not see what you are trying to do here. But you do not 
return 1 in the case of a PUSH event, so you will only receive this once.

To redraw you only need to call redraw().

Regards
Thor Henning Amdahl

Hans George wrote:
> 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 1;
>       }
>       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