Wide Studio Object Reference

Wide Studio Home
Up to

## Class Name

WSCprocedure

## Specification of methods

### WSCprocedure method

Form
  WSCprocedure(char* epname,long trigger)
Function
  Creates an instance of WSCprocedure class.
Description
Parameters

  (in)char* epname | the event procedure name
  (in)long trigger | the trigger

There are the following triggers.

WSEV_NONE | None
WSEV_INITIALIZE | Initilized trigger
WSEV_DELETE | Deleting trigger
WSEV_ACTIVATE | Activating trigger
WSEV_VALUE_CH | Value changed trigger
WSEV_FOCUS_CH | Focus changed trigger
WSEV_VISIBLE_CH | Visibility changed trigger
WSEV_PARENT_VISIBLE_CH | Visibility of the parent changed trigger
WSEV_SENSITIVE_CH | Sensitivity changed trigger
WSEV_PARENT_SENSITIVE_CH | Sensitibility of the parent changed trigger
WSEV_EXPOSE | Exposed trigger
WSEV_RESIZE | Resized trigger
WSEV_MOUSE_IN | Mouse entered trigger
WSEV_MOUSE_OUT | Mouse left trigger
WSEV_MOUSE_PRESS | Mouse pressed trigger
WSEV_MOUSE_RELEASE | Mouse released trigger
WSEV_MOUSE_MOVE | Mouse moving trigger
WSEV_KEY_PRESS | Key pressed trigger
WSEV_KEY_RELEASE | Key released trigger
WSEV_KEY_HOOK | Key hooking trigger

Return value
  None.
Notice
Samples

              newvbtn_004 = new  WSCvfbtn(newmenu_003,"newvfbt_004");
              newvbtn_004->initialize();
              newvbtn_004->setProperty(WSNname,"newvfbt_004");
              newvbtn_004->setProperty(WSNvis,True);
              newvbtn_004->setProperty(WSNx,10);
              newvbtn_004->setProperty(WSNy,10);
              //create a procedure.
              WSCprocedure* op = new WSCprocedure("activate proc",WSEV_ACTIVATE);
              extern void proc1(WSCbase*);
              op->setFunction(proc1,"proc1");
              newvbtn_004->addProcedure(op);

  ### setFunction method

  Form
    long setFunction(void(*func)(WSCbase*),char* fname)
  Function
    Specifies the event procedure.
    The type of the event procedure is as follows.
    void foo(WSCbase*)
  Description
  Parameters

    (in)void(*func)(WSCbase*) | The address of the function
    (in)char* fname | the function name (for debugging.)

  Return value
    Returns WS_NO_ERR if it succeeds; returns other if it fails.
  Notice
  Samples
    Refer to WSCprocedure().

  ### setProcName method

  Form
    long setProcName(char* pname)
  Function
    Specify the procedure name
  Description
  Parameters

    (in)char* pname | procedure name

  Return value
    Returns WS_NO_ERR if it succeeds; returns other if it fails.
  Notice
  Samples

                //set procedure name.
                op->setProcName("activate proc2");

  ### setTrigger method

  Form
    long setTrigger(long trigger)
  Function
    Specify the trigger.
  Description
  Parameters

    (in)long trigger | the trigger ID

  Return value
    Returns WS_NO_ERR if it succeeds; returns other if it fails.
  Notice
  Samples

                //set the trigger.
                op->setTrigger(WSEV_VALUE_CH);

  ### setInternal method

  Form
    void setInternal(WSCbool fl)
  Function
    Specify the flag of whether internal instance.
  Description
    Set True to make the instance
  Parameters

    (in)WSCbool fl | internal flag, True=internal / False=normal

  Return value
    Returns WS_NO_ERR if it succeeds; returns other if it fails.
  Notice
  Samples

                //set the internal flag True.
                op->setInternal(True);

  ### getProcName method

  Form
    char* getProcName()
  Function
    Returns the event procedure name.
  Description
  Parameters
    None.
  Return value
    the event procedure name.
  Notice
  Samples

                //get the event procedure name.
                char* pname = op->getProcName();

  ### getFunctionName method

  Form
    char* getFunctionName()
  Function
    Returns the function name.
  Description
  Parameters
    None.
  Return value
    the function name.
  Notice
  Samples

                //get the function name.
                char* pname = op->getFunctionName();

  ### getTrigger method

  Form
    long getTrigger()
  Function
    Returns the trigger ID.
  Description
  Parameters
    None.
  Return value
    the trigger ID.
  Notice
  Samples

                //get the trigger ID.
                long trigger = op->getTrigger();

  ### getInternal method

  Form
    WSCbool getInternal()
  Function
    Returns the status of the internal instance flag.
  Description
  Parameters
    None.
  Return value
    True=internal/False=normal.
  Notice
  Samples

                //get the internal instance flag.
                WSCbool fl = op->getInternal();

  Document Release 3.70
  For use with Wide Studio Release 3.70, Spring 2004

  Wide Studio Home | Up to

  Copyright(C) WideStudio Development Team, 1999-2004 |  | Last modified: May 25, 2004