X-Setup Pro

Select your language: 

XQDC Ltd.
X-Setup Pro - the mother of all tweakers

X-Setup Pro SDK

Plugins Event Reference

Events are procedures that are called to indicate that something has happened and the plugin can react on this events. Events are always fired ones after another in the order listed below, but Plugin_Apply might be fired several times.

Plugin_Initialize

Fired when the plugin is about to be loaded. You can use this event to read the settings of your plugin and set the the correct values in the user interface (UI) using the SetUIElement function and the SetUIElementEx function.

Plugin_Apply(ElementIndex,ElementSubIndex)

Fired when the plugin should perform its changes to the system. It is generated if the user clicks the "Apply Changes" button or when a button inside the plugin UI is clicked (type is listbox or buttons).

This is the only event where the plugin is allowed to perform changes to the system (see the Function ReferenceFunction Reference for more information).

Which values the parameter ElementIndex and ElementSubIndex contain, depends on the plugin type:

  • Plugin type is "Button"
    ElementIndex will contain the number of the button clicked (e.g. 1 = first Button clicked)
    ElementSubIndex will always contain 0
  • Plugin type is "Listbox"
    ElementIndex will contain the number of the button clicked (e.g. 1 = first Button clicked)
    ElementSubIndex will contain the number of the currently selected item (e.g. 1 = first entry set using SetUIElement). If there is no selection, this parameter will be 0
  • Plugin type is "Checked Listbox"
    ElementIndex will always contain 0
    ElementSubIndex will contain the number of the currently selected item (e.g. 1 = first entry set using SetUIElement). If there is no selection, this parameter will be 0
  • All other plugin types:
    ElementIndex will always contain 0
    ElementSubIndex will always contain 0

Note: You can change the contents of the user interface in this event. If you call SetUIElement(x) again, X-Setup Pro will detect this and display the new values, overwritting the values the user has inserted.

Plugin_Terminate

Fired when the plugin is about to be removed from memory (unloaded). The plugin does not need to clean up anything or re-set any UI elements, this is all done automatically by X-Setup Pro. Anyway, the developer might find this event useful for something that should be done before the plugin is finally terminated.