luadocs/content/lua.api.manual/darktable/gui/libs/image.md

1.3 KiB

title id weight draft author
darktable.gui.libs.image image 170 false people

The UI element that manipulates the current images

Attributes:

darktable.gui.libs.image.register_action

function(
  name : string,
  label : string,
  callback : function,
  [tooltip : string]
)

Add a new button and call a callback when it is clicked

  • name - string - A unique name for the action that can be referenced later to destroy it
  • label - string - The label to display on the button
  • callback - function - The function to call when the button is pressed
  • [tooltip] - string - The tooltip to use on the new button

callback -

function(
  event : string,
  images : table oftypes.dt_lua_image_t
)

The function to call when the button is pressed

  • event - string - The name of the button that was pressed
  • images - table of types.dt_lua_image_t - The images to act on when the button was clicked

darktable.gui.libs.image.destroy_action

function(
  name : string,
)

Destroy an action created with register_action

  • name - string - The name of the action to destroy