Re: XForms: C++ design wanted

Bill Burris (
Mon, 16 Jun 1997 09:27:03 -0600 (MDT)

To subscribers of the xforms list from Bill Burris <> :


It has been a while since I have used XForms, but here
is how I solved the callback problem using 0.75

void object_event_handler( FL_OBJECT* ob, long event )
((Object*)ob->u_vdata)->eventHandler( event );

// each constructor needs to initialize u_vdata

CheckButton::CheckButton( int type, int x, int y, int w, int h,
char* label, long event )
obj = fl_add_checkbutton( type, x, y, w, h, label );
obj->u_vdata = (void*)this;
fl_set_object_callback( obj, object_event_handler, event );

For more details see my web page.

Bill Burris


_________________________________________________ To unsubscribe, send the message "unsubscribe" to or see Xforms Home Page: List Archive: