Wide Studio Programmer's Guide

Wide Studio Home
Up to


How to add the event procedure on the programs

You can add the event procedure with the method: WSCbase::addProcedure().
The method Description
addProcedure(WSCprocedure*) Add the new event procedure.

Add the event procedure as follows. (A), Create the procedure instance with the specified procedure name and a trigger.
(B), Set a address of the procedure and its name with the method: setFunction(). (C) Finally, add the procedure instance to the instance.
void _new_event_procedure(WSCbase*){
//a sample of the event procedure.
//..
}

void event_procedure(WSCbase* object){ 
  //Create the procedure instance which name is "new proc".
  //The trigger is  WSEV_MOUSE_IN (MOUSE_IN trigger.)
(A)  WSCprocedure* ep = new WSCprocedure("new proc",WSEV_MOUSE_IN);
(B)  ep->setFunction(_new_event_procedure,"_new_event_procedure");
(C)  object->addProcedure(ep);

}


Document Release 3.0

For Use with Wide Studio Release 3.0, Summer 2002


Wide Stuido Home | Up to

Copyright(C) T. Hirabayashi, 2000-2002 Last modified: June 20, 2002