</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
- <DefineConstants>$(DefineConstants);DEBUG;TRACE;_DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE;_DEBUG_DRAGNDROP</DefineConstants>
+ <DefineConstants>$(DefineConstants);DEBUG;TRACE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE</DefineConstants>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
TemplatedGroup = 0x00080000,
Dispose = 0x00100000,
Mouse = 0x00200000,
+ DragNDrop = 0x00400000,
- Update = IFace | 0x00100000,
+ Update = IFace | 0x10000000,
ProcessLayouting = IFace | Update | Lock | Layouting,
ClippingRegistration = IFace | Update | Lock | Clipping,
ProcessDrawing = IFace | Update | Lock | Drawing,
WidgetMouseWheel = Widget | Mouse | 0x06,
WidgetMouseClick = Widget | Mouse | 0x07,
WidgetMouseDblClick = Widget | Mouse | 0x08,
+ Drag = Widget | DragNDrop | 0x01,
+ DragEnter = Widget | DragNDrop | 0x02,
+ DragLeave = Widget | DragNDrop | 0x03,
+ StartDrag = Widget | DragNDrop | 0x04,
+ EndDrag = Widget | DragNDrop | 0x05,
+ Drop = Widget | DragNDrop | 0x06,
All = 0x7FFFFF00
}
topContainer = w;
int indexOfTopContainer = GraphicTree.IndexOf (topContainer);
- if (indexOfTopContainer != 0) {
+ if (indexOfTopContainer != 0) {//0 is topMost
for (int i = 0; i < indexOfTopContainer; i++) {//check all top containers that are at a higher level
//if logical parent of top container is the Interface, that's not a popup.
if (GraphicTree [i].LogicalParent is Interface) {
/// equivalent to mouse move for a dragged widget, no bubbling.
/// </summary>
public virtual void onDrag (object sender, MouseMoveEventArgs e) {
+ DbgLogger.AddEvent (DbgEvtType.Drag, this, e);
+
if (Drag != null)
Drag.Invoke (this, e);
-#if DEBUG_DRAGNDROP
- Debug.WriteLine (this.ToString () + " : DRAG => " + e.ToString ());
-#endif
}
/// <summary>
/// fired when drag and drop operation start
/// </summary>
protected virtual void onStartDrag (object sender, DragDropEventArgs e){
+ DbgLogger.AddEvent (DbgEvtType.StartDrag, this, e);
+
IFace.DragAndDropOperation = e;
IFace.dragndropHover = e.DropTarget;
IsDragged = true;
StartDrag.Raise (this, IFace.DragAndDropOperation);
- #if DEBUG_DRAGNDROP
- Debug.WriteLine(this.ToString() + " : START DRAG => " + e.ToString());
- #endif
}
protected virtual void onDragEnter (object sender, DragDropEventArgs e){
+ DbgLogger.AddEvent (DbgEvtType.DragEnter, this, e);
+
e.DropTarget = this;
DragEnter.Raise (this, e);
- #if DEBUG_DRAGNDROP
- Debug.WriteLine(this.ToString() + " : DRAG Enter => " + e.ToString());
- #endif
}
public virtual void onDragLeave (object sender, DragDropEventArgs e){
+ DbgLogger.AddEvent (DbgEvtType.DragLeave, this, e);
+
DragLeave.Raise (this, e);
-#if DEBUG_DRAGNDROP
- Debug.WriteLine (this.ToString () + " : DRAG Leave => " + e.ToString ());
-#endif
e.DropTarget = null;
}
/// <summary>
/// Occured when dragging ends without dropping
/// </summary>
public virtual void onEndDrag (object sender, DragDropEventArgs e) {
+ DbgLogger.AddEvent (DbgEvtType.EndDrag, this, e);
+
IsDragged = false;
EndDrag.Raise (this, e);
-#if DEBUG_DRAGNDROP
- Debug.WriteLine(this.ToString() + " : END DRAG => " + e.ToString());
-#endif
}
public virtual void onDrop (object sender, DragDropEventArgs e){
+ DbgLogger.AddEvent (DbgEvtType.Drop, this, e);
+
IsDragged = false;
Drop.Raise (this, e);
- //e.DropTarget.onDragLeave (this, e);//raise drag leave in target
-#if DEBUG_DRAGNDROP
- Debug.WriteLine(this.ToString() + " : DROP => " + e.ToString());
-#endif
}
public bool IsDropTarget => IFace.DragAndDropOperation?.DropTarget == this;
#endregion