Another possibility to invoke an editor extension function is to respond to a menu event from a previously added menu entry in the Extra submenu. This menu contains no entries by default. The only possibility to add entries is through the use of the Extensions.
Use the instruction Gfa_AddMenu to inserted new menu entries into the extra menu. Gfa_AddMenu expects the name of a Sub as the second parameter associated with the menu option. When the menu entry is chosen this Sub is executed. For instance:
Sub Gfa_MenuMerge(Idx%)
' handle menu event
EndSub
The third interface to the editor Extensions are the event-controlled Subs. Comparably with the event Subs of Ocx objects (see object manual), it concerns subroutines with a descriptive name, when occurring a certain event to be called automatically and executed.
For example when a procedure with the name Sub Gfa_Minute is present in the editor Extension, this procedure is called and executed every minute (the editor is interrupted as long as it takes to carry out the steps in timer event sub).
The following event subs are implemented:
Gfa_Init - Occurs when a GLL is loaded.
Gfa_Exit - Occurs when a GLL is unloaded.
Gfa_OnRun - Occurs when a g32 project is run.
Gfa_OnEnd - Occurs when a run program ends.
Gfa_Second - Occurs every second.
Gfa_Minute - Occurs every minute.
Gfa_OnDropInl - Occurs when files are dropped on the :Files window.
{Created by Sjouke Hamstra; Last updated: 25/10/2014 by James Gaite}