64
|
ImageSize property on 32 (specifies the size of the control' icons)

public void init()
{
str var_s;
;
super();
exgauge1.BeginUpdate();
exgauge1.ImageSize(32);
exgauge1.Font().Size(16);
var_s = "gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqN";
var_s = var_s + "UqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlwy";
var_s = var_s + "V21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+CM";
var_s = var_s + "Po9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI8UGvO8sTLS9r2PWmsMJTDTask3CsIbIEQRA3shOXEEAO/GclJ9F";
var_s = var_s + "EKrrA8FRbKMXRIlb0JxCkjS1LMswhCcvuel0cv26cSMa8Ufx+2sQwhEUoSXOCjSbLcnxjKc7sdKUVyq28NtVI71P9P7JxtQEapjQ6fzfM8zPfNE2PhIsLL63E40slk5y";
var_s = var_s + "7N89LcyU9SvMb3SdUc6VJLj5VLVLfO/PS9KzNFHUa/0XyBD0dxlS9cxhMlTRSoNXypPErWDPyfNS+MwprRNO0FD8wVVZ1AI08URwVRjtJ1WCn21QkkUrXVLVPQS/XIkF";
var_s = var_s + "gTxT9iONZ9xVTdq+L1eKg3kkF6Upe68XtfV51/MtrVjBlwYFL1ev8y1/P6/lyzzYl02wntj0RVFmS1Qa+M5as93QxEUW9e993rfmQ2+vy65M/mL1lhl/2bj2ByVduMtN";
var_s = var_s + "hCJT9hdz41nN14Ld12Z9UjfI/oUAaGseiw6+uFLLhcVabJOS5RqOE0BHlZ5VnEr5fOMs3st+aa/bbRzrJGV51Y0b0DbqaWXZD90hIsPbjWu52+6Wyadpe66hhO+P/Xio";
var_s = var_s + "W5rD8ZbrUZuVg6n1dsE/cXmewu1m9PVwnd35/nueXho/NaJzmjc61W76esuT77eG8pTquy9TwWH8LEzG8RDfFalx3Gcfvna9rvG/cptGLd9tuI6TZOP5Fiqi99vea+X4";
var_s = var_s + "VRcBq/JZZtVQ9cwSs5lsXE372+a9z7PbfB3VVqHyvMctLto8uob6eV0m/cD6MN2v+T33t6sBut42vdv2bJ8a997x2maFJfK+qArbGJPEKE+1qTflMsIdW/GCJX17KcT6";
var_s = var_s + "/czr/X+u1g29B7j/4BQfWkkx4zIHisjhPCmE0K4SwtXM+d4BvHRwNZOoBph9IJvPek9d40FoMJxf691jj2ywQQcHEWET4XJwkTszlVqm2GokewxtBT1DpQjRxDN0rUVD";
var_s = var_s + "NKdC3lb6tzNOwh6upMSSYfv4YBCl/bsn9PxiFCEo7SI6Obc9HeOrnY8x4jtHtdpN4GRbaorhsbu18Pph5CiHymI0RpSXGJ/z2oUOxYxG858AyiI+bfJtuTcG5yelBJyT";
var_s = var_s + "8okhqFd4a5yxL0rvulYtKCsZiWxWkc1s1cRoxxwhA31DLE0mR9l9HqX8fJgTDmFMVH0MIsRzVYnwnMi1dyzmhLt2kS2pxIiU62Wj5ptQGlSYFakLonTUJNLKaM5Wzlff";
var_s = var_s + "EkuFkk5wTrhVO2eE7G6lJhxFFYUZ55zmn0WuBCD4pzhirFCKkbomsOoIYmZx5p90LoYWGPdD5g0QmJRKYxbZ6zYoVQ2jVGylSak7KSkFH6RSjpHKFuU+YMyNo5SulkC6";
var_s = var_s + "I0vonTCitMXPoEpVS2H5FQfEqp2R1opIgAEkJISYARTCukOhmPNI5Ex/wzGHUsicMwA1LHgQ90Y/KpoQHAD+pB/R4NzIaMAB9Xaw1gqaAOsh/A/ptIkWUfhGK1kZH8Rg";
var_s = var_s + "H5GqvgArqRmt4AAPrTroRofBGADkqr6Rmu4D7CEaHARiwpJrEEZsXXwlVjyMWRsaRqwdkLGNBABZmytmyMnaINZqyVpLR2ftKAAAdd6h2osbaskdiq4EZtgSmyNcbVWR";
var_s = var_s + "JNXe3AA7REar3b0stlAAXBtoRmvJGLjEYAHUWsFcwCD/rnaop9aEICMAPdK5hT6xpeuzdOtAgKuJeGfdq6ggEbkTvAP+p9UCHXrvKkcgIA==";
exgauge1.Images(COMVariant::createFromStr(var_s));
exgauge1.Caption(0/*exLayerCaption*/,"<img>1</img>Caption");
exgauge1.EndUpdate();
}
|
63
|
ImageSize property on 16 (default) (specifies the size of the control' icons)

public void init()
{
str var_s;
;
super();
exgauge1.BeginUpdate();
exgauge1.ImageSize(16);
var_s = "gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqd";
var_s = var_s + "SqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVtt";
var_s = var_s + "mp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8ac";
var_s = var_s + "vQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtTG";
var_s = var_s + "sbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgPn";
var_s = var_s + "wD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg==";
exgauge1.Images(COMVariant::createFromStr(var_s));
exgauge1.Caption(0/*exLayerCaption*/,"<img>1</img>Caption");
exgauge1.EndUpdate();
}
|
62
|
I found that the control's needle/knob is too small to touch, is it possible somehow to make it working
public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.LayerAutoSize(-1);
exgauge1.Layers().Count(10);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.Idem("0,7");
exgauge1.LayerDragAny(9);
exgauge1.EndUpdate();
}
|
61
|
How can I rotate/move multiple layers once the user drags the layer

public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.LayerAutoSize(-1);
exgauge1.Layers().Count(10);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.Idem("0,7");
exgauge1.EndUpdate();
}
|
60
|
How can I show a layer as disabled

public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Layer2,com_Picture;
anytype var_Background,var_Layer,var_Layer1,var_Layer2,var_Picture;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 1");
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("original"); com_Layer = var_Layer;
com_Layer.OnDrag(1/*exDoMove*/);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Layer2.png");
com_Layer.DefaultOffsetY(-164);
com_Layer.Grayscale(0);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Add("grayscale 50%"); com_Layer1 = var_Layer1;
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Layer2.png");
com_Layer1.Grayscale(50);
com_Layer1.DefaultOffsetY(-82);
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Add("grayscale 100%"); com_Layer2 = var_Layer2;
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Layer2.png");
com_Layer2.Grayscale(100);
exgauge1.EndUpdate();
}
|
59
|
Is it possible to stretch all layers

