Updated image.register_action and added image.destroy_action
This commit is contained in:
parent
6fef1dfdf5
commit
cfc239ebed
1 changed files with 15 additions and 0 deletions
|
@ -16,6 +16,7 @@ Attributes:
|
||||||
|
|
||||||
```
|
```
|
||||||
function(
|
function(
|
||||||
|
name : string,
|
||||||
label : string,
|
label : string,
|
||||||
callback : function,
|
callback : function,
|
||||||
[tooltip : string]
|
[tooltip : string]
|
||||||
|
@ -24,6 +25,7 @@ function(
|
||||||
|
|
||||||
Add a new button and call a callback when it is clicked
|
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
|
* **label** - _string_ - The label to display on the button
|
||||||
* **callback** - _function_ - The function to call when the button is pressed
|
* **callback** - _function_ - The function to call when the button is pressed
|
||||||
* **\[tooltip\]** - _string_ - The tooltip to use on the new button
|
* **\[tooltip\]** - _string_ - The tooltip to use on the new button
|
||||||
|
@ -41,3 +43,16 @@ The function to call when the button is pressed
|
||||||
|
|
||||||
* **event** - _string_ - The name of the button that was pressed
|
* **event** - _string_ - The name of the button that was pressed
|
||||||
* **images** - _table of [types.dt_lua_image_t](../../../types/dt_lua_image_t)_ - The images to act on when the button was clicked
|
* **images** - _table of [types.dt_lua_image_t](../../../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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue