WideStudio Programming Guide

| WideStudio Programming Guide | WideStudio Index Table of contents

> ## 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 an 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.70 for WideStudio ver 3.70, Feb 2004

WideStudio documents index | Table of contents

Copyright(C) T. Hirabayashi, 2000-2004 | Last modified: Feb 25, 2004