public void init()
{
COM com_Background,com_Color,com_Layer;
anytype var_Background,var_Color,var_Layer;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 2");
exgauge1.PicturesName("`Layer` + int(value + 1) + `.png`");
exgauge1.Layers().Count(5);
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("empty"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(WinApi::RGB2int(240,240,240));
com_Layer.Position(0);
exgauge1.LayerAutoSize(-1);
exgauge1.EndUpdate();
}
|
58
|
Tic Tac Toe Game

// MouseDown event - Occurs when the user presses a mouse button.
void onEvent_MouseDown(int _Button,int _Shift,int _X,int _Y)
{
// Left = Me.Layers(l).Left
// Top = Me.Layers(l).Top
// Width = Me.Layers(l).Width
// Height = Me.Layers(l).Height
COM com_Background,com_Layer,com_Layers,com_Picture;
anytype var_Background,var_Layer,var_Layers,var_Picture;
int l;
;
l = exgauge1.LayerFromPoint(-1,-1);
var_Layers = exgauge1.Layers(); com_Layers = var_Layers;
var_Layer = com_Layers.Add(exgauge1.Layers().Count()); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Left("8");
com_Picture.Width("width - 2 * 8");
com_Picture.Top("8");
com_Picture.Height("height - 2 * 8");
com_Picture.Name(exgauge1.FormatABC("A mod 2 = 0 ? `x` : `o`",exgauge1.Layers().Count()));
com_Layer.Transparency(0);
}
public void init()
{
COM com_Background,com_Color,com_Layer,com_Layer1,com_Layer2,com_Layer3,com_Layer4,com_Layer5,com_Layer6,com_Layer7,com_Layer8,com_Layers,com_Picture;
anytype var_Background,var_Color,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Layer6,var_Layer7,var_Layer8,var_Layers,var_Picture;
int l;
str var_s;
;
super();
exgauge1.BeginUpdate();
var_s = "gBFLBCJwBAEHhEJAAEhABS0IQAAYAQGKIYBkAKBQAGaAoDDcMQ5QwAAyDGKEEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAZAEiWIovRbHMBzFIMYRFFCcIRGSaYDi";
var_s = var_s + "CNovTRNE7TfBMIhkGoSaKpCIRVDCSYJUzTc6wS79KgAASiJjjao6ZhaSpSABRYiyXRlHSxLiuYyoGTrJACEQxDhEEIjGLAazLMadJItCzabqGbJ8Ro6cQwTAIgI=";
exgauge1.VisualAppearance().Add(1,COMVariant::createFromStr(var_s));
exgauge1.DefaultLayer(18/*exDefLayerWidth*/,"width/3");
exgauge1.DefaultLayer(19/*exDefLayerHeight*/,"height/3");
exgauge1.HTMLPicture("x","C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Pictures\\x.png");
exgauge1.HTMLPicture("o","C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Pictures\\o.png");
exgauge1.LayerAutoSize(-1);
exgauge1.Layers().Count(9);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
com_Layer1.Left(" width/3 - 4");
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer2 = var_Layer2;
com_Layer2.Left("2 * (width/3 - 4) - 4");
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
var_Layer3 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer3 = var_Layer3;
com_Layer3.Top("height/3 - 4");
var_Background = COM::createFromObject(com_Layer3.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
var_Layer4 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer4 = var_Layer4;
com_Layer4.Top("height/3 - 4");
com_Layer4.Left(" width/3 - 4");
var_Background = COM::createFromObject(com_Layer4.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
var_Layer5 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(5)); com_Layer5 = var_Layer5;
com_Layer5.Top("height/3 - 4");
com_Layer5.Left("2 * (width/3 - 4) - 4");
var_Background = COM::createFromObject(com_Layer5.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
var_Layer6 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(6)); com_Layer6 = var_Layer6;
com_Layer6.Top("2 * (height/3 - 4) ");
var_Background = COM::createFromObject(com_Layer6.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
var_Layer7 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(7)); com_Layer7 = var_Layer7;
com_Layer7.Top("2 * (height/3 - 4) ");
com_Layer7.Left(" width/3 - 4");
var_Background = COM::createFromObject(com_Layer7.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
var_Layer8 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(8)); com_Layer8 = var_Layer8;
com_Layer8.Top("2 * (height/3 - 4) ");
com_Layer8.Left("2 * (width/3 - 4) - 4");
var_Background = COM::createFromObject(com_Layer8.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(0x1000000);
exgauge1.DefaultLayer(22/*exDefLayerTransparency*/,COMVariant::createFromInt(99));
exgauge1.EndUpdate();
}
|
57
|
What's the difference Rotate vs Rotamove

// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 227
;
}
public void init()
{
COM com_Background,com_Foreground,com_Foreground1,com_Layer,com_Layer1,com_Layer2,com_Layers,com_Picture,com_Picture1;
anytype var_Background,var_Foreground,var_Foreground1,var_Layer,var_Layer1,var_Layer2,var_Layers,var_Picture,var_Picture1;
;
super();
exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Linear\\Button with LEDs");
var_Layers = exgauge1.Layers(); com_Layers = var_Layers;
var_Layer = com_Layers.Add("base"); com_Layer = var_Layer;
var_Layer1 = com_Layers.Add("rotate"); com_Layer1 = var_Layer1;
com_Layer1.ToolTip(com_Layer1.Key());
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Name("Example Button Up.png");
com_Picture.Left("width/2");
com_Picture.Top("height/2");
com_Picture.Width(128);
com_Picture.Height(64);
var_Foreground = com_Layer1.Foreground(); com_Foreground = var_Foreground;
com_Foreground.Caption(0/*exLayerCaption*/,"<font ;14><sha ;;0>Rotate");
com_Foreground.Caption(4/*exLayerCaptionLeft*/,"width/2 + 32");
com_Foreground.Caption(5/*exLayerCaptionTop*/,"height/2 + 16");
com_Layer1.Brightness(1/*exRedChannel*/,100);
com_Layer1.OnDrag(2/*exDoRotate*/);
com_Layer1.RotateAngle(45);
var_Layer2 = com_Layers.Add("rotamove"); com_Layer2 = var_Layer2;
com_Layer2.ToolTip(com_Layer2.Key());
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Picture1 = com_Background.Picture(); com_Picture1 = var_Picture1;
com_Picture1.Name("Example Button Up.png");
com_Picture1.Left("width/2");
com_Picture1.Top("height/2");
com_Picture1.Width(128);
com_Picture1.Height(64);
var_Foreground1 = com_Layer2.Foreground(); com_Foreground1 = var_Foreground1;
com_Foreground1.Caption(0/*exLayerCaption*/,"<font ;14><sha ;;0>Rotamove");
com_Foreground1.Caption(4/*exLayerCaptionLeft*/,"width/2 + 24");
com_Foreground1.Caption(5/*exLayerCaptionTop*/,"height/2 + 16");
com_Layer2.Brightness(2/*exGreenChannel*/,100);
com_Layer2.RotateAngle(45);
com_Layer2.Transparency(25);
com_Layer2.OnDrag(3/*exDoRotamove*/);
}
|
56
|
How do I display a tooltip, when cursor hovers the layer

// MouseIn event - Notifies that the cursor enters the layer.
void onEvent_MouseIn(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.ToolTip(exgauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",exgauge1.Value()));
}
public void init()
{
COM com_Layer,com_Layer1;
anytype var_Layer,var_Layer1;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(10);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.DefaultRotateAngle(-126);
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.RotateAngleToValue("100 - value / 360 * 100");
com_Layer.ValueToRotateAngle("(value)/100 * 360");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer1 = var_Layer1;
com_Layer1.Visible(false);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer1 = var_Layer1;
com_Layer1.Visible(false);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer1 = var_Layer1;
com_Layer1.Value(COMVariant::createFromInt(25));
exgauge1.EndUpdate();
}
|
55
|
I've noticed that the OnDrag can move the layer itself, but how about moving the clipping region

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Layers(DragInfo.Layer).Clip.Ellipse
;
}
public void init()
{
COM com_Background,com_Clip,com_ClipEllipse,com_Layer,com_Layer1,com_Picture;
anytype var_Background,var_Clip,var_ClipEllipse,var_Layer,var_Layer1,var_Picture;
;
super();
exgauge1.BeginUpdate();
exgauge1.BackColor(WinApi::RGB2int(217,217,217));
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Guage");
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("background"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Guage_Background.png");
var_Clip = COM::createFromObject(com_Layer.Clip()); com_Clip = var_Clip;
var_ClipEllipse = com_Clip.Ellipse(); com_ClipEllipse = var_ClipEllipse;
com_ClipEllipse.RadiusX("width/3");
com_ClipEllipse.RadiusY("height/3");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Add("needle"); com_Layer1 = var_Layer1;
var_Background = COM::createFromObject(com_Layer1).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Guage_Needle.png");
exgauge1.EndUpdate();
}
|
54
|
How do I show a portion of layer with a different color (sample 2)

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Clip,com_Layer,com_Layer1;
anytype var_Clip,var_Layer,var_Layer1;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("Color"); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.Layers().Item("Thumb").RotateAngle());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("Color"); com_Layer = var_Layer;
com_Layer.Brightness(3/*exBlueChannel*/,com_Layer.RotateAngle());
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item("Thumb"); com_Layer1 = var_Layer1;
com_Layer1.Brightness(3/*exBlueChannel*/,exgauge1.Layers().Item("Color").RotateAngle());
}
public void init()
{
COM com_Background,com_Clip,com_ClipEllipse,com_ClipPie,com_Layer,com_Layer1,com_Layer2,com_Picture;
anytype var_Background,var_Clip,var_ClipEllipse,var_ClipPie,var_Layer,var_Layer1,var_Layer2,var_Picture;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 1");
exgauge1.PicturesName("`Layer` + int(value + 1) + `.png`");
exgauge1.Layers().Count(5);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer = var_Layer;
com_Layer.Visible(false);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.Key("Thumb");
com_Layer.DefaultRotateAngle(-141);
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.Brightness(0/*exAllChannels*/,0);
com_Layer.Brightness(1/*exRedChannel*/,100);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Add("Color"); com_Layer1 = var_Layer1;
com_Layer1.OnDrag(2/*exDoRotate*/);
com_Layer1.Position(3);
com_Layer1.Brightness(0/*exAllChannels*/,0);
com_Layer1.Brightness(1/*exRedChannel*/,100);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Layer3.png");
var_Clip = COM::createFromObject(com_Layer1.Clip()); com_Clip = var_Clip;
var_ClipPie = COM::createFromObject(com_Clip).Pie(); com_ClipPie = var_ClipPie;
com_ClipPie.SweepAngle("value");
var_Clip = COM::createFromObject(com_Layer1.Clip()); com_Clip = var_Clip;
var_ClipEllipse = com_Clip.Ellipse(); com_ClipEllipse = var_ClipEllipse;
com_ClipEllipse.RadiusX("150");
com_ClipEllipse.RadiusY("150");
com_ClipEllipse.InverseClip(true);
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item("Thumb"); com_Layer2 = var_Layer2;
com_Layer2.RotateAngle(135);
exgauge1.EndUpdate();
}
|
53
|
How do I show a portion of layer with a different color (sample 1)

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Clip,com_Layer,com_Layer1;
anytype var_Clip,var_Layer,var_Layer1;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("Color"); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.Layers().Item("Thumb").RotateAngle());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("Color"); com_Layer = var_Layer;
com_Layer.Brightness(3/*exBlueChannel*/,com_Layer.RotateAngle());
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item("Thumb"); com_Layer1 = var_Layer1;
com_Layer1.Brightness(3/*exBlueChannel*/,exgauge1.Layers().Item("Color").RotateAngle());
}
public void init()
{
COM com_Background,com_Clip,com_ClipPie,com_Layer,com_Layer1,com_Layer2,com_Picture;
anytype var_Background,var_Clip,var_ClipPie,var_Layer,var_Layer1,var_Layer2,var_Picture;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 1");
exgauge1.PicturesName("`Layer` + int(value + 1) + `.png`");
exgauge1.Layers().Count(5);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer = var_Layer;
com_Layer.Visible(false);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.Key("Thumb");
com_Layer.DefaultRotateAngle(-141);
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.Brightness(0/*exAllChannels*/,0);
com_Layer.Brightness(2/*exGreenChannel*/,100);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Add("Color"); com_Layer1 = var_Layer1;
com_Layer1.OnDrag(2/*exDoRotate*/);
com_Layer1.Position(3);
com_Layer1.Brightness(0/*exAllChannels*/,0);
com_Layer1.Brightness(2/*exGreenChannel*/,100);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Layer3.png");
var_Clip = COM::createFromObject(com_Layer1.Clip()); com_Clip = var_Clip;
var_ClipPie = COM::createFromObject(com_Clip).Pie(); com_ClipPie = var_ClipPie;
com_ClipPie.SweepAngle("value");
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item("Thumb"); com_Layer2 = var_Layer2;
com_Layer2.RotateAngle(135);
exgauge1.EndUpdate();
}
|
52
|
How can I display / clip a picture with no transparency

public void init()
{
COM com_Background,com_Clip,com_ClipPicture,com_Layer,com_Layer1,com_Picture;
anytype var_Background,var_Clip,var_ClipPicture,var_Layer,var_Layer1,var_Picture;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 1");
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("default"); com_Layer = var_Layer;
com_Layer.OnDrag(1/*exDoMove*/);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Layer2.png");
com_Layer.DefaultOffsetY(-164);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Add("notransparency"); com_Layer1 = var_Layer1;
com_Layer1.OnDrag(1/*exDoMove*/);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Layer2.png");
var_Clip = COM::createFromObject(com_Layer1.Clip()); com_Clip = var_Clip;
var_ClipPicture = com_Clip.Picture(); com_ClipPicture = var_ClipPicture;
com_ClipPicture.Name(exgauge1.Layers().Item("notransparency").Background().Picture().Name());
com_ClipPicture.AlphaTo("128");
com_Layer1.Grayscale(100);
exgauge1.EndUpdate();
}
|
51
|
How can I resize all layers

public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 2");
exgauge1.PicturesName("`Layer` + int(value + 1) + `.png`");
exgauge1.Layers().Count(5);
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("autosize"); com_Layer = var_Layer;
com_Layer.Visible(false);
com_Layer.Width(164);
com_Layer.Height(128);
exgauge1.LayerAutoSize(exgauge1.Layers().Item("autosize").Index());
exgauge1.EndUpdate();
}
|
50
|
How can I start moving any layer when user clicks it

// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// Layers(DragInfo.Layer).OnDrag = 1
;
}
public void init()
{
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + int(value + 1) + `.png`");
exgauge1.Layers().Count(11);
}
|
49
|
How can I prevent dragging the layers when user right click it
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// Cancel = Me.FormatABC("A=2",DragInfo.Button)
;
}
public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + int(value + 1) + `.png`");
exgauge1.Layers().Count(11);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.OnDrag(1/*exDoMove*/);
}
|
48
|
Is your control DPI-Aware

public void init()
{
COM com_Layer,com_Layer1;
anytype var_Layer,var_Layer1;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
exgauge1.Layers().Count(11);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer = var_Layer;
com_Layer.Grayscale(100);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.Grayscale(100);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(10)); com_Layer = var_Layer;
com_Layer.Width("128 * dpix");
com_Layer.Height("128 * dpiy");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer1 = var_Layer1;
com_Layer1.OnDrag(2/*exDoRotate*/);
exgauge1.LayerAutoSize(10);
}
|
47
|
Is it possible to make the control transparent, I would like to put the control on a form, then make the form transparent so the control appears on the desktop with just the images contained in the layers visible

