enaml.widgets.toolkit_object

Classes

ToolkitObject

The base class of all toolkit objects in Enaml.

class enaml.widgets.toolkit_object.ToolkitObject(parent=None, **kwargs)[source]

Bases: Declarative

The base class of all toolkit objects in Enaml.

activated

An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.

proxy

A reference to the ProxyToolkitObject

property proxy_is_active

A property which gets and sets the active proxy flag. This should not be manipulated directly by user code. This flag will be set to True by external code after the proxy widget hierarchy is setup.

initialize()[source]

A reimplemented initializer.

This initializer will invoke the application to create the proxy if one has not already been provided.

destroy()[source]

A reimplemented destructor.

This destructor invokes the ‘destroy’ method on the proxy toolkit object.

child_added(child)[source]

A reimplemented child added event handler.

This handler will invoke the superclass handler and then invoke the ‘child_added()’ method on an active proxy.

child_removed(child)[source]

A reimplemented child removed event handler.

This handler will invoke the superclass handler and then invoke the ‘child_removed()’ method on an active proxy. The method on the active proxy will be called even if the child proxy has been destroyed.

activate_proxy()[source]

Activate the proxy object tree.

This method should be called by a node to activate the proxy tree by making two initialization passes over the tree, from this node downward. This method is automatically at the proper times and should not normally need to be invoked by user code.

activate_top_down()[source]

Initialize the proxy on the top-down activation pass.

By default, this method calls the ‘activate_top_down’ method on the proxy object. It may be reimplemented by subclasses which wish to perform toolkit-specific initialization.

activate_bottom_up()[source]

Initialize the proxy on the bottom-up activation pass.

By default, this method calls the ‘activate_bottom_up’ method on the proxy object. It may be reimplemented by subclasses which wish to perform toolkit-specific initialization.