Event Reference
From Flowcode Help
Jump to navigationJump to search<sidebar>Event Contents</sidebar> Flowcode provides an event interface to help writing simulation and PC-side programs.
This event list allows Flowcode to communicate with the components through macros.
An event may be thought of as a simulation-side interrupt. Each event associated with a Flowcode program will call a macro when that event occurs.
Events are grouped by class to provide context for their use. Below is a reference to the classes and events available:
Compile | |
---|---|
Preprocess | Broadcast to all components immediately before compilation is started |
AddProperty | Sent to a component to allow dynamic amendment of global property declarations |
AddConst | Sent to a component to allow dynamic amendment of global variable declarations |
AddVarSize | Sent to a component to allow dynamic amendment of global array-size declarations |
AddVar | Sent to a component to allow dynamic amendment of global constant declarations |
AddHeader | Sent to a component to allow dynamic amendment of header code |
AddInterrupts | Sent to a component to allow dynamic amendment of the interrupts for a component |
AddInterrupt | Sent to a component to allow dynamic amendment of a single interrupts code |
Start | Broadcast to all components that compilation is starting |
Stop | Broadcast to all components that compilation has stopped |
GetVarSize | Sent to a component to amend the size of the expected array |
Components | |
Property | Sent when a property has been changed by the User |
Added | Broadcast to all existing components once a new component has been added |
Adding | Broadcast to all existing components when a new component is about to be added |
Resize | Sent to the mouse target when the user has altered the position of a component child |
Removed | Broadcast to all remaining components once an existing component has been removed |
Removing | Broadcast to all existing components when an existing component is about to be removed |
Closedown | Closedown routine for the component |
Closing | Pre-Closedown routine for the component, sent when the component is linked |
Initialise | Initialisation routine for the component once the component is linked to its parent |
Initialising | Initialisation routine before the component is linked to its parent |
Console | |
AddLine | Post to the owning component when a line is inserted by the user |
TextChanged | Post when the console text is changed by the user in some way |
MemChanged | Post when the console memory is changed by the user in some way |
Connection | |
PinPopulate | Sent when auto-populate of digital connections is requested |
PinChange | Sent during simulation if a connected port pin changes |
AnPopulate | Sent when auto-populate of analog connections is requested |
AnChange | Sent during simulation if a connected ADC channel changes |
ChipChange | Sent when the target device has changed |
Unconnected | Sent when the component is compiled with unconnected pins |
Scope | |
Decode | Sent when a block of the stream is to be decoded into packets |
Overlay | Sent when the mouse hovers over a scope stream |
Simulation | |
Pause | Broadcast to all components that simulation has paused |
Resume | Broadcast to all components that simulation has resumed |
Start | Broadcast to all components that simulation is starting |
Stop | Broadcast to all components that simulation has stopped |
System | |
CleanHandle | Called when a custom handle is deleted to allow cleanup of resources |
Timer | Called back on the panel command System.TimerStart |
User | Called back on the panel command System.Notify |
Sound | |
Complete | Sent when a sound queued by the component has finished playing |
Tooltip | |
GraphicPoll | Called when a tooltip graphic is updating with the draw image already pushed |
GetText | Called when a tooltip text string can be displayed |
GetGraphic | Called when a tooltip graphic can be displayed with the draw image already pushed |
File | |
Changed | Sent when a file being watched has changed |
Closed | Sent when a file monitor is being closed |
Graphics | |
Animated | Notification than an animation has finished |
Redraw | Reconstructs and redraws the target component |
Keyboard | |
ButtonName | Sent to give a meaningful name to a button on a simulated mouse-click |
KeyMapDown | Post when a mapped key is pressed for the component |
KeyMapUp | Post when a mapped key is released for the component |
MappingKeys | Sent to find out how many keys it is possible to map to the component during simulation |
MappingName | Sent to give a meaningful name to a custom key-map event for a component |
Mouse | |
Release | Post when the mouse is released on a child of the component during simulation |
Click | Post when the mouse is clicked on a child of the component during simulation |
Drag | Post when the mouse is dragged on a child of the component during simulation |