value |
string
|
A value that indicates the string representation to get layers from
The layers field defines the control's layers from a string-representation in the following format:
"back[flag=value]...[flag=value],...,back[flag=value]...[flag=value],..."
where:
- "back", (Back/GetBack()/SetBack() methods of exontrol.Gauge.Layer) could be:
- "" {empty string} (no layer background provided)
- "image" {picture's name}, defines the name of a picture previously added using the exontrol.HP.Add(name,...) method. For instance, "pic" indciates that the HTML Picture named "pic" is stretched on the layer's background.
- "color" {string}, indicates a CSS color to be displayed on the layer's background. For instance, "red", "rgba(255,0,0,1)", "#FF0000" indicates a layer full-filed with a solid red-color.
The flag can be any of the following
- [key] {string}, specifies the layer's key (Key/GetKey()/SetKey(value) methods of Layer). The Layers.Item() method retrieves the control's layer giving its index or key. If the key is not specified, the layer's back is considered its key. For instance [key=background] indicates that the layer's key is "background", so you can always request this layer using the Layers.Item("background") method.
- [vis] {0,1}, indicates whether the layer is visible(1) or hidden(0) (Visible/GetVisible()/SetVisible(value) methods of Layer). By default, all layers are visible(1). For instance [vis=0] specifies that the layer is hidden.
- [pos] {number, 0-based}, specifies the layer's position as 0-based (Position/GetPosition()/SetPosition(value) methods of Layer). By default, the position of the layer on the control's background is 0. For instance [pos=1] specifies that the layer should be shown the second.
- [sel] {0,1}, indicates whether the layer is selectable, so the user can drag it (Selectable/GetSelectable()/SetSelectable(value) methods of Layer). By default, all layers are selectable. For instance [sel=0] indicates that user can not select, drag, rotate or move by drag the layer.
- [fore] {string}, specifies the layer's foreground as an HTML caption (can be an expression with "value" keyword which indicates the control's value) (Fore/GetFore()/SetFore(value) methods of Layer). For instance [fore=<b>caption] displays the caption in bold onto the layer's foreground, or "[fore=`` + value]" displays the control's value with a larger font.
- [left] {string}, specifies the expression relative to the view, to determine the x-position to show the layer on the control (Left/GetLeft()/SetLeft(value) methods of Layer). The [left] flag supports the "width" (specifies the width in pixels of the control's view) and "height" (specifies the height in pixels of the control's view) keywords. For instance [left=128] specifies 128-pixels, while [left=width/2] half of the view or x-center of the control's view.
- [top] {string}, specifies the expression relative to the view, to determine the y-position to show the layer on the control (Top/GetTop()/SetTop(value) methods of Layer). The [top] flag supports the "width" (specifies the width in pixels of the control's view) and "height" (specifies the height in pixels of the control's view) keywords. For instance [top=128] specifies 128-pixels, while [top=height/2] half of the view or y-center of the control's view.
- [width] {string}, specifies the expression relative to the view, to determine the width to display the entire-layer on the control (Width/GetWidth()/SetWidth(value) methods of Layer). The [width] flag supports the "width" (specifies the width in pixels of the control's view) and "height" (specifies the height in pixels of the control's view) keywords. For instance [width=128] specifies 128-pixels wide, while [width=width/4] quarter of the view.
- [height] {string}, specifies the expression relative to the view, to determine the height to display the entire-layer on the control (Height/GetHeight()/SetHeight(value) methods of Layer). The [height] flag supports the "width" (specifies the width in pixels of the control's view) and "height" (specifies the height in pixels of the control's view) keywords. For instance [height=128] specifies 128-pixels wide, while [height=height/4] quarter of the view.
- [defX] {number}, indicates the default x-offset of the layer (DefaultOffsetX/GetDefaultOffsetX()/SetDefaultOffsetX(value) methods of Layer). For instance, [defX=-32] specifies that the layer is displayed left to 32-pixels of its default position.
- [defY] {number}, indicates the default y-offset of the layer (DefaultOffsetY/GetDefaultOffsetY()/SetDefaultOffsetY(value) methods of Layer). For instance, [defY=-32] specifies that the layer is displayed to to 32-pixels of its default position.
- [x] {number}, indicates the x-offset of the layer (OffsetX/GetOffsetX()/SetOffsetX(value) methods of Layer). For instance, [x=-32] specifies that the layer is displayed left to 32-pixels of its default position.
- [y] {number}, indicates the y-offset of the layer (OffsetY/GetOffsetY()/SetOffsetY(value) methods of Layer). For instance, [y=-32] specifies that the layer is displayed to to 32-pixels of its default position.
- [drag] {"move","rotate" or "rotamove"}, indicates the transformation ("move","rotate" or "rotamove") of the layer once the user drags it (OnDrag/GetOnDrag()/SetOnDrag(value) methods of Layer). For instance, [drag=rotate] indicates that the layer is rotated once the user drags it.
- [value] {number}, specifies the layer's value (Value/GetValue()/SetValue(value) methods of Layer). For instance, [value=15] changes the layer's value to 15. The [v2a], [v2x] and [v2y] flags are used to converts the layer's value to rotation-angle/x-offset/y-offset.
- [idem] {string}, ensures that the layer's offset and rotation-angle is equal for all idem layers (separated by comma character) (Idem/GetIdem()/SetIdem(value) methods of Layer). For instance, [idem=o1,o5] indicates that the current layer, o1 and o5 have the same offset and rotation-angle.
- [xValid] {string}, validates the x-offset value of the layer using an expression that supports: "value" (specifies the x-offset/y-offset of the layer), "x" (specifies the x-offset of the layer), "y" (specifies the y-offset of the layer), "lwidth" (specifies the width in pixels of the layer's view), "lheight" (specifies the height in pixels of the layer's view), "width" (specifies the width in pixels of the control's view) and "height" (specifies the height in pixels of the control's view) keywords (OffsetXValid/GetOffsetXValid()/SetOffsetXValid(value) methods of Layer). For instance, [xValid=(value MIN 0 MAX 48)] ensures that the layer's x-offset (OffsetX) is always between 0 and 48.
- [yValid] {string}, validates the y-offset value of the layer using an expression that supports: "value" (specifies the x-offset/y-offset of the layer), "x" (specifies the x-offset of the layer), "y" (specifies the y-offset of the layer), "lwidth" (specifies the width in pixels of the layer's view), "lheight" (specifies the height in pixels of the layer's view), "width" (specifies the width in pixels of the control's view) and "height" (specifies the height in pixels of the control's view) keywords (OffsetYValid/GetOffsetYValid()/SetOffsetYValid(value) methods of Layer). For instance, [yValid=(value MIN -height/2 MAX height/2)] ensures that the layer's y-offset (OffsetY) is always between -height/2 and height/2.
- [v2x] {string}, specifies the expression to convert the value to x-offset. The expression supports: "value" (specifies the layer's value) keyword (ValueToOffsetX/GetValueToOffsetX()/SetValueToOffsetX(value) methods of Layer). For instance, [v2x=(value=0) ? 0 : 48] specifies that the x-offset of the layer is 0, if the layer's value is 0 else it is 48.
- [v2y] {string}, specifies the expression to convert the value to y-offset. The expression supports: "value" (specifies the layer's value) keyword (ValueToOffsetY/GetValueToOffsetY()/SetValueToOffsetY(value) methods of Layer). For instance, [v2y=(value=0) ? 0 : 48] specifies that the y-offset of the layer is 0, if the layer's value is 0 else it is 48.
- [o2v] {string}, specifies the expression to convert the x-offset, y-offset to value. The expression supports: "value", "x", "offsetx" indicates the layer's x-offset property, "y", "offsety" indicates the layer's y-offset property keywords (OffsetToValue/GetOffsetToValue()/SetOffsetToValue(value) methods of Layer). For instance, [o2v=x+y/2] specifies that the layer's value is adding x-offset + y-offset divided by 2
- [defA] {number}, specifies the default angle (degree) to rotate the layer (DefaultRotateAngle/GetDefaultRotateAngle()/SetDefaultRotateAngle(value) methods of Layer). For instance, [defA=45] specifies that the default rotation-angle for the layer is 45 degree.
- [a] {number}, specifies the angle (degree) to rotate the layer (RotateAngle/GetRotateAngle()/SetRotateAngle(value) methods of Layer). For instance, [a=90] specifies that the layer's rotation-angle is 90 degree.
- [aValid] {string}, validates the layer's rotation angle using an expression that supports: "value" (indicates the cumulative rotation angle) keyword (RotateAngleValid/GetRotateAngleValid()/SetRotateAngleValid(value) methods of Layer). For instance, [aValid=value < 90 ? value : (value < 180 ? 90 : ( value < 270 ? 270 : value ))] ensures that the layer's rotation-angle is between 90 and 270.
- [xCenter] {string}, indicates the expression that determines the x-origin of the rotation point relative to the RotateCenterLayer layer. The expression supports: "lwidth" (indicates the width in pixels of the layer), "width" (specifies the width in pixels of the view / control), "lheight" (indicates the height in pixels of the layer) and "height" (specifies the height in pixels of the view / control) keywords (RotateCenterX/GetRotateCenterX()/SetRotateCenterX(value) methods of Layer). For instance, [xCenter=lwidth/2-3] defines the rotation-center 3-pixels to the left of the center of the view.
- [yCenter] {string}, indicates the expression that determines the y-origin of the rotation point relative to the RotateCenterLayer layer. The expression supports: "lwidth" (indicates the width in pixels of the layer), "width" (specifies the width in pixels of the view / control), "lheight" (indicates the height in pixels of the layer) and "height" (specifies the height in pixels of the view / control) keywords (RotateCenterX/GetRotateCenterX()/SetRotateCenterX(value) methods of Layer). For instance, [yCenter=lheight/2+23] defines the rotation-center 23-pixels lower of the center of the view.
- [clayer] {(number|string)}, indicates the index or key of the layer the rotation is around. If -1, the rotation is relative to the current layer. For instance, [clayer=-1] ensures that the current layer is rotated around itself.
- [a2v] {string}, specifies the expression to convert the rotating angle to value. The expression supports: "value" (indicates the layer's rotation-angle) keyword (RotateAngleToValue/GetRotateAngleToValue()/SetRotateAngleToValue(value) methods of Layer). For instance, [a2v=round(value/360*100)] converts the layer's rotation angle to a value between 0 and 100.
- [v2a] {string}, specifies the expression to convert the value to rotating angle. The expression supports: "value" (indicates the layer's value) keyword (ValueToRotateAngle/GetValueToRotateAngle()/SetValueToRotateAngle(value) methods of Layer). For instance, [v2a=value/100*360] converts the value between 0 and 100 to a rotation angle between 0 and 360 degree.
- [grayscale] {any}, sets the percent value / expression to convert the layer to grayscale. The grayscale can be a number beween 0 and 100, or a string to define an expression. The expression supports: "value" (indicates the control's value) keyword (Grayscale/GetGrayscale()/SetGrayscale(value) methods of Layer). For instance, [grayscale=100] displays the layer in full-grayscale, or [grayscale=value] specifies that the layer's grayscale percent is indicated by the control's value (ex: the control's value is 25, the layer's grayscale will be 25%)
- [transparency] {any}, sets the percent value / expression of the transparency to display the layer. The transparency can be a number beween 0 and 100, or a string to define an expression. The expression supports: "value" (indicates the control's value) keyword (Transparency/GetTransparency()/SetTransparency(value) methods of Layer). For instance, [transparency=50] displays the layer half-transparent, or [transparency=value] specifies that the layer's transparency percent is indicated by the control's value (ex: the control's value is 75, the layer is displayed 75% transparent)
- [rotateclip] {0,1}, specifies whether the layer's clipping region is rotated once the layer is rotated (RotateClip/GetRotateClip()/SetRotateClip(value) methods of Layer). The [rotateclip] has effect only if the [clip] flag is present for the layer. For instance [rotateClip=1] specifies that the layer's clipping region is rotated once the layer itself is rotated.
- [brightness.red] {string}, specifies the percent value / expression of the red-chanel. The expression supports: "value" (indicates the layer's value) keyword (Red/GetRed()/SetRed(value) methods of LayerColorAdjustment). For instance, [brightness.red=100] adds 100% more red, or [brightness.red=50+value/2] applies more red based on the control's value.
- [brightness.green] {string}, specifies the percent value / expression of the green-chanel. The expression supports: "value" (indicates the layer's value) keyword (Green/GetGreen()/SetGreen(value) methods of LayerColorAdjustment). For instance, [brightness.green=100] adds 100% more green, or [brightness.green=50+value/2] applies more green based on the control's value.
- [brightness.blue] {string}, specifies the percent value / expression of the blue-chanel. The expression supports: "value" (indicates the layer's value) keyword (Blue/GetBlue()/SetBlue(value) methods of LayerColorAdjustment). For instance, [brightness.blue=100] adds 100% more blue, or [brightness.blue=50+value/2] applies more blue based on the control's value.
- [contrast.red] {string}, specifies the percent value / expression of the red-chanel. The expression supports: "value" (indicates the layer's value) keyword (Red/GetRed()/SetRed(value) methods of LayerColorAdjustment). For instance, [contrast.red=100] adds 100% more red, or [contrast.red=50+value/2] applies more red based on the control's value.
- [contrast.green] {string}, specifies the percent value / expression of the green-chanel. The expression supports: "value" (indicates the layer's value) keyword (Green/GetGreen()/SetGreen(value) methods of LayerColorAdjustment). For instance, [contrast.green=100] adds 100% more green, or [contrast.green=50+value/2] applies more green based on the control's value.
- [contrast.blue] {string}, specifies the percent value / expression of the blue-chanel. The expression supports: "value" (indicates the layer's value) keyword (Blue/GetBlue()/SetBlue(value) methods of LayerColorAdjustment). For instance, [contrast.blue=100] adds 100% more blue, or [contrast.blue=50+value/2] applies more blue based on the control's value.
- [clip] {"Rect","RoundRect","Ellipse" or "Pie"}, specifies the type of clipping to apply on the layer (Type/GetType()/SetType(value) method of LayerClip). For instance, [clip=pie][clip.sweep=45] clips a pie of 45 degree
- [clip.value] {number}, indicates the layer clip's value that's the value of "value" keywords within expression-properties such as: [x], [y], [left], [top], [width], [height], [roundX], [roundY], [radiusX], [radiusY], [xCenter], [yCenter], [start] and [sweep] flags of layer's clip. If the [clip.value] is not specified, the control's value is used instead. For instance, [clip.value=50] defines the value of the "value" keyword to 50 for any expression of [x], [y], [left], [top], [width], [height], [roundX], [roundY], [radiusX], [radiusY], [xCenter], [yCenter], [start] and [sweep] flags
- [clip.x] {string}, specifies the x-offset expression / value of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (OffsetX/GetOffsetX()/SetOffsetX(value) method of LayerClip). For instance, [clip.x=120], moves right by 128-pixels the layer's clip, while [clip.x=value] indicates that the entire clip is moved horizontally based on clip/control's value.
- [clip.y] {string}, specifies the y-offset expression / value of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (OffsetY/GetOffsetY()/SetOffsetY(value) method of LayerClip). For instance, [clip.y=-120], moves up by 128-pixels the layer's clip, while [clip.y=value] indicates that the entire clip is moved vertically based on clip/control's value.
- [clip.left] {string}, specifies the left position / expression of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (Left/GetLeft()/SetLeft(value) method of LayerClip). For instance, [clip.left=120], defines the left-margin of the clip at 120 pixels, or [clip.left=32+value] specifies that the clip's left margin is computed based on clip/control's value.
- [clip.top] {string}, specifies the top position / expression of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (Top/GetTop()/SetTop(value) method of LayerClip). For instance, [clip.top=120], defines the top-margin of the clip at 120 pixels, or [clip.top=32+value] specifies that the clip's top margin is computed based on clip/control's value.
- [clip.width] {string}, specifies the width / expression of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (Width/GetWidth()/SetWidth(value) method of LayerClip). For instance, [clip.width=120], defines the clip 120 pixels wide, or [clip.width=value] specifies that the clip's width is computed based on clip/control's value.
- [clip.height] {string}, specifies the height / expression of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (Height/GetHeight()/SetHeight(value) method of LayerClip). For instance, [clip.height=120], defines the clip 120 pixels tall, or [clip.height=value] specifies that the clip's height is computed based on clip/control's value.
- [clip.roundX] {string}, indicates the x-radius value / expression of the round corner, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (RoundRadiusX/GetRoundRadiusX()/SetRoundRadiusX(value) method of LayerClip). For instance, [clip.roundX=16][clip.roundY=16], defines a round-radius of 16 pixels, while [clip.roundX=value][clip.roundY=value] defines the clip's round-radius based on the clip/control's value. The [clip.roundX] and [clip.roundY] flags are valid only for [clip=RoundRect].
- [clip.roundY] {string}, indicates the y-radius value / expression of the round corner, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (RoundRadiusY/GetRoundRadiusY()/SetRoundRadiusY(value) method of LayerClip). For instance, [clip.roundX=16][clip.roundY=16], defines a round-radius of 16 pixels, while [clip.roundX=value][clip.roundY=value] defines the clip's round-radius based on the clip/control's value. The [clip.roundX] and [clip.roundY] flags are valid only for [clip=RoundRect].
- [clip.radiusX] {string}, specifies the x-radius value / expression of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (RadiusX/GetRadiusX()/SetRadiusX(value) method of LayerClip). For instance, [clip.radiusX=128], defines clip's x-radius to 128 pixels, while [clip.radiusX=value] specifies that the clip's x-radius is computed based on the clip/control's value. The [clip.radiusX] and [clip.radiusY] flags are valid only for [clip=Ellipse] or [clip=Pie].
- [clip.radiusY] {string}, specifies the y-radius value / expression of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (RadiusY/GetRadiusY()/SetRadiusY(value) method of LayerClip). For instance, [clip.radiusY=128], defines clip's y-radius to 128 pixels, while [clip.radiusY=value] specifies that the clip's y-radius is computed based on the clip/control's value. The [clip.radiusX] and [clip.radiusY] flags are valid only for [clip=Ellipse] or [clip=Pie].
- [clip.xCenter] {string}, indicates the x-position / expression of the center of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (CenterX/GetCenterX()/SetCenterX(value) method of LayerClip). For instance, [clip.xCenter=128], defines clip's x-center to 128 pixels, while [clip.xCenter=value] specifies that the clip's x-center is computed based on the clip/control's value. The [clip.xCenter] and [clip.yCenter] flags are valid only for [clip=Ellipse] or [clip=Pie].
- [clip.yCenter] {string}, indicates the y-position / expression of the center of the clip, relative to the layer. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (CenterY/GetCenterY()/SetCenterY(value) method of LayerClip). For instance, [clip.yCenter=128], defines clip's y-center to 128 pixels, while [clip.yCenter=value] specifies that the clip's y-center is computed based on the clip/control's value. The [clip.xCenter] and [clip.yCenter] flags are valid only for [clip=Ellipse] or [clip=Pie].
- [clip.start] {string}, indicates the pie's starting angle (degree) relative to the y-axis. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (StartAngle/GetStartAngle()/SetStartAngle(value) method of LayerClip). For instance, [clip.start=90], defines the pie's starting angle to 90 degree, or [clip.start=value] defines the pie's starting angle based on the clip/control's value. The [clip.start] and [clip.sweep] flags are valid only for [clip=Pie].
- [clip.sweep] {string}, indicates the pie's sweep angle (degree) relative to clip's starting angle. The expression supports the following keywords: "value" (specifies the clip's value pointed by the clip/control's Value property), "width" or "lwidth" (indicates the width in pixels of the layer), "height" or "lheight" (indicates the height in pixels of the layer) (SweepAngle/GetSweepAngle()/SetSweepAngle(value) method of LayerClip). For instance, [clip.sweep=45], defines the pie's sweep angle to 45 degree, or [clip.sweep=value] defines the pie's sweep angle based on the clip/control's value. The [clip.start] and [clip.sweep] flags are valid only for [clip=Pie].
|