| |
- object
-
- DragHolder
-
- VirtualDragHolder
class DragHolder(object) |
|
Tracks coordinates during in-window dragging
The class is used primarily to implement custom selection
and interaction modes for custom-drawn controls. It was developed
for use with the conflictsolver timeline control.
The class stores:
"real" start and stop positions -- the first and last coordinates entered
"sorted" start and stop positions -- the upper left and lower right corners of the defined rectangle
isDrag -- whether the action should be considered a drag or a click
(calculated based on system metrics)
objects -- list for storing objects affected by the drag
(note that I've never actually used this) |
|
Methods defined here:
- Update(self, stopPosition)
- Called during "move" events, to update the stop position.
The current implementation stores the sorted start/stop positions
eventually this should be changed to use the accessor methods
or more appropriately, properties.
- __init__(self, startPosition=(0, 0), stopPosition=None, objects=None)
Data and other attributes defined here:
- __dict__ = <dictproxy object at 0x024C31D0>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'DragHolder' objects>
- list of weak references to the object (if defined)
- isDrag = 0
- minimumDrag = (2, 2)
|
class VirtualDragHolder(DragHolder) |
|
Adds the storage/retrieval of virtual coordinates |
|
- Method resolution order:
- VirtualDragHolder
- DragHolder
- object
Methods defined here:
- GetRawVirtualCoordinates(self)
- Get the (unsorted) start, stop coordinates in the virtual coordinates system
- GetVirtualCoordinates(self)
- Get the (sorted) start, stop coordinates in the virtual coordinates system
- GetVirtualStart(self)
- GetVirtualStop(self)
- SetVirtualStart(self, value)
- Set the virtual coordinates start
- SetVirtualStop(self, value)
- Set the virtual coordinates start
Data and other attributes defined here:
- isEventDrag = 0
- isEventResize = 0
- isSelection = 0
Methods inherited from DragHolder:
- Update(self, stopPosition)
- Called during "move" events, to update the stop position.
The current implementation stores the sorted start/stop positions
eventually this should be changed to use the accessor methods
or more appropriately, properties.
- __init__(self, startPosition=(0, 0), stopPosition=None, objects=None)
Data and other attributes inherited from DragHolder:
- __dict__ = <dictproxy object at 0x024C3270>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'DragHolder' objects>
- list of weak references to the object (if defined)
- isDrag = 0
- minimumDrag = (2, 2)
| |