Difference between revisions of "Component: Slider control (Advanced Shapes)"

From Flowcode Help
Jump to navigationJump to search
(XML import - Pre 8.0 release)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| 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.1 (Release)
+
| 1.1
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Advanced Shapes
 
| Advanced Shapes
 
|}
 
|}
  
  
 +
==Slider control component==
 +
A simple graphical interface for a vertical meter or slider control.  This can be used within custom components to give them a way to display an analogue value, or to allow setting a value by clicking and dragging with the mouse.
  
==[[File:Component Icon 0d074f2e_5ff6_45d2_a0a8_1b5c3aa34e41.png|Image]] Slider control component==
+
==Detailed description==
A simple graphical interface for a vertical meter or slider control.  This can be used within
 
custom components to give them a way to display an analogue value, or to allow setting
 
a value by clicking and dragging with the mouse.
 
  
 +
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
 
Simple example showing how to use the simulation slider component as a meter display for use in monitoring type applications.
 
Simple example showing how to use the simulation slider component as a meter display for use in monitoring type applications.
 
{{Fcfile|Meters.fcfx|Meters}}
 
{{Fcfile|Meters.fcfx|Meters}}
Line 27: Line 27:
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
''This component does not contain any downloadable macros''
+
{| 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" | Gets the current value of the slider.  This will be within the range set by the SetRange macro. 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
==Simulation macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>GetValue</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Gets the current value of the slider.  This will be within the range set by the
+
|-
 +
| 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 current value of the slider.  This will override any value set by using the mouse.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" | The value to set.&nbsp;
 +
|-
 +
| 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''
 +
|}
  