public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(10);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.OnDrag(2/*exDoRotate*/);
exgauge1.AllowMoveOnClick(true);
exgauge1.LayerUpdate(2/*exLayerUpdateScreen*/);
}
|
46
|
How can I show the layers on perspective

public void init()
{
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(10);
exgauge1.Debug(1/*exDebugLayers*/);
}
|
45
|
Is it possible to resize all layers after they are loaded (method 2)

public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
exgauge1.Layers().Count(11);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer = var_Layer;
com_Layer.Grayscale(100);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.Grayscale(100);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.OnDrag(2/*exDoRotate*/);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(10)); com_Layer = var_Layer;
com_Layer.Width(128);
com_Layer.Height(128);
exgauge1.LayerAutoSize(10);
}
|
44
|
Is it possible to resize all layers after they are loaded (method 1)

public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
exgauge1.Layers().Count(10);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer = var_Layer;
com_Layer.Grayscale(100);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.Grayscale(100);
exgauge1.LayerAutoSize(-1);
}
|
43
|
Is it possible to load images for different layers from different folders

public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
str var_s;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(12);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("\\..\\Clock\\vista_clock.png");
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("\\..\\Knob 2\\Layer3.png");
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(10)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Led\\Speed\\noBack.png");
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(11)); com_Layer = var_Layer;
com_Layer.DefaultOffsetX(64);
com_Layer.DefaultOffsetY(-36);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
var_s = "gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQEX5JIhBKhYQrFSxNNhUKoUY7/c6+R6+a7pPg0UAjaISTQwCzMEgtWQ2IyDBJJMYiNJCJgTVJuMghNTcSgFAx";
var_s = var_s + "lNZiMinYKNRQ2NxMBhWNQkSRUAQkRRNEhYEBhMogMADOwGfY6N7eXb3DgXeamZgMGbQIStE55RZ7c7ce7/XpzZycOaBf7ZNAlZwiGQIMAnQBnAL4ACKAACABXADMAY4B";
var_s = var_s + "LgHYiXS6VQAESyDbAHYAGwvea9E4BXhPIgXD4KQCZD4FeAJzqWFLcNQf1KkSgyFYGMDmVoAEwAHjxQDiOo7AbgKqlaj8WQBRgxDYBfmabpDRTXdumF5ZSwVboXIBrToA";
var_s = var_s + "hgBIwHWFREvoNZtlsb42G6Kg2g4b59AeYgAnAMpWnqBZWk2JoIkQcY8AGQAvgAPBWkcScUnceh6FoLYWAsepsGwLBsCcMIMh8C4AHYOAODOVIUHaYwviKMgvh2eIxmOR";
var_s = var_s + "xcnHJ5MjYExBlmM5nBAVgqGodY9nuFxXGoA5al8WIJmAe5OgAIxtD6bJUimU5uC4GxFiOaxXkOc59lwOh0kkFYREWFZ6iSdhiiMQBSg0VArFWAZ0CgepijEKJdlcBZnn";
var_s = var_s + "uaJ2n2PBZCgaAHnESZsHmRpFlKBBECQY5hA2DoOgaYYYCoC4zjObpAkCAJ+mVGgQBEFZ7CSVgbgYYYGk8c4ugODRFFgKRUnYAZ4C8E5ECqWwOl8d5/gcGgjmALQRjiUB";
var_s = var_s + "Qmg9oVDWBAIFoAZ8DmBoAlcWoBlwWAjHEK5pnSehpDALR9A2U1+FWAB3B2X4rmCJwaBcLQNmiG4AG8do6FkLRWjEOw7GsEwRBQUogCIEBRH0LJEAQeR8h4c55jyXwDmA";
var_s = var_s + "K9TlMLIoBcS4pgAZwBGwaB3FIGIDBHopsmWS4Xh2HpUgoPhvkOcYcWANBWiCIh5GicJhnKUOvCcJp0CIGxNg6doEIUUopHSGoAA+OhhFeKgVBoGIYnCfo7HcTgdhuG4z";
var_s = var_s + "kWBB68GdJmkKQQPcSVx6Hue47l0foMAAZ5yjkXJTBoW5ekgSglFKZ4AAYO5BDwIAdkgZZykcWg3G8OoPlgNpDicT4fH6AwZk+M4zDEMwZGMVB9GGZgqGeO51kmfAbnyG";
var_s = var_s + "QZjSVofmeepzB8Nojmqah+gQEAzCsKfvgoI5oniYOvCCZaghiWfeiWNY2mOOJ2CMKJyDUVpOhwR38EcDpWlq/4Ox6xLAxCMIkRAShQCoC4C4D42RaCpH+BAGY1wDiDFo";
var_s = var_s + "GgbwFQIjbHuH0Y48x+BUCeE8O47h0DRBeN8FwFAFC7ESMgJ4AAOARFyCsOQSgIhbEsK0FoywZC2DaOsFAig3DOGYMwPguAzjPE8G8QZFT1ghEA5IG4QhaHIB4M8JragU";
var_s = var_s + "itDqK5jIrhvj2HoLYU49hHjvA+NsWQZRligHWLoDwRAkAaGcBICIExIshBwAgQQ8ojjMCeAcB4Hh8DiGMI0X4rhiixEyNcLQBwRASAEIgKAKxjB7CMEAfIfhbjrB0E4J";
var_s = var_s + "QGxOgWEiF4CIzhFjgDi+gfQdh2jaBqLQPo+x7CNHSEwYwfwWCfHeA5WYXgsBYAQG4bougag/B6P0eYHwpg/A4D8F4pBXArGQJwRI9RviGHyDYQARQAAVAAPoTwAACCQG";
var_s = var_s + "oCADgrxljzF0KwVwbgDBnGIJIDgGxnCxHgDoGInAxhmC+O4agjwUCQBMEIVAiA3ALCiMkRAKgAhcGsHEKgTg3BFikGoEQ3hqCkE0DsMILQbgCGADgVwGwsiOCKCYGQBB";
var_s = var_s + "AgREiKoRABIkATGYK4AAThJAGBCEACYEAEhRGKBAFoCAmBgEYAkSQCQthtEuPsWwAAkgUCIAARzUgnD3HoHAS46xMDFWgDUbQLAlDMgiKsFwIw2AzGwEoUQJXQjXCIGI";
var_s = var_s + "AwQhUh9DiJQBAxwQAwFID0IA2wjCkCQBEBYUw3g2AWMsKwNAvgqFWLQJIOwbAcBOEIMgLwxDRGkNACw7gAAwDUPkRokwYBrCKKQLo1xKhIDWGEMYOhnCGD+AETIaBOCA";
var_s = var_s + "BEEYVY0yI1SCKE4IgrghBgEEQEA=";
com_Picture.Name(COMVariant::createFromStr(var_s));
com_Picture.Width(64);
com_Picture.Height(64);
}
|
42
|
How can I specify whether an object can be selected or not

