Welcome Guest, you are in: Login

EventIDE Wiki

RSSRSS

Navigation




Search the wiki


PoweredBy

Page History: Built-in data types

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2012/02/01 02:59


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 data struct that stores a single 32-bits ARGB value.

Fields

stColor contains the following struct fields:

Field NameDescriptionValue Type
.ADefines a value for the Alpha channel (transparency)Int32
.RDefines a value for the Red channelInt32
.GDefines a value for the Green channelInt32
.BDefines a value for the Blue channelInt32
.HueDefines the color hue in HSB/HSV color space. The value has to be in the range 0..360. If the Saturation and Brightness have extreme values(e.g. 0 or 100) changes in the Hue field are ignored Double
.SaturationDefines the color saturation in HSB/HSV color space The value has to be in the range 0..100 Double
.BrightnessDefines the color saturation in HSB/HSV color space The value has to be in the range 0..100 Double
.ColorRepresents the current value in System.Windows.Media.Color format System.Windows.Media.Color
.GDIColorRepresents the current value in GDI+System.Drawing.Color format System.Drawing.Color

GUI editor

stColor data type underlies a majority of color properties in EventIDE objects. The program provides an dedicated editor for stColor values.
div class="imageleft">Screenshot of the stColor GUI editor

Screenshot of the stColor GUI editor

Code Examples

 
// 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 and initialize with the green color with an optional stColor constructors
stColor MyColor2=new stColor(0,255,0); 
stColor MyColor3=new stColor(255,0,255,0); 


// The following examples cause runtime errors because the field values have to be integers in the range 0..255
stColor MyColor=new stColor(0,256,0);  
stColor MyColor2=-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..

ScrewTurn Wiki version 5.2.0.8. Some of the icons created by FamFamFam.