SetRange macro.
 
  
'''Parameters'''
+
{| 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;" | '''SetInteractive'''
 +
|-
 +
| colspan="2" | Set whether the mouse can be used to change the slider value.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Enable
 +
|-
 +
| colspan="2" | Set true to allow clicks to set scale&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:''This macro has no parameters''
 
  
 +
{| 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;" | '''ShowScale'''
 +
|-
 +
| colspan="2" | Set whether graduated marking are shown along the length of the slider.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Show
 +
|-
 +
| colspan="2" | True to show scale, else false&nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|FLOAT]]
+
{| 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 the minimum and maximum values that can be shown on the slider.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Min
 +
|-
 +
| colspan="2" | Min (start) value&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Max
 +
|-
 +
| colspan="2" | Maximum (end) value&nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>SetValue</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Set the current value of the slider.  This will override any value set by using the mouse.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMarks'''
 +
|-
 +
| colspan="2" | Decides on the presentation of the dial&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Marks
 +
|-
 +
| colspan="2" | Number of marks on the dial&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Subs
 +
|-
 +
| colspan="2" | Number of marks before a 'main' mark - can be zero&nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|FLOAT]] ''Value''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::The value to set.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClearArea'''
 +
|-
 +
| colspan="2" | Clears the draw area&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
{| 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" | Sets the min-max range to draw on the dial Used for setting the needle&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Start
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | End
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
:''This call does not return a value''
 
  
 +
{| 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;" | '''SetGaps'''
 +
|-
 +
| colspan="2" | Sets the min-max of the span to draw on the X/Y marks Defaults are 0 and 1&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Start
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | End
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>SetInteractive</tt></u></span>===
 
Set whether the mouse can be used to change the slider value.
 
  
'''Parameters'''
+
{| 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;" | '''SetJustify'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | RAlign
 +
|-
 +
| colspan="2" | True for right/top/outer alignment&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|BOOL]] ''Enable''
 
::Set true to allow clicks to set scale
 
  
 +
{| 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;" | '''CalcAngle'''
 +
|-
 +
| colspan="2" | Decide the angle to display at given a range value&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | RangeVal
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
{| 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;" | '''SetPivotPos'''
 +
|-
 +
| colspan="2" | Sets the position of the object the lever rotates around &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | PositionHandle
 +
|-
 +
| colspan="2" | A handle to the position of the depressed location&nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>SetTitle</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
''<span style="color:red;">No additional information</span>''
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoReset'''
 +
|-
 +
| colspan="2" | Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | State
 +
|-
 +
| colspan="2" | Set true to reset to off on sim stop, else false to retain state&nbsp;
 +
|-
 +
| 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;" | '''SetLatching'''
 +
|-
 +
| colspan="2" | Sets whether the button is depressed when the mouse is released&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Enabled
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| 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;" | '''Unregister'''
 +
|-
 +
| colspan="2" | Removes the object to the list if present&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
{| 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;" | '''SetMovementFor'''
 +
|-
 +
| colspan="2" | Sets the movement in units or PI/16 steps for the button&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Move
 +
|-
 +
| colspan="2" | Movement to set to, default 4&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>ShowScale</tt></u></span>===
 
Set whether graduated marking are shown along the length of the slider.
 
  
'''Parameters'''
+
==Property reference==
  
:[[Variable Types|BOOL]] ''Show''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::True to show scale, else false
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
'''Return value'''
+
|-
 
+
|-
:''This call does not return a value''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
 
+
|-
===<span style="font-weight: normal;"><u><tt>SetRange</tt></u></span>===
+
|-
Set the minimum and maximum values that can be shown on the slider.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
'''Parameters'''
+
|-
 
+
|}
:[[Variable Types|INT]] ''Min''
 
::Min (start) value
 
 
 
:[[Variable Types|INT]] ''Max''
 
::Maximum (end) value
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
 
 
 
 
==Property reference==
 
''This component does not contain any properties''
 

Revision as of 16:14, 16 November 2021

Author Matrix Ltd
Version 1.1
Category Advanced Shapes


Slider control component

A simple graphical interface for a vertical meter or slider control. This can be used within custom components to give them a way to display an analogue value, or to allow setting a value by clicking and dragging with the mouse.

Detailed description

No detailed description exists yet for this component

Examples

Simple example showing how to use the simulation slider component as a meter display for use in monitoring type applications. FC6 Icon.png Meters

Downloadable macro reference

Fc9-comp-macro.png GetValue
Gets the current value of the slider. This will be within the range set by the SetRange macro. 
[[File:]] - Return


Fc9-comp-macro.png SetValue
Set the current value of the slider. This will override any value set by using the mouse. 
[[File:]] - Value
The value to set. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetInteractive
Set whether the mouse can be used to change the slider value. 
[[File:]] - Enable
Set true to allow clicks to set scale 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ShowScale
Set whether graduated marking are shown along the length of the slider. 
[[File:]] - Show
True to show scale, else false 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetRange
Set the minimum and maximum values that can be shown on the slider. 
[[File:]] - Min
Min (start) value 
[[File:]] - Max
Maximum (end) value 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetMarks
Decides on the presentation of the dial 
[[File:]] - Marks
Number of marks on the dial 
[[File:]] - Subs
Number of marks before a 'main' mark - can be zero 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ClearArea
Clears the draw area 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetRange
Sets the min-max range to draw on the dial Used for setting the needle 
[[File:]] - Start
 
[[File:]] - End
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetGaps
Sets the min-max of the span to draw on the X/Y marks Defaults are 0 and 1 
[[File:]] - Start
 
[[File:]] - End
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetJustify
 
[[File:]] - RAlign
True for right/top/outer alignment 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CalcAngle
Decide the angle to display at given a range value 
[[File:]] - RangeVal
 
[[File:]] - Return


Fc9-comp-macro.png SetPivotPos
Sets the position of the object the lever rotates around  
[[File:]] - PositionHandle
A handle to the position of the depressed location 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetAutoReset
Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop  
[[File:]] - State
Set true to reset to off on sim stop, else false to retain state 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetLatching
Sets whether the button is depressed when the mouse is released 
[[File:]] - Enabled
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Unregister
Removes the object to the list if present 
[[File:]] - Target
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetMovementFor
Sets the movement in units or PI/16 steps for the button 
[[File:]] - Target
 
[[File:]] - Move
Movement to set to, default 4 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations