Module rehex

Reverse Engineers' Hex Editor Lua plugin API

Functions

AddToToolsMenu (label, callback) Add a command to the “Tools” menu.
OnAppDone (callback) Register a function to be called during app initialisation.
OnAppReady (callback) Register a function to be called during app initialisation.
OnTabCreated (callback) Register a function to be called when a new tab is created.

Fields

PLUGIN_DIR Path to plugin data directory, nil if the plugin is a script in the top-level plugins directory.


Functions

AddToToolsMenu (label, callback)
Add a command to the “Tools” menu.

Parameters:

  • label Label to display in the menu.
  • callback Callback function to be called when the command is activated.

    Adds a command to the “Tools” menu of the main window. This must be called before the window is constructed, usually as part of your plugin’s initialisation.

    The callback function will be passed a reference to the MainWindow object when activated.

OnAppDone (callback)
Register a function to be called during app initialisation.

Parameters:

  • callback Callback function.

    The given function will be called during the REHex::App::SetupPhase::DONE hook (i.e. after the MainWindow has been created and any files opened.

OnAppReady (callback)
Register a function to be called during app initialisation.

Parameters:

  • callback Callback function.

    The given function will be called during the REHex::App::SetupPhase::READY hook (i.e. after most initialisation is complete, but before the MainWindow is created.

OnTabCreated (callback)
Register a function to be called when a new tab is created.

Parameters:

  • callback Callback function.

    Registers a function to be called whenever a file is opened or a new one created. This should typically be called during your plugin’s initialisation.

    The callback function will be passed references to the MainWindow and Tab objects.

Fields

PLUGIN_DIR
Path to plugin data directory, nil if the plugin is a script in the top-level plugins directory.
generated by LDoc 1.4.6 Last updated 2021-05-03 00:07:25