Component: Sim. Switch Base (Simulation)

From Flowcode Help
Revision as of 13:05, 16 January 2014 by JonnyW (talk | contribs) (XML import)
Jump to navigationJump to search


Author Matrix Ltd
Version 1.1
Category Simulation


Image Sim. Switch Base component

A base for building switches that do not download to chip. Mouse interaction can send 'System.User' events with the following data... ID = The handle of the switch component sending the message Message = 1 (on) or 0 (off) Current state can also be read via simulation macros.


This component can be used as a base to create child components

Image The component Basic Sim. Switch is inherited from this.

Examples

No additional examples


Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

GetState

No additional information


Parameters

This macro has no parameters


Return value

BOOL : Returns true if the operation is a success, else false



Property reference

Operation

This property is of type Fixed list of ints and can be referenced with the variable name operation.

Latching = Mouse click to turn on, click again to turn off.

Momentary = Mouse click to turn on, release to turn off.

Send Event

This property is of type Fixed list of ints and can be referenced with the variable name send_event.

Determine when the component will send a User event to its parent.

On Change - Whenever the switch state changes.

On Click - Only when the mouse clicks the object.

On Release - Only when the mouse is released over the object.

Never - No events.

Startup State

This property is of type Fixed list of ints and can be referenced with the variable name start_state.

State that the switch will take when simulation is started.

Moving part

This property is of type Panel object and can be referenced with the variable name target.

Handle of a panel object that will be the moving part of the switch.

Pivot object

This property is of type Panel object and can be referenced with the variable name pivot.

Object around which the moving part will rotate when rotation is selected as the movement tyoe.

Type

This property is of type Fixed list of ints and can be referenced with the variable name movetype.

Set whether the moving part will move linearly or by rotation.

Axis

This property is of type Fixed list of ints and can be referenced with the variable name axis.

Axis along which the moving part will move (for push/slide) or around which it will rotate (rotary).

Movement

This property is of type Floating point and can be referenced with the variable name move.

Distance or angle by which the mioving part will move.