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

From Flowcode Help
Jump to navigationJump to search
 
(14 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
==Slider control component==
 
==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.  
 
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.  
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_slider.fcfx FC_Comp_Source_slider.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_slider.fcfx FC_Comp_Source_slider.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
Line 22: Line 50:
  
  
Simple example showing how to use the simulation slider component as a meter display for use in monitoring type applications.
 
{{Fcfile|Meters.fcfx|Meters}}
 
  
==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" | 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''
 
|}
 
  
  
{| 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 current value of the slider.  This will override any value set by using the mouse. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Value
 
|-
 
| colspan="2" | The value 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;" | '''SetInteractive'''
 
|-
 
| colspan="2" | Set whether the mouse can be used to change the slider value. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Enable
 
|-
 
| colspan="2" | Set true to allow clicks to set scale 
 
|-
 
| 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;" | '''ShowScale'''
 
|-
 
| colspan="2" | Set whether graduated marking are shown along the length of the slider. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Show
 
|-
 
| colspan="2" | True to show scale, else false 
 
|-
 
| 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 the minimum and maximum values that can be shown on the slider. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Min
 
|-
 
| colspan="2" | Min (start) value 
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Max
 
|-
 
| colspan="2" | Maximum (end) value 
 
|-
 
| 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;" | '''SetMarks'''
 
|-
 
| colspan="2" | Decides on the presentation of the dial 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Marks
 
|-
 
| colspan="2" | Number of marks on the dial 
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Subs
 
|-
 
| colspan="2" | Number of marks before a 'main' mark - can be zero 
 
|-
 
| 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;" | '''ClearArea'''
 
|-
 
| colspan="2" | Clears the draw area 
 
|-
 
|-
 
| 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" | Sets the min-max range to draw on the dial Used for setting the needle 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Start
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | End
 
|-
 
| colspan="2" |  
 
|-
 
| 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;" | '''SetGaps'''
 
|-
 
| colspan="2" | Sets the min-max of the span to draw on the X/Y marks Defaults are 0 and 1 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Start
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | End
 
|-
 
| colspan="2" |  
 
|-
 
| 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;" | '''SetJustify'''
 
|-
 
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | RAlign
 
|-
 
| colspan="2" | True for right/top/outer alignment 
 
|-
 
| 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''
 
|}
 
  
  
 +
Simple example showing how to use the simulation slider component as a meter display for use in monitoring type applications.
 +
{{Fcfile|Meters.fcfx|Meters}}
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
==Macro reference==
 +
 +
===GetValue===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CalcAngle'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue'''
 
|-
 
|-
| colspan="2" | Decide the angle to display at given a range value 
+
| colspan="2" | Gets the current value of the slider.  This will be within the range set by the SetRange macro. 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | RangeVal
 
 
|-
 
|-
| colspan="2" |  
 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -  
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SetInteractive===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPivotPos'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetInteractive'''
 
|-
 
|-
| colspan="2" | Sets the position of the object the lever rotates around  
+
| colspan="2" | Set whether the mouse can be used to change the slider value. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:]] -  
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | PositionHandle
+
| width="90%" | Enable
 
|-
 
|-
| colspan="2" | A handle to the position of the depressed location 
+
| colspan="2" | Set true to allow clicks to set scale 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 253: Line 120:
  
  
 +
===SetRange===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoReset'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRange'''
 
|-
 
|-
| 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  
+
| colspan="2" | Set the minimum and maximum values that can be shown on the slider. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:]] -  
+
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | State
+
| width="90%" | Min
 
|-
 
|-
| colspan="2" | Set true to reset to off on sim stop, else false to retain state 
+
| colspan="2" | Min (start) value 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Max
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Maximum (end) value 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLatching'''
 
|-
 
| colspan="2" | Sets whether the button is depressed when the mouse is released 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Enabled
 
|-
 
| colspan="2" |  
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 289: Line 144:
  
  
 +
===SetValue===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Unregister'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue'''
 
|-
 
|-
| colspan="2" | Removes the object to the list if present 
+
| colspan="2" | Set the current value of the slider.  This will override any value set by using the mouse. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:]] -  
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Target
+
| width="90%" | Value
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The value to set. 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 307: Line 163:
  
  
 +
===ShowScale===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMovementFor'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShowScale'''
 
|-
 
|-
| colspan="2" | Sets the movement in units or PI/16 steps for the button 
+
| colspan="2" | Set whether graduated marking are shown along the length of the slider. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:]] -  
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Target
+
| width="90%" | Show
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | True to show scale, else false 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Move
 
|-
 
| colspan="2" | Movement to set to, default 4 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  
Line 338: Line 188:
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
 
|-
 
|-
 
|}
 
|}

Latest revision as of 13:14, 7 February 2023

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.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_slider.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_slider.fcfx

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






Macro reference

GetValue

Fc9-comp-macro.png GetValue
Gets the current value of the slider. This will be within the range set by the SetRange macro. 
Fc9-f32-icon.png - FLOAT Return


SetInteractive

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


SetRange

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


SetValue

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


ShowScale

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


Property reference

Fc9-prop-icon.png Properties