Classes
PopupView | A widget which implements a nice popup view. |
Bases: enaml.widgets.widget.Widget
A widget which implements a nice popup view.
A PopupView is a single-use transient widget that is automatically destroyed when it is closed. It is useful for showing contextual popup dialogs or notification messages.
Static class-level storage for the view instances. A view will automatically add and remove itself from this list as needed. This list prevents the need for the user to manage a strong reference to a transient popup.
The type of the window to create. Each has different behavior. The window type cannot be changed after the widget is created.
The mode to use for anchoring. The ‘parent’ mode uses a point on the parent or the desktop as the target anchor, the ‘cursor’ mode uses the current cursor position as the target anchor.
The relative position on the parent to use as the anchor. This anchor will be aligned with the view anchor to position the popup view. It is expressed as a percentage of the parent size. The default anchors will position the popup just below the center of the parent widget.
The relative position on the view to use as the view anchor. This anchor will be aligned with the parent anchor to position the popup view. It is expressed as a percentage of the view size. The default anchors will position the popup just below the center of the parent widget.
The offset to apply between the two anchors, in pixels.
The edge of the popup view to use for rendering the arrow.
The size of the arrow in pixels. If this value is > 0, the view anchor is taken to be the point of the arrow. If the arrow edge is ‘left’ or ‘right’, the anchor’s y-coordinate is used to set the arrow position, and the x-coordinate is ignored. If the arrow edge is ‘top’ or ‘bottom’, the anchor’s x-coordinate is used to set the arrow position, and the y-coordinate is ignored.
The timeout, in seconds, before automatically closing the popup. A value less than or equal to zero means no timeout. This is typically useful when displaying non-interactive notifications.
The duration of the fade-in, in milliseconds. A value less than or equal to zero means no fade.
The duration of the fade-out, in milliseconds. A value less than or equal to zero means no fade.
Whether or not close the popup view on a mouse click. For ‘popup’ windows, this means clicking outside of the view. For ‘tool_tip’ and ‘window’ windows, this means clicking inside of the view.
Whether or not the background of the popup view is translucent. This must be True in order to use background colors with alpha and for the fade in and out animation to have effect. This value must be set before the popup view is shown. Changes to this value after the popup is shown will have no effect.
An event emitted when the view is closed. After this event is fired, the view will be destroyed and should not be used.
PopupViews are invisible by default.
A reference to the ProxyPopupView object.
This attribute is deprecated and will be removed in Enaml 1.0
Get the central widget defined on the PopupView.
The last Container child of the window is the central widget.