Page History: Built-in data types
Compare Page Revisions
Page Revision: 2012/02/01 00:02
|
Custom data types
|
Info |
Category: |
Programming |
Role: |
|
EventIDE provides several built-in data types that are used for element properties. The built-in types are also available for coding in the snippets and developing the custom AddIns. The built-in types are not classes but plain
.NET values types - it means they don't need a class constructor and disposing. Below, all built-in EventIDE types are listed with descriptions and code examples.
stColor
stColor is a data type for managing colors in EventIDE. stColor is a
struct which value stores a single 32-bits ARGB value (A- denotes
the alpha channel). stColor has the following fields:
{|
|-
! Field Name
! Description
! Value Type
|-
| A
| Defines a value for the Alpha channel (transparency)
| Byte
| List
|-
| R
| Defines a value for the Red channel
| Byte
| List
|-
| G
| Defines a value for the Green channel
| Byte
| List
|-
| B
| Defines a value for the Blue channel
| Byte
| List
|-
// Declaration and initialization
// declare a new stColor and initialize its value to the green
stColor MyColor;
MyColor.A=255;
MyColor.R=0;
MyColor.G=255;
MyColor.B=0;
// declare the green color with an optional stColor constructor
stColor MyColor=new stColor(0,255,0);
// The following example lead to errors because the field values have to be integers in the range 0.255
stColor MyColor=new stColor(0,256,0);
stColor MyColor=-20;
stPosition
// Check the trial outcome. Result and RT just other user variables
// insert code snippet here..
stAlignment
// Check the trial outcome. Result and RT just other user variables
// insert code snippet here..
Final Notes
Insert Notes here..