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.
bulk_updates_freeze () Temporarily freeze bulk UI updates.
bulk_updates_thaw () Resume bulk UI updates.
print_debug (text) Print a debug message to the application console.
print_error (text) Print an error message to the application console.
print_info (text) Print an info message to the application console.

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.

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.

Parameters:

  • label Label to display in the menu.
  • callback Callback function to be called when the command is activated.
OnAppDone (callback)
Register a function to be called during app initialisation.

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.

Parameters:

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

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.

Parameters:

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

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.

Parameters:

  • callback Callback function.
bulk_updates_freeze ()
Temporarily freeze bulk UI updates.

Calling this function will suspend certain UI update operations that can be batched. This may be used when (e.g.) creating lots of comments or data type annotations at once.

Every call to this method *MUST* be matched with a corresponding call to the bulk_updates_thaw() method.

bulk_updates_thaw ()
Resume bulk UI updates.
print_debug (text)
Print a debug message to the application console.

Parameters:

  • text The message.
print_error (text)
Print an error message to the application console.

Parameters:

  • text The message.
print_info (text)
Print an info message to the application console.

Parameters:

  • text The message.

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 2024-02-14 23:56:27