|
|
|
|
|
|
|
|
|
|
public delegate void PointerCancelEventListener(PointerCancelEvent evt); |
|
|
|
|
|
|
|
// public delegate void PointerSignalEventListener(PointerSignalEvent evt);
|
|
|
|
public delegate void PointerSignalEventListener(PointerSignalEvent evt); |
|
|
|
|
|
|
|
public delegate void PointerScrollEventListener(PointerScrollEvent evt); |
|
|
|
|
|
|
|
|
|
|
PointerExitEventListener onPointerExit = null, |
|
|
|
PointerUpEventListener onPointerUp = null, |
|
|
|
PointerCancelEventListener onPointerCancel = null, |
|
|
|
PointerSignalEventListener onPointerSignal = null, |
|
|
|
PointerScrollEventListener onPointerScroll = null, |
|
|
|
PointerDragFromEditorEnterEventListener onPointerDragFromEditorEnter = null, |
|
|
|
PointerDragFromEditorHoverEventListener onPointerDragFromEditorHover = null, |
|
|
|
|
|
|
this.onPointerMove = onPointerMove; |
|
|
|
this.onPointerUp = onPointerUp; |
|
|
|
this.onPointerCancel = onPointerCancel; |
|
|
|
this.onPointerSignal = onPointerSignal; |
|
|
|
this.onPointerScroll = onPointerScroll; |
|
|
|
|
|
|
|
this._onPointerEnter = onPointerEnter; |
|
|
|
|
|
|
|
|
|
|
public PointerCancelEventListener onPointerCancel; |
|
|
|
|
|
|
|
public PointerSignalEventListener onPointerSignal; |
|
|
|
|
|
|
|
|
|
|
|
public MouseTrackerAnnotation hoverAnnotation { |
|
|
|
get { return this._hoverAnnotation; } |
|
|
|
} |
|
|
|
|
|
|
|
void _updateAnnotations() { |
|
|
|
D.assert(this._onPointerEnter != this._hoverAnnotation.onEnter || |
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.onPointerSignal != null && evt is PointerSignalEvent) { |
|
|
|
this.onPointerSignal((PointerSignalEvent) evt); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.onPointerScroll != null && evt is PointerScrollEvent) { |
|
|
|
this.onPointerScroll((PointerScrollEvent) evt); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
if (this.onPointerCancel != null) { |
|
|
|
listeners.Add("cancel"); |
|
|
|
} |
|
|
|
|
|
|
|
if (this.onPointerSignal != null) { |
|
|
|
listeners.Add("signal"); |
|
|
|
} |
|
|
|
|
|
|
|
if (listeners.isEmpty()) { |
|
|
|