// MouseMove event - Occurs when the user moves the mouse.
void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y)
{
;
print( exgauge1.LayerFromPoint(-1,-1) );
}
public void init()
{
COM com_Background,com_Foreground,com_Foreground1,com_Layer,com_Layer1,com_Picture,com_Picture1;
anytype var_Background,var_Foreground,var_Foreground1,var_Layer,var_Layer1,var_Picture,var_Picture1;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(12);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(10)); com_Layer = var_Layer;
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).ExtraPicture("extra1"); com_Picture = var_Picture;
com_Picture.Name("Layer1.png");
com_Picture.Left("32");
com_Picture.Top("32");
com_Picture.Width(64);
com_Picture.Height(64);
var_Foreground = com_Layer.Foreground(); com_Foreground = var_Foreground;
com_Foreground.Caption(0/*exLayerCaption*/,"<sha ;;0>selectable");
com_Foreground.Caption(4/*exLayerCaptionLeft*/,COMVariant::createFromInt(38));
com_Foreground.Caption(5/*exLayerCaptionTop*/,COMVariant::createFromInt(-5));
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(11)); com_Layer1 = var_Layer1;
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture1 = COM::createFromObject(com_Background).ExtraPicture("extra2"); com_Picture1 = var_Picture1;
com_Picture1.Name("Layer1.png");
com_Picture1.Left("width-64");
com_Picture1.Top("height-84 - 32");
com_Picture1.Width(64);
com_Picture1.Height(64);
com_Picture1.Selectable(false);
com_Layer1.Brightness(0/*exAllChannels*/,25);
var_Foreground1 = com_Layer1.Foreground(); com_Foreground1 = var_Foreground1;
com_Foreground1.Caption(0/*exLayerCaption*/,"<sha ;;0>not selectable");
com_Foreground1.Caption(3/*exLayerCaptionAnchor*/,COMVariant::createFromInt(8));
com_Foreground1.Caption(5/*exLayerCaptionTop*/,"height-theight/4");
exgauge1.EndUpdate();
}
|
41
|
How do I get the layer/object/picture from the cursor
// MouseMove event - Occurs when the user moves the mouse.
void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y)
{
;
print( exgauge1.LayerFromPoint(-1,-1) );
}
public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(10);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.OnDrag(2/*exDoRotate*/);
}
|
40
|
How can I display a speedometer

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Background,com_Clip,com_Layer,com_Picture;
anytype var_Background,var_Clip,var_Layer,var_Picture;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("arc"); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("noDigit"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).ExtraPicture("80"); com_Picture = var_Picture;
com_Picture.Name(exgauge1.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",exgauge1.Value()));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("noDigit"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).ExtraPicture("08"); com_Picture = var_Picture;
com_Picture.Name(exgauge1.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",exgauge1.Value()));
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("value + B",exgauge1.Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipPie,com_ClipPie1,com_Layer,com_Layer1,com_Layer2,com_Layer3,com_Layer4,com_Layer5,com_Layer6,com_Picture,com_Picture1,com_Picture2,com_Picture3,com_Picture4;
anytype var_Background,var_Clip,var_ClipPie,var_ClipPie1,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Layer6,var_Picture,var_Picture1,var_Picture2,var_Picture3,var_Picture4;
;
super();
exgauge1.BeginUpdate();
exgauge1.BackColor(WinApi::RGB2int(40,40,40));
exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Led\\Speed");
exgauge1.Layers().Count(6);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.Key("arcBack");
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("noArcBack.png");
var_Clip = COM::createFromObject(com_Layer.Clip()); com_Clip = var_Clip;
var_ClipPie = com_Clip.Pie(); com_ClipPie = var_ClipPie;
com_ClipPie.StartAngle(240);
com_ClipPie.SweepAngle(240);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
com_Layer1.Key("arc");
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("noArc.png");
var_Clip = COM::createFromObject(com_Layer1.Clip()); com_Clip = var_Clip;
var_ClipPie1 = com_Clip.Pie(); com_ClipPie1 = var_ClipPie1;
com_ClipPie1.StartAngle(240);
com_ClipPie1.SweepAngle("value/100 * 240");
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer2 = var_Layer2;
com_Layer2.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer2.Key("pointer");
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("noLine.png");
com_Layer2.DefaultRotateAngle(240);
com_Layer2.RotateAngleToValue("value/240 * 100");
com_Layer2.ValueToRotateAngle("value / 100 * 240");
com_Layer2.RotateAngleValid("value > 240 ? (value > 300 ? 0 : 240) : value");
com_Layer2.OnDrag(2/*exDoRotate*/);
var_Layer3 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer3 = var_Layer3;
com_Layer3.Key("noBack");
com_Layer3.Left("(width - 55 * 2)/2");
com_Layer3.Top("(height - 94 * 1)/2");
com_Layer3.Width("2 * 45 + 8");
com_Layer3.Height("1 * 94");
com_Layer3.Transparency(90);
var_Background = COM::createFromObject(com_Layer3.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).ExtraPicture("80"); com_Picture = var_Picture;
com_Picture.Name("noBack.png");
com_Picture.Left("-4");
com_Picture.Width("70");
var_Background = COM::createFromObject(com_Layer3.Background()); com_Background = var_Background;
var_Picture1 = COM::createFromObject(com_Background).ExtraPicture("08"); com_Picture1 = var_Picture1;
com_Picture1.Name("noBack.png");
com_Picture1.Left("36");
com_Picture1.Width(70);
var_Layer4 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer4 = var_Layer4;
com_Layer4.Key("noDigit");
com_Layer4.Left("(width - 55 * 2)/2");
com_Layer4.Top("(height - 94 * 1)/2");
com_Layer4.Width("2 * 45 + 8");
com_Layer4.Height("1 * 94");
var_Background = COM::createFromObject(com_Layer4.Background()); com_Background = var_Background;
var_Picture2 = COM::createFromObject(com_Background).ExtraPicture("80"); com_Picture2 = var_Picture2;
com_Picture2.Name("no1.png");
com_Picture2.Left("-4");
com_Picture2.Width("70");
var_Background = COM::createFromObject(com_Layer4.Background()); com_Background = var_Background;
var_Picture3 = COM::createFromObject(com_Background).ExtraPicture("08"); com_Picture3 = var_Picture3;
com_Picture3.Name("no2.png");
com_Picture3.Left("36");
com_Picture3.Width(70);
var_Layer5 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(5)); com_Layer5 = var_Layer5;
com_Layer5.Key("noCap");
var_Background = COM::createFromObject(com_Layer5.Background()); com_Background = var_Background;
var_Picture4 = COM::createFromObject(com_Background).Picture(); com_Picture4 = var_Picture4;
com_Picture4.Name("noCap.png");
com_Layer5.Transparency(45);
var_Layer6 = COM::createFromObject(exgauge1.Layers()).Item("pointer"); com_Layer6 = var_Layer6;
com_Layer6.Position(exgauge1.Layers().Item("noCap").Position());
exgauge1.LayerOfValue(exgauge1.Layers().Item("pointer").Index());
exgauge1.Value(COMVariant::createFromInt(56));
exgauge1.EndUpdate();
}
|
39
|
How can I display LED-numbers

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
exgauge1.Value(exgauge1.FormatABC("value MIN 0 MAX 99",.Value()));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("noDigit"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).ExtraPicture("80"); com_Picture = var_Picture;
com_Picture.Name(exgauge1.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",exgauge1.Value()));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("noDigit"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).ExtraPicture("08"); com_Picture = var_Picture;
com_Picture.Name(exgauge1.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",exgauge1.Value()));
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("value + B",exgauge1.Layers().Item("noDigit").Value(),_Delta));
}
// Timer event - Occurs when the interval elapses.
void onEvent_Timer(int _TickCount)
{
;
exgauge1.Value(exgauge1.FormatABC("value = 99 ? 0 : ( value + B )",exgauge1.Value(),COMVariant::createFromInt(1)));
}
public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Picture,com_Picture1,com_Picture2,com_Picture3;
anytype var_Background,var_Layer,var_Layer1,var_Picture,var_Picture1,var_Picture2,var_Picture3;
;
super();
exgauge1.BeginUpdate();
exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Led\\Speed");
exgauge1.Layers().Count(3);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer = var_Layer;
com_Layer.Key("noBack");
com_Layer.Left("(width - 55 * 2)/2");
com_Layer.Top("(height - 94 * 1)/2");
com_Layer.Width("2 * 45 + 8");
com_Layer.Height("1 * 94");
com_Layer.Transparency(90);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).ExtraPicture("80"); com_Picture = var_Picture;
com_Picture.Name("noBack.png");
com_Picture.Left("-4");
com_Picture.Width("70");
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture1 = COM::createFromObject(com_Background).ExtraPicture("08"); com_Picture1 = var_Picture1;
com_Picture1.Name("noBack.png");
com_Picture1.Left("36");
com_Picture1.Width(70);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer1 = var_Layer1;
com_Layer1.Key("noDigit");
com_Layer1.Left("(width - 55 * 2)/2");
com_Layer1.Top("(height - 94 * 1)/2");
com_Layer1.Width("2 * 45 + 8");
com_Layer1.Height("1 * 94");
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture2 = COM::createFromObject(com_Background).ExtraPicture("80"); com_Picture2 = var_Picture2;
com_Picture2.Name("no1.png");
com_Picture2.Left("-4");
com_Picture2.Width("70");
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture3 = COM::createFromObject(com_Background).ExtraPicture("08"); com_Picture3 = var_Picture3;
com_Picture3.Name("no2.png");
com_Picture3.Left("36");
com_Picture3.Width(70);
exgauge1.LayerOfValue(exgauge1.Layers().Item("noDigit").Index());
exgauge1.Value(COMVariant::createFromInt(73));
exgauge1.TimerInterval(100);
exgauge1.EndUpdate();
}
|
38
|
How can I display a simple knob, to fit the control's client area

public void init()
{
COM com_Layer;
anytype var_Layer;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 1");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.LayerAutoSize(-1);
exgauge1.DefaultLayer(18/*exDefLayerWidth*/,"width MAX height");
exgauge1.DefaultLayer(19/*exDefLayerHeight*/,"width MAX height");
exgauge1.Layers().Count(5);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.DefaultRotateAngle(-142);
}
|
37
|
How can I display a switch

