enable.container module¶
Defines the basic Container class
-
class
enable.container.
Container
(*components, **traits)[source]¶ Bases:
enable.component.Component
A Container is a logical container that holds other Components within it and provides an origin for Components to position themselves. Containers can be “nested” (although “overlayed” is probably a better term).
If auto_size is True, the container will automatically update its bounds to enclose all of the components handed to it, so that a container’s bounds serve as abounding box (although not necessarily a minimal bounding box) of its contained components.
-
cleanup
(window)[source]¶ When a window viewing or containing a component is destroyed, cleanup is called on the component to give it the opportunity to delete any transient state it may have (such as backbuffers).
-
compact
()[source]¶ Causes this container to update its bounds to be a compact bounding box of its components. This may cause the container to recalculate and adjust its position relative to its parent container (and adjust the positions of all of its contained components accordingly).
-
components_at
(x, y)[source]¶ Returns a list of the components underneath the given point (given in the parent coordinate frame of this container).
-
get_event_transform
(event=None, suffix='')[source]¶ Returns the 3x3 transformation matrix that this interactor will apply to the event (if any).
-