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(artist)

Add a LayerArtist to this collection

clear()

Remove all layer artists from this collection

clear_callbacks()

Remove all callbacks

ignore_callbacks()

ignore_change()

A context manager that temporarily disables calling callbacks if container is changed.

ignore_empty()

A context manager that temporarily disables calling callbacks if container is empty.

on_changed(func)

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

on_empty(func)

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

pop(layer)

Remove all artists associated with a layer

remove(artist)

Remove a LayerArtist from this collection

Attributes Documentation

layers[source]

A list of the unique layers in the container

Methods Documentation

append(artist)[source]

Add a LayerArtist to this collection

clear()[source]

Remove all layer artists from this collection

clear_callbacks()[source]

Remove all callbacks

ignore_callbacks()[source]
ignore_change()[source]

A context manager that temporarily disables calling callbacks if container is changed.

ignore_empty()[source]

A context manager that temporarily disables calling callbacks if container is empty.

on_changed(func)[source]

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

on_empty(func)[source]

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

pop(layer)[source]

Remove all artists associated with a layer

remove(artist)[source]

Remove a LayerArtist from this collection

Parameters

artist (LayerArtistBase) – The artist to remove