> //hhhhhhhhhhhhhhhhhhhhhhhhhH
> int Sbut::handle ( int event )
> {
>     if ( event == FL_PUSH )
>     {
>       cout << "Sbut handle 1: PUSH " << endl;
>       do_callback();
>       return 1;
>     }
>     return 0;
> }

        Also, unrelated, the above bit of code should be repaired.

        As it is, the button's own handle() method is being completely eclipsed.
        Fl_Button::handle(event); should really be called in there somewhere
        to allow the button's mechanics to operate.

        If the purpose of this handle() is just to print a message on PUSH, 
then:

int Sbut::handle ( int event )
{
    if ( event == FL_PUSH )
        cout << "Sbut handle 1: PUSH " << endl;
    return(Fl_Button::handle(event);
}

        ..and the button's own code will handle the do_callback() on PUSH.
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to