darktable.gui.libs.image

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

🔗darktable.gui.libs.image.action_set_sensitive

function(
  name : string,
  sensitive : boolean
)

Set the sensitivity of a button created by darktable.gui.libs.image.register_action

  • name - string - The name of the action to destroy
  • sensitive - boolean - True to set the button sensitive, false to set it insensitive