Difference between revisions of "Component: Button helper (Helpers)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(11 intermediate revisions by the same user not shown)
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
 
| Helpers
 
| Helpers
 
|}
 
|}
  
  
 
+
==Button helper component==
==[[File:Component Icon 3005c264_3a6d_412a_97dc_2569ed8c149c.png|Image]] Button helper component==
 
 
A button overlay that allows any object to behave like a button
 
A button overlay that allows any object to behave like a button
  
==Examples==
+
==Component Source Code==
''<span style="color:red;">No additional examples</span>''
 
  
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_buttonhelper.fcfx FC_Comp_Source_buttonhelper.fcfx]
  
==Downloadable macro reference==
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_buttonhelper.fcfx FC_Comp_Source_buttonhelper.fcfx]
  
''This component does not contain any downloadable macros''
+
==Detailed description==
  
==Simulation macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>GetStateFor</tt></u></span>===
 
Returns true if the button is depressed, else false
 
  
'''Parameters'''
 
  
:[[Variable Types|HANDLE]] ''Target''
 
  
  
'''Return value'''
 
  
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
 
  
  
===<span style="font-weight: normal;"><u><tt>Clear</tt></u></span>===
 
Clears all objects from the lists
 
  
This leaves no links for the button helper
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
+
''No detailed description exists yet for this component''
  
 +
==Examples==
  
===<span style="font-weight: normal;"><u><tt>SetDisabledPos</tt></u></span>===
 
Sets the position of the released button
 
  
'''Parameters'''
 
  
:[[Variable Types|HANDLE]] ''PositionHandle''
 
::A handle to the position of the depressed location
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetEnabledPos</tt></u></span>===
 
Sets the position of the depressed button
 
  
'''Parameters'''
 
  
:[[Variable Types|HANDLE]] ''PositionHandle''
 
::A handle to the position of the depressed location
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetAxis</tt></u></span>===
 
Sets the movement axis as an Axis_... constant
 
  
'''Parameters'''
+
''<span style="color:red;">No additional examples</span>''
  
:[[Variable Types|BYTE]] ''Axis''
 
::Movement axis to set to, default 4
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetDisabledPosFor</tt></u></span>===
 
Sets the disabled position for an object
 
  
'''Parameters'''
 
  
:[[Variable Types|HANDLE]] ''Target''
 
  
:[[Variable Types|HANDLE]] ''Position''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
+
==Macro reference==
  
 +