// Click event - Occurs when the user presses and then releases the left mouse button over the control.
void onEvent_Click()
{
;
exgauge1.Value(exgauge1.FormatABC("(value + 1) mod 2",.Value()));
}
// DragEnd event - Occurs once the user ends dragging a layer.
void onEvent_DragEnd(COM _DragInfo,boolean _Cancel)
{
;
exgauge1.Value(exgauge1.FormatABC("(value < 24 ? 0 : 1)",exgauge1.Layers().Item("knob").OffsetX()));
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
;
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("value > 0 ? 1 : 0",_Delta));
}
public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Layer2,com_Picture,com_Picture1,com_Picture2;
anytype var_Background,var_Layer,var_Layer1,var_Layer2,var_Picture,var_Picture1,var_Picture2;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Linear\\Switch");
exgauge1.Layers().Count(4);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("background.png");
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Name("Indicator_ON.png");
com_Picture.DisplayAs(16/*MiddleLeft*/);
com_Layer.OffsetXValid(48);
com_Layer.OffsetYValid(0);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer1 = var_Layer1;
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture1 = com_Background.Picture(); com_Picture1 = var_Picture1;
com_Picture1.Name("Indicator_OFF.png");
com_Picture1.DisplayAs(18/*MiddleRight*/);
com_Layer1.OffsetXValid(-12);
com_Layer1.OffsetYValid(0);
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer2 = var_Layer2;
com_Layer2.OnDrag(1/*exDoMove*/);
com_Layer2.Key("knob");
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Picture2 = com_Background.Picture(); com_Picture2 = var_Picture2;
com_Picture2.Name("knob.png");
com_Picture2.DisplayAs(17/*MiddleCenter*/);
com_Layer2.DefaultOffsetY("9");
com_Layer2.DefaultOffsetX("-5");
com_Layer2.OffsetYValid("0");
com_Layer2.ValueToOffsetX("value = 0 ? 0 : 48");
com_Layer2.OffsetToValue("value = 0 ? 0 : 1");
com_Layer2.OffsetXValid("(value MIN 0 MAX 48)");
exgauge1.LayerOfValue(exgauge1.Layers().Item("knob").Index());
exgauge1.Value(COMVariant::createFromInt(1));
}
|
36
|
How can I colorize the layer

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("` Value: <b>` + (value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(4)).Value()));
}
// Click event - Occurs when the user presses and then releases the left mouse button over the control.
void onEvent_Click()
{
COM com_Object;
anytype var_Object;
;
var_Object = exgauge1.Layers().Item(exgauge1.LayerFromPoint(-1,-1)); com_Object = var_Object;
}
// MouseIn event - Notifies that the cursor enters the layer.
void onEvent_MouseIn(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(_Layer); com_Layer = var_Layer;
com_Layer.Brightness(1/*exRedChannel*/,100);
com_Layer.Brightness(2/*exGreenChannel*/,0);
com_Layer.Brightness(3/*exBlueChannel*/,0);
}
// MouseOut event - Notifies that the cursor exits the layer.
void onEvent_MouseOut(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(_Layer); com_Layer = var_Layer;
com_Layer.Brightness(1/*exRedChannel*/,exgauge1.DefaultLayer(128/*exDefLayerBrightness*/));
com_Layer.Brightness(2/*exGreenChannel*/,exgauge1.DefaultLayer(128/*exDefLayerBrightness*/));
com_Layer.Brightness(3/*exBlueChannel*/,exgauge1.DefaultLayer(128/*exDefLayerBrightness*/));
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("A - B",.Value(),_Delta));
}
public void init()
{
COM com_Layer,com_Layer1;
anytype var_Layer,var_Layer1;
;
super();
exgauge1.BeginUpdate();
exgauge1.DefaultLayer(128/*exDefLayerBrightness*/,COMVariant::createFromInt(51));
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 2");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(6);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.RotateCenterX("lwidth/2-3");
com_Layer.RotateCenterY("lheight/2+23");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer1 = var_Layer1;
com_Layer1.DefaultRotateAngle(-132);
com_Layer1.OnDrag(3/*exDoRotamove*/);
com_Layer1.RotateAngleValid("value < 0 ? 0 : (value > 236 ? (value > 300 ? 0 : 236 ) : value)");
com_Layer1.ValueToRotateAngle("value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86");
com_Layer1.RotateAngleToValue("value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )");
exgauge1.Value(COMVariant::createFromInt(45));
exgauge1.EndUpdate();
}
|
35
|
How can I imitate the rotating angle on an unequal scale

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("` Value: <b>` + (value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(4)).Value()));
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("A - B",.Value(),_Delta));
}
public void init()
{
COM com_Layer,com_Layer1;
anytype var_Layer,var_Layer1;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 2");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(6);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.RotateCenterX("lwidth/2-3");
com_Layer.RotateCenterY("lheight/2+23");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer1 = var_Layer1;
com_Layer1.DefaultRotateAngle(-132);
com_Layer1.OnDrag(3/*exDoRotamove*/);
com_Layer1.RotateAngleValid("value < 0 ? 0 : (value > 236 ? (value > 300 ? 0 : 236 ) : value)");
com_Layer1.ValueToRotateAngle("value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86");
com_Layer1.RotateAngleToValue("value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )");
exgauge1.Value(COMVariant::createFromInt(45));
exgauge1.EndUpdate();
}
|
34
|
How can I rotate more knobs at once

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("` Value: <b>` + (value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(4)).Value()));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer = var_Layer;
com_Layer.RotateAngle(exgauge1.Layers().Item(COMVariant::createFromInt(4)).RotateAngle());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.RotateAngle(exgauge1.FormatABC("A - B",exgauge1.Layers().Item(COMVariant::createFromInt(4)).RotateAngle(),_Delta));
}
public void init()
{
COM com_Layer,com_Layer1;
anytype var_Layer,var_Layer1;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 1");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(5);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.DefaultRotateAngle(-142);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer1 = var_Layer1;
com_Layer1.OnDrag(2/*exDoRotate*/);
com_Layer1.RotateType(2/*exRotateBilinearInterpolation*/);
}
|
33
|
How can I clip one layer while other is rotating

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("` Value: <b>` + (value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(9)).Value()));
exgauge1.ExtraCaption("RotateAngle",0/*exLayerCaption*/,exgauge1.FormatABC("` RotateAngle: <b>` + ( A format `` ) + `°`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotateAngle()));
exgauge1.ExtraCaption("RotateAngle",5/*exLayerCaptionTop*/,COMVariant::createFromInt(18));
exgauge1.ExtraCaption("RotamoveCenter",0/*exLayerCaption*/,exgauge1.FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterY()));
exgauge1.ExtraCaption("RotamoveCenter",5/*exLayerCaptionTop*/,COMVariant::createFromInt(36));
exgauge1.ExtraCaption("RotamoveOffset",0/*exLayerCaption*/,exgauge1.FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveOffsetX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveOffsetY()));
exgauge1.ExtraCaption("RotamoveOffset",5/*exLayerCaptionTop*/,COMVariant::createFromInt(54));
exgauge1.ExtraCaption("Offset",0/*exLayerCaption*/,exgauge1.FormatABC("` Offset: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).OffsetX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).OffsetY()));
exgauge1.ExtraCaption("Offset",5/*exLayerCaptionTop*/,COMVariant::createFromInt(72));
exgauge1.ExtraCaption("Client",0/*exLayerCaption*/,exgauge1.FormatABC("`<sha ;;0><font ;12><b>` + ((100 - value) format ``)",exgauge1.Value()));
exgauge1.ExtraCaption("Client",4/*exLayerCaptionLeft*/,exgauge1.FormatABC("value - 12",.Item(COMVariant::createFromInt(9)).LayerToClientX(exgauge1.Layers().RotamoveCenterX(),.RotamoveCenterY())));
exgauge1.ExtraCaption("Client",5/*exLayerCaptionTop*/,exgauge1.FormatABC("value - 36",.Item(COMVariant::createFromInt(9)).LayerToClientY(exgauge1.Layers().RotamoveCenterX(),.RotamoveCenterY())));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotateAngle());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.Layers().Item(COMVariant::createFromInt(3)).Clip().Value());
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.RotateAngleValid = "value < 0 ? 0 : ( value >= 360 ? 359.999 : value )"
;
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("100 - value - B",exgauge1.Value(),_Delta));
}
public void init()
{
COM com_Clip,com_ClipPie,com_Layer,com_Layer1;
anytype var_Clip,var_ClipPie,var_Layer,var_Layer1;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(11);
exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.DefaultRotateAngle(-126);
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.RotateAngleToValue("100 - value / 360 * 100");
com_Layer.ValueToRotateAngle("(value)/100 * 360");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer1 = var_Layer1;
var_Clip = COM::createFromObject(com_Layer1).Clip(); com_Clip = var_Clip;
var_ClipPie = COM::createFromObject(com_Clip).Pie(); com_ClipPie = var_ClipPie;
com_ClipPie.SweepAngle("value");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer1 = var_Layer1;
var_Clip = COM::createFromObject(com_Layer1).Clip(); com_Clip = var_Clip;
var_ClipPie = COM::createFromObject(com_Clip).Pie(); com_ClipPie = var_ClipPie;
com_ClipPie.SweepAngle(exgauge1.Layers().Item(COMVariant::createFromInt(3)).Clip().Pie().SweepAngle());
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer1 = var_Layer1;
com_Layer1.Value(COMVariant::createFromInt(25));
exgauge1.EndUpdate();
}
|
32
|
Can I move one or more layers at once

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer = var_Layer;
com_Layer.Brightness(1/*exRedChannel*/,exgauge1.FormatABC("100 - value ",exgauge1.Value()));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.Brightness(1/*exRedChannel*/,exgauge1.Layers().Item(COMVariant::createFromInt(3)).Brightness(1/*exRedChannel*/));
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("` Value: <b>` + (100 - value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(9)).Value()));
exgauge1.ExtraCaption("RotateAngle",0/*exLayerCaption*/,exgauge1.FormatABC("` RotateAngle: <b>` + ( A format `` ) + `°`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotateAngle()));
exgauge1.ExtraCaption("RotateAngle",5/*exLayerCaptionTop*/,COMVariant::createFromInt(18));
exgauge1.ExtraCaption("RotamoveCenter",0/*exLayerCaption*/,exgauge1.FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterY()));
exgauge1.ExtraCaption("RotamoveCenter",5/*exLayerCaptionTop*/,COMVariant::createFromInt(36));
exgauge1.ExtraCaption("RotamoveOffset",0/*exLayerCaption*/,exgauge1.FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveOffsetX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveOffsetY()));
exgauge1.ExtraCaption("RotamoveOffset",5/*exLayerCaptionTop*/,COMVariant::createFromInt(54));
exgauge1.ExtraCaption("Offset",0/*exLayerCaption*/,exgauge1.FormatABC("` Offset: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).OffsetX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).OffsetY()));
exgauge1.ExtraCaption("Offset",5/*exLayerCaptionTop*/,COMVariant::createFromInt(72));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(10)); com_Layer = var_Layer;
com_Layer.RotateAngle(exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotateAngle());
}
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void onEvent_DblClick(int _Shift,int _X,int _Y)
{
;
exgauge1.Value(COMVariant::createFromInt(0));
}
// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// ExtraCaption("Clockwise",0) = FormatABC( "` Clockwise: <b>` + ( value != 0 ? `Yes` : `No`) ", DragInfo.Clockwise )
// ExtraCaption("Cumulative",0) = FormatABC( "` CumulativeRotateAngle: <b>` + ( value format `` ) + `°` ", DragInfo.CumulativeRotateAngle )
;
print( _DragInfo );
exgauge1.ExtraCaption("Clockwise",5/*exLayerCaptionTop*/,COMVariant::createFromInt(90));
exgauge1.ExtraCaption("Cumulative",5/*exLayerCaptionTop*/,COMVariant::createFromInt(108));
}
// DragEnd event - Occurs once the user ends dragging a layer.
void onEvent_DragEnd(COM _DragInfo,boolean _Cancel)
{
;
exgauge1.ExtraCaption("Clockwise",0/*exLayerCaption*/,"");
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 227
// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
;
exgauge1.ExtraCaption("Clockwise",0/*exLayerCaption*/,"");
exgauge1.ExtraCaption("Cumulative",0/*exLayerCaption*/,"");
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("100 - A - B",exgauge1.Value(),_Delta));
}
public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Layer2,com_Layer3,com_Picture;
anytype var_Background,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Picture;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
exgauge1.Layers().Count(11);
exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.DefaultRotateAngle(-126);
com_Layer.RotateAngleToValue("100 - (value ) / 360 * 100");
com_Layer.ValueToRotateAngle("(value)/100 * 360");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(10)); com_Layer1 = var_Layer1;
com_Layer1.Grayscale(100);
com_Layer1.Transparency(25);
com_Layer1.DefaultRotateAngle(-69.5);
com_Layer1.RotateAngleToValue("100 - (value ) / 360 * 100");
com_Layer1.ValueToRotateAngle("(value 1)/100 * 360");
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("Highlighted_Layer4.png");
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer2 = var_Layer2;
com_Layer2.Brightness(0/*exAllChannels*/,0);
com_Layer2.Brightness(1/*exRedChannel*/,0);
var_Layer3 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer3 = var_Layer3;
com_Layer3.Brightness(0/*exAllChannels*/,0);
com_Layer3.Brightness(1/*exRedChannel*/,0);
exgauge1.LayerOfValue(9);
exgauge1.Value(COMVariant::createFromInt(5));
exgauge1.EndUpdate();
}
|
31
|
How can I rotate a knob by moving ( rotamove )

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer = var_Layer;
com_Layer.Transparency(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.Transparency(exgauge1.Value());
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("` Value: <b>` + (100 - value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(9)).Value()));
exgauge1.ExtraCaption("RotateAngle",0/*exLayerCaption*/,exgauge1.FormatABC("` RotateAngle: <b>` + ( A format `` ) + `°`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotateAngle()));
exgauge1.ExtraCaption("RotateAngle",5/*exLayerCaptionTop*/,COMVariant::createFromInt(18));
exgauge1.ExtraCaption("RotamoveCenter",0/*exLayerCaption*/,exgauge1.FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterY()));
exgauge1.ExtraCaption("RotamoveCenter",5/*exLayerCaptionTop*/,COMVariant::createFromInt(36));
exgauge1.ExtraCaption("RotamoveOffset",0/*exLayerCaption*/,exgauge1.FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveOffsetX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveOffsetY()));
exgauge1.ExtraCaption("RotamoveOffset",5/*exLayerCaptionTop*/,COMVariant::createFromInt(54));
exgauge1.ExtraCaption("Offset",0/*exLayerCaption*/,exgauge1.FormatABC("` Offset: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).OffsetX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).OffsetY()));
exgauge1.ExtraCaption("Offset",5/*exLayerCaptionTop*/,COMVariant::createFromInt(72));
}
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void onEvent_DblClick(int _Shift,int _X,int _Y)
{
;
exgauge1.Value(COMVariant::createFromInt(0));
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
;
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("100 - A - B",exgauge1.Value(),_Delta));
}
public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Layer2,com_Picture;
anytype var_Background,var_Layer,var_Layer1,var_Layer2,var_Picture;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(11);
exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.DefaultRotateAngle(-126);
com_Layer.RotateAngleToValue("100 - value / 360 * 100");
com_Layer.ValueToRotateAngle("(value)/100 * 360");
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).ExtraPicture("Aka"); com_Picture = var_Picture;
com_Picture.Value("Highlighted_Layer4.png");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer1 = var_Layer1;
com_Layer1.Brightness(0/*exAllChannels*/,0);
com_Layer1.Brightness(1/*exRedChannel*/,100);
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer2 = var_Layer2;
com_Layer2.OnDrag(3/*exDoRotamove*/);
com_Layer2.Brightness(0/*exAllChannels*/,0);
com_Layer2.Brightness(1/*exRedChannel*/,100);
exgauge1.Value(COMVariant::createFromInt(15));
exgauge1.EndUpdate();
}
|
30
|
How can I display a knob, and displays the current value on it

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("` Value: <b>` + (100 - value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(9)).Value()));
exgauge1.ExtraCaption("RotateAngle",0/*exLayerCaption*/,exgauge1.FormatABC("` RotateAngle: <b>` + ( A format `` ) + `°`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotateAngle()));
exgauge1.ExtraCaption("RotateAngle",5/*exLayerCaptionTop*/,COMVariant::createFromInt(18));
exgauge1.ExtraCaption("RotamoveCenter",0/*exLayerCaption*/,exgauge1.FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterY()));
exgauge1.ExtraCaption("RotamoveCenter",5/*exLayerCaptionTop*/,COMVariant::createFromInt(36));
exgauge1.ExtraCaption("RotamoveOffset",0/*exLayerCaption*/,exgauge1.FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveOffsetX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveOffsetY()));
exgauge1.ExtraCaption("RotamoveOffset",5/*exLayerCaptionTop*/,COMVariant::createFromInt(54));
exgauge1.ExtraCaption("Offset",0/*exLayerCaption*/,exgauge1.FormatABC("` Offset: <b> (` + A + `,` + B + `)`",exgauge1.Layers().Item(COMVariant::createFromInt(9)).OffsetX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).OffsetY()));
exgauge1.ExtraCaption("Offset",5/*exLayerCaptionTop*/,COMVariant::createFromInt(72));
exgauge1.ExtraCaption("Client",0/*exLayerCaption*/,exgauge1.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",exgauge1.Value()));
exgauge1.ExtraCaption("Client",4/*exLayerCaptionLeft*/,exgauge1.FormatABC("value - 8",exgauge1.Layers().Item(COMVariant::createFromInt(9)).LayerToClientX(exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterY())));
exgauge1.ExtraCaption("Client",5/*exLayerCaptionTop*/,exgauge1.FormatABC("value - 26",exgauge1.Layers().Item(COMVariant::createFromInt(9)).LayerToClientY(exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterY())));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(7)); com_Layer = var_Layer;
com_Layer.RotateAngle(exgauge1.Layers().Item(COMVariant::createFromInt(0)).RotateAngle());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("100 - A - B",exgauge1.Value(),_Delta));
}
public void init()
{
COM com_Layer,com_Layer1,com_Layer2;
anytype var_Layer,var_Layer1,var_Layer2;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
exgauge1.Layers().Count(11);
exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
com_Layer.DefaultRotateAngle(-126);
com_Layer.OnDrag(3/*exDoRotamove*/);
com_Layer.RotateAngleToValue("100 - (value / 360 * 100)");
com_Layer.ValueToRotateAngle("(value)/100 * 360");
com_Layer.ValueToOffsetX("value");
com_Layer.OffsetToValue("value");
com_Layer.RotateAngleValid("int(value / 360 * 100)/100 * 360");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer1 = var_Layer1;
com_Layer1.Visible(false);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer1 = var_Layer1;
com_Layer1.Visible(false);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer1 = var_Layer1;
com_Layer1.OnDrag(2/*exDoRotate*/);
com_Layer1.RotateType(2/*exRotateBilinearInterpolation*/);
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(7)); com_Layer2 = var_Layer2;
com_Layer2.OnDrag(2/*exDoRotate*/);
com_Layer2.RotateType(2/*exRotateBilinearInterpolation*/);
exgauge1.Value(COMVariant::createFromInt(25));
exgauge1.EndUpdate();
}
|
29
|
How can I display an indicator

// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",.Layers().Item(COMVariant::createFromInt(1)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipRectangle,com_Layer,com_Layer1,com_Picture;
anytype var_Background,var_Clip,var_ClipRectangle,var_Layer,var_Layer1,var_Picture;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Linear\\Indicator");
exgauge1.Layers().Count(3);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer).Background(); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Background.png");
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Green_Lights.png");
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipRectangle = com_Clip.Rectangle(); com_ClipRectangle = var_ClipRectangle;
com_ClipRectangle.Height("(100 - value)/100 * height");
com_ClipRectangle.InverseClip(true);
com_Clip.Value(COMVariant::createFromInt(50));
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer1 = var_Layer1;
com_Layer1.Visible(false);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("overlay_top_layer.png");
}
|
28
|
How can I display a gauge

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer = var_Layer;
com_Layer.Brightness(2/*exGreenChannel*/,exgauge1.Value());
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
;
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("A - B",exgauge1.Value(),_Delta));
}
public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Picture;
anytype var_Background,var_Layer,var_Layer1,var_Picture;
;
super();
exgauge1.BeginUpdate();
exgauge1.BackColor(WinApi::RGB2int(217,217,217));
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Guage");
exgauge1.Layers().Count(2);
exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.RotateCenterY("lheight/2 + 78");
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Guage_Background.png");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
com_Layer1.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Guage_Needle.png");
com_Layer1.RotateAngleValid("value < 90 ? value : (value < 180 ? 90 : ( value < 270 ? 270 : value ))");
com_Layer1.RotateAngleToValue("value >= 270 ? (value - 270)/90*50 : (value/90)*50 + 50");
com_Layer1.ValueToRotateAngle("value < 50 ? (270 + value/50*90) : (value - 50)/50 * 90");
com_Layer1.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer1.Brightness(0/*exAllChannels*/,0);
exgauge1.Value(COMVariant::createFromInt(78));
exgauge1.EndUpdate();
}
|
27
|
How can I display a clock (rotate,wolf)

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("sec"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("min"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("hour"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("range"); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.Layers().Item("pointer").Value());
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = -1
;
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("pointer"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.FormatABC("A - B",exgauge1.Layers().Item("pointer").Value(),_Delta));
}
// Timer event - Occurs when the interval elapses.
void onEvent_Timer(int _TickCount)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
exgauge1.Value(exgauge1.FormatABC(" date(`now`)"));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("pointer"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.FormatABC("sin((value/100 mod 100)/100 * 2 * asin(1)) * 100",_TickCount));
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("range"); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.Layers().Item("pointer").Value());
}
public void init()
{
COM com_Background,com_Clip,com_ClipPie,com_Layer,com_Layer1,com_Layer2,com_Layer3,com_Layer4,com_Layer5,com_Layer6,com_Layer7,com_Layer8,com_Picture,com_Picture1,com_Picture2,com_Picture3;
anytype var_Background,var_Clip,var_ClipPie,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Layer6,var_Layer7,var_Layer8,var_Picture,var_Picture1,var_Picture2,var_Picture3;
str var_s,var_s1;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Clock - Wolf");
exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
exgauge1.Layers().Count(9);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Back.png");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
com_Layer1.Key("scale");
com_Layer1.DefaultOffsetX(-90);
com_Layer1.DefaultOffsetY(-150);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Scale.png");
com_Layer1.RotateCenterLayer(1);
com_Layer1.RotateCenterX("(lwidth+181)/2");
com_Layer1.RotateCenterY("(lheight+232)/2");
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer2 = var_Layer2;
com_Layer2.Key("range");
com_Layer2.DefaultOffsetX(exgauge1.Layers().Item("scale").DefaultOffsetX());
com_Layer2.DefaultOffsetY(exgauge1.Layers().Item("scale").DefaultOffsetY());
com_Layer2.RotateCenterLayer(exgauge1.Layers().Item("scale").Index());
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Name("ScalePointerArc.png");
com_Layer2.RotateCenterLayer(exgauge1.Layers().Item("scale").Index());
var_Clip = COM::createFromObject(com_Layer2.Clip()); com_Clip = var_Clip;
var_ClipPie = com_Clip.Pie(); com_ClipPie = var_ClipPie;
com_ClipPie.RadiusX(100);
com_ClipPie.RadiusY(100);
com_ClipPie.CenterX(exgauge1.Layers().Item("scale").RotateCenterX());
com_ClipPie.CenterY(exgauge1.Layers().Item("scale").RotateCenterY());
com_ClipPie.StartAngle(-148);
com_ClipPie.SweepAngle("value/100 * 300");
var_Layer3 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer3 = var_Layer3;
com_Layer3.Key("pointer");
com_Layer3.DefaultOffsetX(exgauge1.Layers().Item("scale").DefaultOffsetX());
com_Layer3.DefaultOffsetY(exgauge1.Layers().Item("scale").DefaultOffsetY());
var_Background = COM::createFromObject(com_Layer3.Background()); com_Background = var_Background;
var_Picture1 = com_Background.Picture(); com_Picture1 = var_Picture1;
com_Picture1.Name("ScalePointer.png");
com_Layer3.RotateCenterLayer(exgauge1.Layers().Item("scale").Index());
com_Layer3.OnDrag(2/*exDoRotate*/);
com_Layer3.DefaultRotateAngle(-148);
com_Layer3.RotateAngleValid("value > 300 ? (value > 330 ? 0 : 300) : value");
com_Layer3.RotateAngleToValue("value / 300 * 100");
com_Layer3.ValueToRotateAngle("value /100 * 300");
var_Layer4 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer4 = var_Layer4;
com_Layer4.Key("bolt");
com_Layer4.DefaultOffsetX(exgauge1.Layers().Item("scale").DefaultOffsetX());
com_Layer4.DefaultOffsetY(exgauge1.Layers().Item("scale").DefaultOffsetY());
var_Background = COM::createFromObject(com_Layer4.Background()); com_Background = var_Background;
var_Picture2 = com_Background.Picture(); com_Picture2 = var_Picture2;
com_Picture2.Name("Bolt.png");
var_Layer5 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(5)); com_Layer5 = var_Layer5;
com_Layer5.Left("(width-512)/2");
com_Layer5.Top("(height-512)/2");
com_Layer5.Height(512);
com_Layer5.Width(512);
com_Layer5.Key("sec");
com_Layer5.OnDrag(2/*exDoRotate*/);
com_Layer5.Selectable(false);
var_Background = COM::createFromObject(com_Layer5.Background()); com_Background = var_Background;
var_Picture3 = COM::createFromObject(com_Background).Picture(); com_Picture3 = var_Picture3;
com_Picture3.Name("second-hand.png");
var_s = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - f";
var_s = var_s + "loor(=:1)) * 60 )) - floor(=:2) ) * 360";
com_Layer5.ValueToRotateAngle(var_s);
com_Layer5.RotateAngleToValue("value / 360 / 24 / 60");
var_Layer6 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(6)); com_Layer6 = var_Layer6;
com_Layer6.Left("(width-512)/2");
com_Layer6.Top("(height-512)/2");
com_Layer6.Height(512);
com_Layer6.Width(512);
com_Layer6.Key("min");
com_Layer6.OnDrag(2/*exDoRotate*/);
com_Layer6.Selectable(false);
var_Background = COM::createFromObject(com_Layer6.Background()); com_Background = var_Background;
var_Picture3 = COM::createFromObject(com_Background).Picture(); com_Picture3 = var_Picture3;
com_Picture3.Name("Minute.png");
var_s1 = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - floor(=";
var_s1 = var_s1 + ":1)) * 360";
com_Layer6.ValueToRotateAngle(var_s1);
com_Layer6.RotateAngleToValue("value / 360 / 24 / 60");
var_Layer7 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(7)); com_Layer7 = var_Layer7;
com_Layer7.Left("(width-512)/2");
com_Layer7.Top("(height-512)/2");
com_Layer7.Height(512);
com_Layer7.Width(512);
com_Layer7.Key("hour");
com_Layer7.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer7.Background()); com_Background = var_Background;
var_Picture3 = COM::createFromObject(com_Background).Picture(); com_Picture3 = var_Picture3;
com_Picture3.Name("Hour.png");
com_Layer7.ValueToRotateAngle("2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )");
com_Layer7.RotateAngleToValue("value / 360 * 0.5");
var_Layer8 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(8)); com_Layer8 = var_Layer8;
com_Layer8.Left("(width-512)/2");
com_Layer8.Top("(height-512)/2");
com_Layer8.Height(512);
com_Layer8.Width(512);
com_Layer8.Key("front");
com_Layer8.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer8.Background()); com_Background = var_Background;
var_Picture3 = COM::createFromObject(com_Background).Picture(); com_Picture3 = var_Picture3;
com_Picture3.Name("front.png");
exgauge1.LayerOfValue(exgauge1.Layers().Item("hour").Index());
exgauge1.Value(exgauge1.FormatABC("date(`now`)"));
exgauge1.TimerInterval(100);
}
|
26
|
How can I display a clock (rotate,vintage)

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("sec"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("min"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("hour"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
;
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("A - 1/24/60/60*B",exgauge1.Value(),_Delta));
}
// Timer event - Occurs when the interval elapses.
void onEvent_Timer(int _TickCount)
{
;
exgauge1.Value(exgauge1.FormatABC("value + 1/24/60/60",exgauge1.Value()));
}
public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Layer2,com_Layer3,com_Layer4,com_Picture;
anytype var_Background,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Picture;
str var_s,var_s1;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Clock - Vintage");
exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
exgauge1.Layers().Count(5);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Back.png");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
com_Layer1.Position(3);
com_Layer1.Left("(width-512)/2");
com_Layer1.Top("(height-512)/2");
com_Layer1.Height(512);
com_Layer1.Width(512);
com_Layer1.Key("sec");
com_Layer1.OnDrag(2/*exDoRotate*/);
com_Layer1.Selectable(false);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("second-hand.png");
var_s = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - f";
var_s = var_s + "loor(=:1)) * 60 )) - floor(=:2) ) * 360";
com_Layer1.ValueToRotateAngle(var_s);
com_Layer1.RotateAngleToValue("value / 360 / 24 / 60");
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer2 = var_Layer2;
com_Layer2.Left("(width-512)/2");
com_Layer2.Top("(height-512)/2");
com_Layer2.Height(512);
com_Layer2.Width(512);
com_Layer2.Position(2);
com_Layer2.Key("min");
com_Layer2.OnDrag(2/*exDoRotate*/);
com_Layer2.Selectable(false);
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Minute.png");
var_s1 = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - floor(=";
var_s1 = var_s1 + ":1)) * 360";
com_Layer2.ValueToRotateAngle(var_s1);
com_Layer2.RotateAngleToValue("value / 360 / 24 / 60");
var_Layer3 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer3 = var_Layer3;
com_Layer3.Left("(width-512)/2");
com_Layer3.Top("(height-512)/2");
com_Layer3.Height(512);
com_Layer3.Width(512);
com_Layer3.Position(1);
com_Layer3.Key("hour");
com_Layer3.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer3.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Hour.png");
com_Layer3.ValueToRotateAngle("2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )");
com_Layer3.RotateAngleToValue("value / 360 * 0.5");
var_Layer4 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer4 = var_Layer4;
com_Layer4.Left("(width-512)/2");
com_Layer4.Top("(height-512)/2");
com_Layer4.Height(512);
com_Layer4.Width(512);
com_Layer4.Position(1);
com_Layer4.Key("front");
com_Layer4.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer4.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("front.png");
com_Layer4.ValueToRotateAngle("2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )");
com_Layer4.RotateAngleToValue("value / 360 * 0.5");
exgauge1.LayerOfValue(3);
exgauge1.Value(exgauge1.FormatABC("date(`now`)"));
exgauge1.TimerInterval(1000);
}
|
25
|
How can I display a clock (rotate,london)

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("sec"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("min"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("hour"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
;
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("A - 1/24/60/60*B",exgauge1.Value(),_Delta));
}
// Timer event - Occurs when the interval elapses.
void onEvent_Timer(int _TickCount)
{
;
exgauge1.Value(exgauge1.FormatABC("value + 1/24/60/60",.Value()));
}
public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Layer2,com_Layer3,com_Layer4,com_Layer5,com_Picture;
anytype var_Background,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Picture;
str var_s,var_s1;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Clock - London");
exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
exgauge1.Layers().Count(6);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Back.png");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
com_Layer1.Position(3);
com_Layer1.Left("(width-512)/2");
com_Layer1.Top("(height-512)/2");
com_Layer1.Height(512);
com_Layer1.Width(512);
com_Layer1.Key("sec");
com_Layer1.OnDrag(2/*exDoRotate*/);
com_Layer1.Selectable(false);
com_Layer1.RotateCenterLayer(1);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("second-hand.png");
var_s = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - f";
var_s = var_s + "loor(=:1)) * 60 )) - floor(=:2) ) * 360";
com_Layer1.ValueToRotateAngle(var_s);
com_Layer1.RotateAngleToValue("value / 360 / 24 / 60");
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer2 = var_Layer2;
com_Layer2.Left("(width-512)/2");
com_Layer2.Top("(height-512)/2");
com_Layer2.Height(512);
com_Layer2.Width(512);
com_Layer2.Position(2);
com_Layer2.RotateCenterLayer(2);
com_Layer2.Key("min");
com_Layer2.OnDrag(2/*exDoRotate*/);
com_Layer2.Selectable(false);
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Minute.png");
var_s1 = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - floor(=";
var_s1 = var_s1 + ":1)) * 360";
com_Layer2.ValueToRotateAngle(var_s1);
com_Layer2.RotateAngleToValue("value / 360 / 24 / 60");
var_Layer3 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer3 = var_Layer3;
com_Layer3.Left("(width-512)/2");
com_Layer3.Top("(height-512)/2");
com_Layer3.Height(512);
com_Layer3.Width(512);
com_Layer3.Position(1);
com_Layer3.Key("hour");
com_Layer3.RotateCenterLayer(3);
com_Layer3.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer3.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Hour.png");
com_Layer3.ValueToRotateAngle("2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )");
com_Layer3.RotateAngleToValue("value / 360 * 0.5");
var_Layer4 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer4 = var_Layer4;
com_Layer4.Left("(width-512)/2");
com_Layer4.Top("(height-512)/2");
com_Layer4.Height(512);
com_Layer4.Width(512);
com_Layer4.Position(1);
com_Layer4.Key("front");
com_Layer4.RotateCenterLayer(4);
com_Layer4.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer4.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("front.png");
com_Layer4.ValueToRotateAngle("2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )");
com_Layer4.RotateAngleToValue("value / 360 * 0.5");
var_Layer5 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(5)); com_Layer5 = var_Layer5;
com_Layer5.Left("(width-512)/2");
com_Layer5.Top("(height-512)/2");
com_Layer5.Height(512);
com_Layer5.Width(512);
com_Layer5.Key("bolt");
com_Layer5.RotateCenterLayer(5);
var_Background = COM::createFromObject(com_Layer5.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Bolt.png");
exgauge1.LayerOfValue(exgauge1.Layers().Item("hour").Index());
exgauge1.Value(exgauge1.FormatABC("date(`now`)"));
exgauge1.TimerInterval(1000);
}
|
24
|
How can I display a clock (rotate)

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("sec"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("min"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("hour"); com_Layer = var_Layer;
com_Layer.Value(exgauge1.Value());
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
;
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
;
exgauge1.Value(exgauge1.FormatABC("A - 1/24/60/60*B",exgauge1.Value(),_Delta));
}
// Timer event - Occurs when the interval elapses.
void onEvent_Timer(int _TickCount)
{
;
exgauge1.Value(exgauge1.FormatABC("value + 1/24/60/60",exgauge1.Value()));
}
public void init()
{
COM com_Background,com_Layer,com_Layer1,com_Layer2,com_Layer3,com_Picture;
anytype var_Background,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Picture;
str var_s,var_s1;
;
super();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Clock");
exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
exgauge1.Layers().Count(4);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("vista_clock.png");
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
com_Layer1.Position(3);
com_Layer1.Key("sec");
com_Layer1.OnDrag(2/*exDoRotate*/);
com_Layer1.Selectable(false);
var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("second-hand.png");
var_s = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - f";
var_s = var_s + "loor(=:1)) * 60 )) - floor(=:2) ) * 360";
com_Layer1.ValueToRotateAngle(var_s);
com_Layer1.RotateAngleToValue("value / 360 / 24 / 60");
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(2)); com_Layer2 = var_Layer2;
com_Layer2.Position(2);
com_Layer2.Key("min");
com_Layer2.OnDrag(2/*exDoRotate*/);
com_Layer2.Selectable(false);
var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Minute.png");
var_s1 = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - floor(=";
var_s1 = var_s1 + ":1)) * 360";
com_Layer2.ValueToRotateAngle(var_s1);
com_Layer2.RotateAngleToValue("value / 360 / 24 / 60");
var_Layer3 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer3 = var_Layer3;
com_Layer3.Position(1);
com_Layer3.Key("hour");
com_Layer3.OnDrag(2/*exDoRotate*/);
var_Background = COM::createFromObject(com_Layer3.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Name("Hour.png");
com_Layer3.ValueToRotateAngle("2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )");
com_Layer3.RotateAngleToValue("value / 360 * 0.5");
exgauge1.LayerOfValue(3);
exgauge1.Value(exgauge1.FormatABC("date(`now`)"));
exgauge1.TimerInterval(1000);
}
|
23
|
How can I clip as a triangle

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug= 287
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipPolygon,com_Layer,com_Picture;
anytype var_Background,var_Clip,var_ClipPolygon,var_Layer,var_Picture;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipPolygon = com_Clip.Polygon(); com_ClipPolygon = var_ClipPolygon;
com_ClipPolygon.Points(3);
com_ClipPolygon.X(0,0);
com_ClipPolygon.Y(0,"height");
com_ClipPolygon.X(1,"width/2");
com_ClipPolygon.Y(1,"value/100*width");
com_ClipPolygon.X(2,"width");
com_ClipPolygon.Y(2,"height");
com_ClipPolygon.InverseClip(true);
com_Clip.Value(COMVariant::createFromInt(50));
}
|
22
|
How can I limit the rotation from 0 to 360 degree, while dragging
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 483
// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Picture.Left("(width-pwidth)/2");
com_Picture.Top("(height-pheight)/2");
com_Picture.Width("pwidth");
com_Picture.Height("pheight");
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateAngle(-45);
}
|
21
|
How can I clip as a pie

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("value + B/360 * 100", Me.Layers(0).UserData, DragInfo.DeltaAngle )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = -1
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipPie,com_Color,com_Layer;
anytype var_Background,var_Clip,var_ClipPie,var_Color,var_Layer;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.Left("(width-128)/2");
com_Layer.Top("(height-128)/2");
com_Layer.Height(128);
com_Layer.Width(128);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(WinApi::RGB2int(0,255,0));
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipPie = com_Clip.Pie(); com_ClipPie = var_ClipPie;
com_ClipPie.InverseClip(true);
com_ClipPie.StartAngle(0);
com_ClipPie.SweepAngle("value/100*360");
com_Clip.Value(COMVariant::createFromInt(15));
}
|
20
|
How can I use a picture to clip the layer

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item("Clip"); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.Layers().Item("Thumb").RotateAngle());
}
public void init()
{
COM com_Clip,com_ClipPicture,com_ClipPie,com_Layer,com_Layer1,com_Layer2;
anytype var_Clip,var_ClipPicture,var_ClipPie,var_Layer,var_Layer1,var_Layer2;
;
super();
exgauge1.BeginUpdate();
exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob 1");
exgauge1.PicturesName("`Layer` + int(value + 1) + `.png`");
exgauge1.Layers().Count(5);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer = var_Layer;
com_Layer.Key("Thumb");
com_Layer.DefaultRotateAngle(-141);
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
com_Layer1.Key("Clip");
var_Clip = com_Layer1.Clip(); com_Clip = var_Clip;
var_ClipPie = COM::createFromObject(com_Clip.Pie()); com_ClipPie = var_ClipPie;
com_ClipPie.SweepAngle("value");
var_ClipPicture = com_Clip.Picture(); com_ClipPicture = var_ClipPicture;
com_ClipPicture.Name(exgauge1.Layers().Item("Clip").Background().Picture().Name());
com_ClipPicture.AlphaTo("128");
var_Layer2 = COM::createFromObject(exgauge1.Layers()).Item("Thumb"); com_Layer2 = var_Layer2;
com_Layer2.RotateAngle(90);
exgauge1.EndUpdate();
}
|
19
|
How do I clip a circle/ellipse

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug= 287
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipEllipse,com_Color,com_Layer;
anytype var_Background,var_Clip,var_ClipEllipse,var_Color,var_Layer;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.Left("(width-128)/2");
com_Layer.Top("(height-128)/2");
com_Layer.Height(128);
com_Layer.Width(128);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(WinApi::RGB2int(0,255,0));
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipEllipse = COM::createFromObject(com_Clip.Ellipse()); com_ClipEllipse = var_ClipEllipse;
com_ClipEllipse.RadiusX("value/100 * width");
com_Clip.Value(COMVariant::createFromInt(25));
}
|
18
|
What InverseClip does

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug= 287
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipRoundRectangle,com_Color,com_Layer;
anytype var_Background,var_Clip,var_ClipRoundRectangle,var_Color,var_Layer;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.Left("(width-128)/2");
com_Layer.Top("(height-128)/2");
com_Layer.Height(128);
com_Layer.Width(128);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(WinApi::RGB2int(0,255,0));
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipRoundRectangle = com_Clip.RoundRectangle(); com_ClipRoundRectangle = var_ClipRoundRectangle;
com_ClipRoundRectangle.Width("value/100 * width");
com_ClipRoundRectangle.RoundRadiusX("width/8");
com_ClipRoundRectangle.RoundRadiusY("height/8");
com_ClipRoundRectangle.InverseClip(true);
com_Clip.Value(COMVariant::createFromInt(50));
}
|
17
|
How do I clip as rectangle (round), from left to right

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug= 287
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipRoundRectangle,com_Color,com_Layer;
anytype var_Background,var_Clip,var_ClipRoundRectangle,var_Color,var_Layer;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.Left("(width-128)/2");
com_Layer.Top("(height-128)/2");
com_Layer.Height(128);
com_Layer.Width(128);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Color = COM::createFromObject(com_Background).Color(); com_Color = var_Color;
com_Color.Value(WinApi::RGB2int(0,255,0));
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipRoundRectangle = com_Clip.RoundRectangle(); com_ClipRoundRectangle = var_ClipRoundRectangle;
com_ClipRoundRectangle.Width("value/100 * width");
com_ClipRoundRectangle.RoundRadiusX("width/8");
com_ClipRoundRectangle.RoundRadiusY("height/8");
com_Clip.Value(COMVariant::createFromInt(50));
}
|
16
|
How do I clip as rectangle, from bottom to top

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug= 287
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipRectangle,com_Layer,com_Picture;
anytype var_Background,var_Clip,var_ClipRectangle,var_Layer,var_Picture;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipRectangle = com_Clip.Rectangle(); com_ClipRectangle = var_ClipRectangle;
com_ClipRectangle.Height("value/100 * height");
com_ClipRectangle.InverseClip(true);
com_Clip.Value(COMVariant::createFromInt(50));
}
|
15
|
How do I clip as rectangle, from top to bottom

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug= 287
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipRectangle,com_Layer,com_Picture;
anytype var_Background,var_Clip,var_ClipRectangle,var_Layer,var_Picture;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipRectangle = COM::createFromObject(com_Clip.Rectangle()); com_ClipRectangle = var_ClipRectangle;
com_ClipRectangle.Height("value/100 * height");
com_Clip.Value(COMVariant::createFromInt(50));
}
|
14
|
How do I clip as rectangle, from right to left

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug= 287
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipRectangle,com_Layer,com_Picture;
anytype var_Background,var_Clip,var_ClipRectangle,var_Layer,var_Picture;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipRectangle = com_Clip.Rectangle(); com_ClipRectangle = var_ClipRectangle;
com_ClipRectangle.Width("value/100 * width");
com_ClipRectangle.InverseClip(true);
com_Clip.Value(COMVariant::createFromInt(50));
}
|
13
|
How do I clip as rectangle, from left to right

