WideStudio Programming Guide

| WideStudio Programming Guide | WideStudio Index Table of contents

> ## The controlling of the position of the instances by the offset

> ### The offset of X,Y coordinate

> It is possible to control the position of the instances of WSCvXXX class which has no window resource by the method: setXOffsetPtr and setYOffsetPtr. For example, the following event procedure with initializing trigger shows setting the offset.

>     extern short xoffset; //A
>     extern short yoffset; //A
>     void initep(WSCbase* object){
>       object->setXOffsetPt(&xoffset); //B
>       object->setYOffsetPt(&yoffset); //B
>     }

> At first,define a global short variable somewhere and do extern to access it at (A). set it as offset to the instance at B. Then the instance will be indicated at the position of the coordinate which is added the offset variable. It is possible to set same variable to many instances and to control their position by it at once.

> ### The scaling offset of the size of the instance

> It is possible to control the size of the instances of WSCvXXX class by the method: setScaleOffsetPtr. For example, the following event procedure with initializing trigger shows setting the scaling offset.

>     extern double scaleoffset; //A
>     void initep(WSCbase* object){
>       object->setScaleOffsetPt(&scaleoffset); //B
>     }

> At first,define a global double variable somewhere and do extern to access it at (A). set it as scaling offset to the instance at B. Then the instance will be indicated at the size which is multiplied by the scaling offset variable. It is possible to set same variable to many instances and to control their size by it at once.

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