Difference between revisions of "Component: Scale Linear Template (Advanced Shapes)"
From Flowcode Help
Jump to navigationJump to search(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {| style="width:50%" | |
− | |||
− | {| | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| Matrix Ltd | | Matrix Ltd | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
− | | 1.2 | + | | 1.2 |
|- | |- | ||
− | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| Advanced Shapes | | Advanced Shapes | ||
|} | |} | ||
+ | ==Scale Linear Template component== | ||
+ | A base component for drawing scales on horizontal or vertical strips. Can be used to simplify the building of rulers, meters and slider controls. Mouse handling is built in for easy construction of interactive controls. | ||
− | == | + | ==Component Pack== |
− | |||
− | |||
− | |||
− | + | FREE | |
− | + | ==Detailed description== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ''No detailed description exists yet for this component'' | ||
− | == | + | ==Examples== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | '' | + | ''<span style="color:red;">No additional examples</span>'' |
− | + | ==Downloadable macro reference== | |
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue''' | ||
+ | |- | ||
+ | | colspan="2" | Get the current value from the scale. Will be either the most recent value set by "SetValue", or, if set to "Control" mode, the latest mouse clicked value. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :[[ | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue''' | ||
+ | |- | ||
+ | | colspan="2" | Set the value for the scale. If a pointer object is defined, it will move to point at the new value. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" | Value | ||
+ | |- | ||
+ | | colspan="2" | Value to set - will be constrained to the minumum-maximum range. | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | Set the | + | |- |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLabel''' | ||
+ | |- | ||
+ | | colspan="2" | Set the text of the component's label. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" | Text | ||
+ | |- | ||
+ | | colspan="2" | New text to set. | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
− | : | + | |- |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRange''' | |
− | + | |- | |
− | + | | colspan="2" | Set new maximum and minimum values for the scale. | |
− | : | + | |- |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | |
− | == | + | | width="90%" | Minimum |
− | + | |- | |
− | + | | colspan="2" | The minimum value of the scale (Bottom of the component) | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | |
− | + | | width="90%" | Maximum | |
− | :: | + | |- |
− | + | | colspan="2" | The maximum value of the scale (Top of the component) | |
− | + | |- | |
− | ''' | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
− | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | |
− | + | |} | |
− | |||
− | |||
− | |||
− | Set new maximum and minimum values for the scale. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 109: | Line 112: | ||
==Property reference== | ==Property reference== | ||
− | |||
− | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]] | |
− | + | | width="90%" | Pointer | |
− | + | |- | |
− | + | | colspan="2" | Sets an object to act as the pointer for the scale. If in 'Display' mode, the pointer will move to show the incoming "SetValue" numbers. In "Control" mode, it will act as an object for setting the value using mouse clicks/drags. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]] | |
− | + | | width="90%" | Track | |
− | + | |- | |
− | + | | colspan="2" | An object to represent a 'track' parallel to the scale upon which the moving part travels. If the scale is resized or moved, the 'track' object will also be scaled or moved. For example, the 'track' object could be a simple black rectangle to represent the 'slot' in which a slider control moves. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Orientation | |
− | + | |- | |
− | + | | colspan="2" | Whether the scale and/or motion should be along the X-axis (horizontal) or Y-axis (vertical) | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Function | |
− | + | |- | |
− | Whether the scale and/or motion should be along the X-axis (horizontal) or Y-axis (vertical) | + | | colspan="2" | Set the mode of the component... Display - the pointer object moves only when a value is set using the 'SetValue' macro. Control - the pointer can be moved using the mouse to set a new value, which can then be read using the 'GetValue' macro. |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Style | |
− | + | |- | |
− | + | |- | |
− | Set the mode of the component... | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] |
− | + | | width="90%" | Resolution | |
− | Display - the pointer object moves only when a value is set using the 'SetValue' macro. | + | |- |
− | + | | colspan="2" | Determines the amount of detail in the scale graphics - larger values will require more memory and/or loading time etc. | |
− | Control - the pointer can be moved using the mouse to set a new value, which can then be read using the | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] | |
− | 'GetValue' macro. | + | | width="90%" | BG Color |
− | + | |- | |
− | + | | colspan="2" | Colour of the background object. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | + | | width="90%" | Positive Color | |
− | + | |- | |
− | + | | colspan="2" | Markings colour for positive scale values. | |
− | and/or loading time etc. | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | + | | width="90%" | Negative Color | |
− | + | |- | |
− | + | | colspan="2" | Markings colour for negative values. | |
− | + | |- | |
− | Colour of the background object. | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] |
− | + | | width="90%" | Label Color | |
− | + | |- | |
− | + | | colspan="2" | Color for the text label. | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Line | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Offset % | |
− | + | |- | |
− | + | | colspan="2" | Distance of the main line from the left or bottom of the component. % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Start % | |
− | + | |- | |
− | + | | colspan="2" | Start position of the scale from the left/bottom of the component. % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | End % | |
− | + | |- | |
− | + | | colspan="2" | End position of the scale from the left/bottom of the component. % of component size. | |
− | + | |- | |
− | Distance of the main line from the left or bottom of the component. % of component size. | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] |
− | + | | width="90%" | Thickness | |
− | + | |- | |
− | + | | colspan="2" | Thickness of the main scale line. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | Start position of the scale from the left/bottom of the component. % of component size. | + | | width="90%" | Show |
− | + | |- | |
− | + | | colspan="2" | Whether to show or hide the main scale line. | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Marks | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Divisions | |
− | + | |- | |
− | + | | colspan="2" | Number of major divisions of the scale - these can be numbered. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Offset % | |
− | + | |- | |
− | + | | colspan="2" | Position of the division lines across the scale - % of component size,. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Thickness | |
− | + | |- | |
− | + | | colspan="2" | Thickness of the division lines. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Subdivisions | |
− | + | |- | |
− | + | | colspan="2" | Number of smaller divsions between the numbered ones. Set to zero if not required. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Subs Offset | |
− | Position of the division lines across the scale - % of component size,. | + | |- |
− | + | | colspan="2" | Position of the sub-division line ends. % of width across the component. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Subs Thickness | |
− | + | |- | |
− | + | | colspan="2" | Thickness of the sub-division lines.. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Show | |
− | + | |- | |
− | + | | colspan="2" | Whether to show or hide the divisions and sub-divisions. | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Numbers | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Maximum | |
− | + | |- | |
− | + | | colspan="2" | Maximum number to show on the scale. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Minimum | |
− | + | |- | |
− | + | | colspan="2" | Minimum number to show on the scale. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Decimals | |
− | + | |- | |
− | + | | colspan="2" | Number of decimal places to show on the numbers. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Offset % | |
− | + | |- | |
− | + | | colspan="2" | Distance acrross the scale width to show the numbers. % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Text Size % | |
− | + | |- | |
− | + | | colspan="2" | Text height of the scale numbers. % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-3-icon.png]] | |
− | + | | width="90%" | Font | |
− | + | |- | |
− | + | | colspan="2" | Font for the scale numbers. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Show | |
− | + | |- | |
− | + | | colspan="2" | Whether to show or hide the scale numbers. | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Label | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Text | |
− | + | |- | |
− | + | | colspan="2" | Text label for the component to aid identification. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Offset X % | |
− | + | |- | |
− | + | | colspan="2" | X - position of the label. % of Width. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Offset Y % | |
− | + | |- | |
− | + | | colspan="2" | Y position of label. % of height. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Text Size % | |
− | + | |- | |
− | + | | colspan="2" | Text size of label. % of component size. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-3-icon.png]] | |
− | + | | width="90%" | Font | |
− | + | |- | |
− | + | | colspan="2" | Font for the component label. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Show | |
− | + | |- | |
− | + | | colspan="2" | Whether to show or hide the text label. | |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 17:22, 9 November 2022
Author | Matrix Ltd |
Version | 1.2 |
Category | Advanced Shapes |
Contents
Scale Linear Template component
A base component for drawing scales on horizontal or vertical strips. Can be used to simplify the building of rulers, meters and slider controls. Mouse handling is built in for easy construction of interactive controls.
Component Pack
FREE
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
![]() |
GetValue |
Get the current value from the scale. Will be either the most recent value set by "SetValue", or, if set to "Control" mode, the latest mouse clicked value. | |
![]() |
Return |
![]() |
SetLabel |
Set the text of the component's label. | |
![]() |
Text |
New text to set. | |
![]() |
Return |