Scripting Interface |
The PaletteObjectManager JavaScript global object. Provides access to palette list (PaletteList) and palette (Palette) objects. More...
Public Slots | |
Load palette lists. | |
PaletteList * | getPaletteListByElementId (int id) |
Loads the element palette list specified by the element ID 'id' and return the corresponding PaletteList object. More... | |
PaletteList * | getScenePaletteList () |
Loads the scene palette list and return the corresponding PaletteList object. More... | |
For loaded palette lists. | |
int | getNumPaletteLists () |
Returns the number of loaded palette lists. More... | |
PaletteList * | getPaletteListByIndex (int index) |
Returns a PaletteList object for the loaded palette list at position 'index'. More... | |
PaletteList * | getPaletteListById (String id) |
Returns a PaletteList object for the loaded palette list with the specified list ID. More... | |
Palettes. | |
Palette * | getPalette (String id) |
Returns a Palette object for the loaded palette with the specified palette ID. More... | |
bool | removePaletteReferencesAndDeleteOnDisk (String id) |
The PaletteObjectManager JavaScript global object. Provides access to palette list (PaletteList) and palette (Palette) objects.
|
slot |
Returns the number of loaded palette lists.
|
slot |
|
slot |
Loads the element palette list specified by the element ID 'id' and return the corresponding PaletteList object.
If the palette list isn't already loaded, the method will load the palette list from the disk.
id | : The element ID. |
|
slot |
Returns a PaletteList object for the loaded palette list with the specified list ID.
id | : The ID of palette list to retrieve. |
|
slot |
Returns a PaletteList object for the loaded palette list at position 'index'.
index | : The index of palette list to retrieve. |
|
slot |
Loads the scene palette list and return the corresponding PaletteList object.
If the palette list isn't already loaded, the method will load the palette list from the disk.
|
slot |
Removes a palette from the scene and all elements, and schedule the file for deletion on next save. The method needs to acquire the locks for the palette and each palette list, and throws a JavaScript exception if it can't get ownership. Returns true on success. Deleting the palette on disk may affect any drawing which link to the palette, even in other projects.
id | : The ID of palette to remove. |