// Drag event - Notifies that the user drags the layer.
void onEvent_Drag(COM _DragInfo)
{
// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
;
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug= 287
COM com_Layer;
anytype var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
com_Layer.UserData(com_Layer.Clip().Value());
}
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int _Delta)
{
COM com_Clip,com_Layer;
anytype var_Clip,var_Layer;
;
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Clip = COM::createFromObject(com_Layer).Clip(); com_Clip = var_Clip;
com_Clip.Value(exgauge1.FormatABC("(value + B) MIN 0 MAX 100",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Clip().Value(),_Delta));
}
public void init()
{
COM com_Background,com_Clip,com_ClipRectangle,com_Layer,com_Picture;
anytype var_Background,var_Clip,var_ClipRectangle,var_Layer,var_Picture;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
var_Clip = com_Layer.Clip(); com_Clip = var_Clip;
var_ClipRectangle = COM::createFromObject(com_Clip.Rectangle()); com_ClipRectangle = var_ClipRectangle;
com_ClipRectangle.Width("value/100 * width");
com_Clip.Value(COMVariant::createFromInt(50));
}
|
12
|
How can I associate a value to rotation angle

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("`Value: <b>` + (value format ``) ",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Value()));
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 483
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Picture.Left("(width-pwidth)/2");
com_Picture.Top("(height-pheight)/2");
com_Picture.Width("pwidth");
com_Picture.Height("pheight");
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.DefaultRotateAngle(45);
com_Layer.RotateCenterY("lheight/2 + 32");
com_Layer.RotateCenterX("lwidth/2 + 32");
com_Layer.RotateAngleToValue("value/360 * 100");
com_Layer.ValueToRotateAngle("value / 100 * 360");
com_Layer.Value(COMVariant::createFromInt(50));
}
|
11
|
How can I associate a value to vertical offset

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("`Value: <b>` + (value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Value()));
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 287
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Layer.OnDrag(1/*exDoMove*/);
com_Layer.DefaultOffsetY(-100);
com_Layer.OffsetYValid("value MIN 0 MAX 200");
com_Layer.OffsetXValid(0);
com_Layer.OffsetToValue("offsety /200 * 100");
com_Layer.ValueToOffsetY("value / 100 * 200");
com_Layer.Value(COMVariant::createFromInt(50));
}
|
10
|
How can I associate a value to horizontal offset

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("`Value: <b>` + (value format ``)",exgauge1.Layers().Item(COMVariant::createFromInt(0)).Value()));
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 287
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Layer.OnDrag(1/*exDoMove*/);
com_Layer.DefaultOffsetX(-100);
com_Layer.OffsetXValid("value MIN 0 MAX 200");
com_Layer.OffsetYValid(0);
com_Layer.OffsetToValue("offsetx /200 * 100");
com_Layer.ValueToOffsetX("value / 100 * 200");
com_Layer.Value(COMVariant::createFromInt(50));
}
|
9
|
How can I display the current angle

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("`Angle: <b>` + (value format ``) + `°`",exgauge1.Layers().Item(COMVariant::createFromInt(0)).RotateAngle()));
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 483
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Picture.Left("(width-pwidth)/2");
com_Picture.Top("(height-pheight)/2");
com_Picture.Width("pwidth");
com_Picture.Height("pheight");
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateAngleValid("(value > 180 ? value - 360 : value) MIN 15 MAX 65");
}
|
8
|
How can I limit the rotation angle

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int _Layer)
{
;
exgauge1.Caption(0/*exLayerCaption*/,exgauge1.FormatABC("`Angle: <b>` + (value format ``) + `°`",exgauge1.Layers().Item(COMVariant::createFromInt(0)).RotateAngle()));
}
// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 483
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Picture.Left("(width-pwidth)/2");
com_Picture.Top("(height-pheight)/2");
com_Picture.Width("pwidth");
com_Picture.Height("pheight");
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateAngleValid("(value > 180 ? value - 360 : value) MIN 15 MAX 65");
}
|
7
|
Can I specify a different center while rotating

// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 483
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
com_Layer.RotateType(2/*exRotateBilinearInterpolation*/);
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Picture.Left("(width-pwidth)/2");
com_Picture.Top("(height-pheight)/2");
com_Picture.Width("pwidth");
com_Picture.Height("pheight");
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateAngle(-45);
com_Layer.RotateCenterY("lheight/2 + 32");
com_Layer.RotateCenterX("lwidth/2 + 32");
}
|
6
|
How can I rotate a layer, without cutting off the picture

// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 483
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
com_Layer.Left("(width-512)/2");
com_Layer.Top("(height-512)/2");
com_Layer.Height(512);
com_Layer.Width(512);
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Picture.Left("(width-pwidth)/2");
com_Picture.Top("(height-pheight)/2");
com_Picture.Width("pwidth");
com_Picture.Height("pheight");
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateAngle(-45);
}
|
5
|
How can I rotate a layer

// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 483
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = com_Background.Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Picture.Width("pwidth");
com_Picture.Height("pheight");
com_Layer.OnDrag(2/*exDoRotate*/);
com_Layer.RotateAngle(45);
}
|
4
|
Is there any way to debug the layer while moving

// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM _DragInfo,COMVariant /*bool*/ _Cancel)
{
// DragInfo.Debug = 287
;
}
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Layer.OnDrag(1/*exDoMove*/);
}
|
3
|
How do I specify where to move the layer, while dragging
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Layer.OnDrag(1/*exDoMove*/);
com_Layer.OffsetXValid("int(value / 64) * 64");
com_Layer.OffsetYValid("int(value / 64) * 64");
}
|
2
|
How can I add layers to the control
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
var_Layer = COM::createFromObject(exgauge1.Layers()).Add("back"); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Layer.OnDrag(1/*exDoMove*/);
}
|
1
|
How can I add layers to the control
public void init()
{
COM com_Background,com_Layer,com_Picture;
anytype var_Background,var_Layer,var_Picture;
;
super();
exgauge1.Layers().Count(1);
var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
com_Picture.Value("c:\\exontrol\\images\\card.png");
com_Layer.OnDrag(1/*exDoMove*/);
}
|