===Clear===
 +
{| 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;" | '''Clear'''
 +
|-
 +
| colspan="2" | Clears all objects from the lists This leaves no links for the button helper&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>GetTarget</tt></u></span>===
 
Gets the target handle the property links to
 
  
'''Parameters'''
+
===GetState===
 +
{| 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;" | '''GetState'''
 +
|-
 +
| colspan="2" | Returns true if the button is depressed, else false&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''This macro has no parameters''
 
  
 +
===GetStateFor===
 +
{| 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;" | '''GetStateFor'''
 +
|-
 +
| colspan="2" | Returns true if the button is depressed, else false&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|HANDLE]] : The component linked to the control by property
+
===GetTarget===
 +
{| 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;" | '''GetTarget'''
 +
|-
 +
| colspan="2" | Gets the target handle the property links to&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>GetState</tt></u></span>===
+
===Register===
Returns true if the button is depressed, else false
+
{| 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;" | '''Register'''
 +
|-
 +
| colspan="2" | Adds the object to the list if not already there&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
===SetAutoReset===
 +
{| 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;" | '''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:Fc9-bool-icon.png]] - BOOL
 +
| 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''
 +
|}
  
  
'''Return value'''
+
===SetAxis===
 +
{| 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;" | '''SetAxis'''
 +
|-
 +
| colspan="2" | Sets the movement axis as an Axis_... constant&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Axis
 +
|-
 +
| colspan="2" | Movement axis 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''
 +
|}
  
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
 
  
 +
===SetAxisFor===
 +
{| 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;" | '''SetAxisFor'''
 +
|-
 +
| colspan="2" | Sets the movement axis as an Axis_... constant&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Axis
 +
|-
 +
| colspan="2" | Movement axis 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>Register</tt></u></span>===
 
Adds the object to the list if not already there
 
  
'''Parameters'''
+
===SetDisabledPos===
 +
{| 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;" | '''SetDisabledPos'''
 +
|-
 +
| colspan="2" | Sets the position of the released button &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| 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''
 +
|}
  
:[[Variable Types|HANDLE]] ''Target''
 
  
 +
===SetDisabledPosFor===
 +
{| 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;" | '''SetDisabledPosFor'''
 +
|-
 +
| colspan="2" | Sets the disabled position for an object&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Position
 +
|-
 +
| 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'''
 
  
:''This call does not return a value''
+
===SetEnabledPos===
 +
{| 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;" | '''SetEnabledPos'''
 +
|-
 +
| colspan="2" | Sets the position of the depressed button &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| 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>SetNotify</tt></u></span>===
+
===SetEnabledPosFor===
Sets the object to notify when the button is pressed or released
+
{| 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;" | '''SetEnabledPosFor'''
 +
|-
 +
| colspan="2" | Sets the enabled position for an object&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Position
 +
|-
 +
| 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'''
 
  
:[[Variable Types|HANDLE]] ''Handle''
+
===SetLatching===
::The handle of the object - 0 to use the caller object
+
{| 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:Fc9-bool-icon.png]] - BOOL
 +
| 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''
 +
|}
  
:[[Variable Types|ULONG]] ''Ident''
 
::The identifier to send in the System.Notify message
 
  
 +
===SetLatchingFor===
 +
{| 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;" | '''SetLatchingFor'''
 +
|-
 +
| colspan="2" | Sets whether the button is depressed when the mouse is released&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
===SetMode===
 +
{| 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;" | '''SetMode'''
 +
|-
 +
| colspan="2" | Sets the animation mode for the button&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Mode
 +
|-
 +
| colspan="2" | 0=User, 1=Up/Down, 2 = Lever&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>SetLatchingFor</tt></u></span>===
+
===SetModeFor===
Sets whether the button is depressed when the mouse is released
+
{| 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;" | '''SetModeFor'''
 +
|-
 +
| colspan="2" | Sets the animation mode for the button&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | The target object, 0 for 'set default'&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Mode
 +
|-
 +
| colspan="2" | 0=User, 1=Up/Down, 2 = Lever&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|HANDLE]] ''Target''
+
===SetMovement===
 +
{| 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;" | '''SetMovement'''
 +
|-
 +
| colspan="2" | Sets the movement in units or PI/16 steps for the button&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Move
 +
|-
 +
| colspan="2" | Movement to set to - default is 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''
 +
|}
  
:[[Variable Types|BOOL]] ''Enabled''
 
  
 +
===SetMovementFor===
 +
{| 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:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
===SetNotify===
 +
{| 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;" | '''SetNotify'''
 +
|-
 +
| colspan="2" | Sets the object to notify when the button is pressed or released &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Handle
 +
|-
 +
| colspan="2" | The handle of the object - 0 to use the caller object&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
 +
| width="90%" | Ident
 +
|-
 +
| colspan="2" | The identifier to send in the System.Notify message&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>SetMode</tt></u></span>===
+
===SetPivotPos===
Sets the animation mode for the button
+
{| 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:Fc9-h32-icon.png]] - HANDLE
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Mode''
+
===SetPivotPosFor===
::0=User, 1=Up/Down, 2 = Lever
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
'''Return value'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPivotPosFor'''
 
+
|-
:''This call does not return a value''
+
| colspan="2" | Sets the position the lever rotates around for an object&nbsp;
 
+
|-
 
+
|-
===<span style="font-weight: normal;"><u><tt>SetEnabledPosFor</tt></u></span>===
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
Sets the enabled position for an object
+
| width="90%" | Target
 
+
|-
'''Parameters'''
+
| colspan="2" | &nbsp;
 
+
|-
:[[Variable Types|HANDLE]] ''Target''
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 
+
| width="90%" | Position
:[[Variable Types|HANDLE]] ''Position''
+
|-
 
+
| colspan="2" | &nbsp;
 
+
|-
'''Return 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''
:''This call does not return a value''
+
|}
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetPivotPosFor</tt></u></span>===
 
Sets the position the lever rotates around for an object
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Target''
 
 
 
:[[Variable Types|HANDLE]] ''Position''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetModeFor</tt></u></span>===
 
Sets the animation mode for the button
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Target''
 
::The target object, 0 for 'set default'
 
 
 
:[[Variable Types|BYTE]] ''Mode''
 
::0=User, 1=Up/Down, 2 = Lever
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetMovement</tt></u></span>===
 
Sets the movement in units or PI/16 steps for the button
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Move''
 
::Movement to set to - default is 4
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetAxisFor</tt></u></span>===
 
Sets the movement axis as an Axis_... constant
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Target''
 
 
 
:[[Variable Types|BYTE]] ''Axis''
 
::Movement axis to set to, default 4
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetPivotPos</tt></u></span>===
 
Sets the position of the object the lever rotates around
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''PositionHandle''
 
::A handle to the position of the depressed location
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetAutoReset</tt></u></span>===
 
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
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BOOL]] ''State''
 
::Set true to reset to off on sim stop, else false to retain state
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetLatching</tt></u></span>===
 
Sets whether the button is depressed when the mouse is released
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BOOL]] ''Enabled''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>Unregister</tt></u></span>===
 
Removes the object to the list if present
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Target''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetMovementFor</tt></u></span>===
 
Sets the movement in units or PI/16 steps for the button
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Target''
 
 
 
:[[Variable Types|FLOAT]] ''Move''
 
::Movement to set to, default 4
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
 +
===Unregister===
 +
{| 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:Fc9-h32-icon.png]] - HANDLE
 +
| 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''
 +
|}
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Host component</u></span>
 
  
This property is of type ''Panel object'' and can be referenced with the variable name ''Target''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Lever pivot</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
+
| width="90%" | Host component
This property is of type ''Panel object'' and can be referenced with the variable name ''Pivot''.
+
|-
 
+
| colspan="2" | &nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 +
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 +
| width="90%" | Lever pivot
 +
|-
 +
| colspan="2" | &nbsp;
 +
|}

Latest revision as of 13:13, 7 February 2023

Author Matrix Ltd
Version 1.1
Category Helpers


Button helper component

A button overlay that allows any object to behave like a button

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

Clear

Fc9-comp-macro.png Clear
Clears all objects from the lists This leaves no links for the button helper 
Fc9-void-icon.png - VOID Return


GetState

Fc9-comp-macro.png GetState
Returns true if the button is depressed, else false 
Fc9-bool-icon.png - BOOL Return


GetStateFor

Fc9-comp-macro.png GetStateFor
Returns true if the button is depressed, else false 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-bool-icon.png - BOOL Return


GetTarget

Fc9-comp-macro.png GetTarget
Gets the target handle the property links to 
Fc9-h32-icon.png - HANDLE Return


Register

Fc9-comp-macro.png Register
Adds the object to the list if not already there 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-void-icon.png - VOID Return


SetAutoReset

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  
Fc9-bool-icon.png - BOOL State
Set true to reset to off on sim stop, else false to retain state 
Fc9-void-icon.png - VOID Return


SetAxis

Fc9-comp-macro.png SetAxis
Sets the movement axis as an Axis_... constant 
Fc9-u8-icon.png - BYTE Axis
Movement axis to set to, default 4 
Fc9-void-icon.png - VOID Return


SetAxisFor

Fc9-comp-macro.png SetAxisFor
Sets the movement axis as an Axis_... constant 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-u8-icon.png - BYTE Axis
Movement axis to set to, default 4 
Fc9-void-icon.png - VOID Return


SetDisabledPos

Fc9-comp-macro.png SetDisabledPos
Sets the position of the released button  
Fc9-h32-icon.png - HANDLE PositionHandle
A handle to the position of the depressed location 
Fc9-void-icon.png - VOID Return


SetDisabledPosFor

Fc9-comp-macro.png SetDisabledPosFor
Sets the disabled position for an object 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-h32-icon.png - HANDLE Position
 
Fc9-void-icon.png - VOID Return


SetEnabledPos

Fc9-comp-macro.png SetEnabledPos
Sets the position of the depressed button  
Fc9-h32-icon.png - HANDLE PositionHandle
A handle to the position of the depressed location 
Fc9-void-icon.png - VOID Return


SetEnabledPosFor

Fc9-comp-macro.png SetEnabledPosFor
Sets the enabled position for an object 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-h32-icon.png - HANDLE Position
 
Fc9-void-icon.png - VOID Return


SetLatching

Fc9-comp-macro.png SetLatching
Sets whether the button is depressed when the mouse is released 
Fc9-bool-icon.png - BOOL Enabled
 
Fc9-void-icon.png - VOID Return


SetLatchingFor

Fc9-comp-macro.png SetLatchingFor
Sets whether the button is depressed when the mouse is released 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-bool-icon.png - BOOL Enabled
 
Fc9-void-icon.png - VOID Return


SetMode

Fc9-comp-macro.png SetMode
Sets the animation mode for the button 
Fc9-u8-icon.png - BYTE Mode
0=User, 1=Up/Down, 2 = Lever 
Fc9-void-icon.png - VOID Return


SetModeFor

Fc9-comp-macro.png SetModeFor
Sets the animation mode for the button 
Fc9-h32-icon.png - HANDLE Target
The target object, 0 for 'set default' 
Fc9-u8-icon.png - BYTE Mode
0=User, 1=Up/Down, 2 = Lever 
Fc9-void-icon.png - VOID Return


SetMovement

Fc9-comp-macro.png SetMovement
Sets the movement in units or PI/16 steps for the button 
Fc9-f32-icon.png - FLOAT Move
Movement to set to - default is 4 
Fc9-void-icon.png - VOID Return


SetMovementFor

Fc9-comp-macro.png SetMovementFor
Sets the movement in units or PI/16 steps for the button 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-f32-icon.png - FLOAT Move
Movement to set to, default 4 
Fc9-void-icon.png - VOID Return


SetNotify

Fc9-comp-macro.png SetNotify
Sets the object to notify when the button is pressed or released  
Fc9-h32-icon.png - HANDLE Handle
The handle of the object - 0 to use the caller object 
Fc9-u32-icon.png - ULONG Ident
The identifier to send in the System.Notify message 
Fc9-void-icon.png - VOID Return


SetPivotPos

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


SetPivotPosFor

Fc9-comp-macro.png SetPivotPosFor
Sets the position the lever rotates around for an object 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-h32-icon.png - HANDLE Position
 
Fc9-void-icon.png - VOID Return


Unregister

Fc9-comp-macro.png Unregister
Removes the object to the list if present 
Fc9-h32-icon.png - HANDLE Target
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-17-icon.png Host component
 
Fc9-type-17-icon.png Lever pivot