>     Fl_Single_Window* o = new Fl_Single_Window(320, 240);
> ..
>     { Fl_Box* o = new Fl_Box(0, 0, 320, 240);
>       o->image( pBackgroundImg );
>     }
>     { Fl_Button* o = new Fl_Button(0, 190, 78, 49);
>       o->box(FL_NO_BOX);
>       o->clear_visible_focus();
>       o->callback( (Fl_Callback *)gs_backbutton_callback );
>     }

    I see what you're doing -- I missed the part about using
    the image area as the button. Disregard the recommendation for FL_FLAT_BOX.

    I'm not sure if it's a good idea to make an invisible button
    that overlaps the image, unless you make both the button's
    up AND down box be invisible.

    I think the clean approach would be to forget using a button,
    and make the image area a class derived from Fl_Box with its
    own event handle()er that detects mouse clicks on the image
    (FL_PUSH and FL_RELEASE) and invoke the callback.

    Should be easy to do.
    I can post some code that would show how to do this if needed.


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

Reply via email to