State

class glue.core.state_objects.State(**kwargs)[source]

Bases: glue.external.echo.HasCallbackProperties

A class to represent the state of a UI element. Initially this doesn’t add anything compared to HasCallbackProperties, but functionality will be added over time.

Methods Summary

as_dict(self)

Return the current state as a dictionary of attribute/value pairs.

update_from_dict(self, properties)

Update this state using the values from a dictionary of attributes.

update_from_state(self, state)

Update this state using the values from another state.

Methods Documentation

as_dict(self)[source]

Return the current state as a dictionary of attribute/value pairs.

update_from_dict(self, properties)[source]

Update this state using the values from a dictionary of attributes.

Parameters
propertiesdict

The dictionary containing attribute/value pairs.

update_from_state(self, state)[source]

Update this state using the values from another state.

Parameters
state~glue.core.state_objects.State

The state to use the values from