LayerArtistContainer

class glue.core.layer_artist.LayerArtistContainer[source]

Bases: object

A collection of LayerArtists

Attributes Summary

layers

A list of the unique layers in the container

Methods Summary

append(self, artist)

Add a LayerArtist to this collection

clear(self)

Remove all layer artists from this collection

clear_callbacks(self)

Remove all callbacks

ignore_empty(self)

A context manager that temporarily disables calling callbacks if container is emptied

on_changed(self, func)

Register a callback function that should be invoked when this container’s elements change

on_empty(self, func)

Register a callback function that should be invoked when this container is emptied

pop(self, layer)

Remove all artists associated with a layer

remove(self, artist)

Remove a LayerArtist from this collection

Attributes Documentation

layers

A list of the unique layers in the container

Methods Documentation

append(self, artist)[source]

Add a LayerArtist to this collection

clear(self)[source]

Remove all layer artists from this collection

clear_callbacks(self)[source]

Remove all callbacks

ignore_empty(self)[source]

A context manager that temporarily disables calling callbacks if container is emptied

on_changed(self, func)[source]

Register a callback function that should be invoked when this container’s elements change

on_empty(self, func)[source]

Register a callback function that should be invoked when this container is emptied

pop(self, layer)[source]

Remove all artists associated with a layer

remove(self, artist)[source]

Remove a LayerArtist from this collection

Parameters

artist (LayerArtistBase) – The artist to remove