enable.abstract_window module¶
-
class
enable.abstract_window.
AbstractWindow
(**traits)[source]¶ Bases:
traits.has_traits.HasTraits
-
MAX_DAMAGED_REGIONS
= 100¶
-
component_bounds_updated
(event)[source]¶ Dynamic trait listener that handles our component changing its size.
-
get_pointer_position
()[source]¶ Returns the current pointer position in local window coordinates.
- Returns
(x, y) – The x,y position of the mouse
- Return type
-
screen_to_window
(x, y)[source]¶ Returns local window coordinates for given global screen coordinates
-
set_drag_result
(result)[source]¶ Sets the result that should be returned to the system from the handling of the current drag operation. Valid result values are: “error”, “none”, “copy”, “move”, “link”, “cancel”. These have the meanings associated with their WX equivalents.
-
set_mouse_owner
(mouse_owner, transform=None, history=None)[source]¶ Handle the ‘mouse_owner’ being changed
- Parameters
mouse_owner (
Component
or None) – The new “mouse owner” component. This component will receive all key and mouse events until a new mouse owner is set.transform (3x3
ndarray
or None) – An affine transform which is applied to events before dispatchhistory (list of
Interactor
or None) – A list of interactors which is used to build a tranform (viaget_event_transform()
) to be applied to events before dispatch.
-