enable.compass module¶
-
class
enable.compass.
Compass
(**traits)[source]¶ Bases:
enable.component.Component
A compass with triangles at the 4 cardinal directions. The center of the compass of triangles is the center of the widget.
-
get_preferred_size
()[source]¶ Returns the size (width,height) that is preferred for this component.
When called on a component that does not contain other components, this method just returns the component bounds. If the component is resizable and can draw into any size, the method returns a size that is visually appropriate. (The component’s actual bounds are determined by its container’s do_layout() method.)
-
mouse_down
(arrow)[source]¶ Called when the mouse is first pressed inside one of the triangles. This gets called after self.clicked is set.
- Parameters
arrow ("n", "e", "s", "w") – indicates which arrow was pressed
-