mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-13 22:04:09 +02:00
Improved ListView cursor key handling, removed debug NOPs
This commit is contained in:
parent
959da9884c
commit
987adaec5c
26 changed files with 87 additions and 211 deletions
|
@ -166,6 +166,14 @@ namespace Beefy.theme.dark
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool IsOpen
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (mOpenButton != null) && (mOpenButton.mIsOpen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public this()
|
public this()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace Beefy.widgets
|
||||||
virtual public StringView Label
|
virtual public StringView Label
|
||||||
{
|
{
|
||||||
get { return (mLabel != null) ? mLabel : default; }
|
get { return (mLabel != null) ? mLabel : default; }
|
||||||
set { String.NewOrSet!(mLabel, value);}
|
set { String.NewOrSet!(mLabel, value); }
|
||||||
}
|
}
|
||||||
virtual public IDrawable IconImage { get { return mIconImage; } set { mIconImage = value; } }
|
virtual public IDrawable IconImage { get { return mIconImage; } set { mIconImage = value; } }
|
||||||
virtual public uint32 IconImageColor { get { return mIconImageColor; } set { mIconImageColor = value; } }
|
virtual public uint32 IconImageColor { get { return mIconImageColor; } set { mIconImageColor = value; } }
|
||||||
|
@ -103,6 +103,14 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual bool IsOpen
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (mChildItems != null) && (mChildItems.Count > 0) && (mChildAreaHeight > 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public virtual float LabelX { get { return 0; } }
|
public virtual float LabelX { get { return 0; } }
|
||||||
public virtual float LabelWidth { get { return mWidth; } }
|
public virtual float LabelWidth { get { return mWidth; } }
|
||||||
|
|
||||||
|
@ -141,17 +149,20 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void WithSelectedItems(Action<ListViewItem> func, bool skipSelectedChildrenOnSelectedItems = false)
|
public void WithSelectedItems(Action<ListViewItem> func, bool skipSelectedChildrenOnSelectedItems = false, bool skipClosed = false)
|
||||||
{
|
{
|
||||||
bool selfSelected = Selected;
|
bool selfSelected = Selected;
|
||||||
if (selfSelected)
|
if (selfSelected)
|
||||||
func(this);
|
func(this);
|
||||||
|
|
||||||
if ((mChildItems != null) && ((!skipSelectedChildrenOnSelectedItems) || (!selfSelected)))
|
if ((mChildItems != null) && ((!skipSelectedChildrenOnSelectedItems) || (!selfSelected)))
|
||||||
|
{
|
||||||
|
if ((!skipClosed) || (mParentItem == null) || (IsOpen))
|
||||||
{
|
{
|
||||||
for (ListViewItem child in mChildItems)
|
for (ListViewItem child in mChildItems)
|
||||||
{
|
{
|
||||||
child.WithSelectedItems(func, skipSelectedChildrenOnSelectedItems);
|
child.WithSelectedItems(func, skipSelectedChildrenOnSelectedItems, skipClosed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,8 +254,8 @@ namespace Beefy.widgets
|
||||||
{
|
{
|
||||||
defer { prevItem = checkItem; }
|
defer { prevItem = checkItem; }
|
||||||
|
|
||||||
if (selectEndElement != null)
|
/*if (selectEndElement != null)
|
||||||
return;
|
return;*/
|
||||||
|
|
||||||
if (checkItem == focusedItem)
|
if (checkItem == focusedItem)
|
||||||
{
|
{
|
||||||
|
@ -263,15 +274,20 @@ namespace Beefy.widgets
|
||||||
if (!checkItem.Selected)
|
if (!checkItem.Selected)
|
||||||
{
|
{
|
||||||
if (spanStart == focusedItem)
|
if (spanStart == focusedItem)
|
||||||
|
{
|
||||||
selectEndElement = prevItem;
|
selectEndElement = prevItem;
|
||||||
|
}
|
||||||
spanStart = null;
|
spanStart = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (spanStart == null)
|
else if (spanStart == null)
|
||||||
{
|
{
|
||||||
if (checkItem.Selected)
|
if (checkItem.Selected)
|
||||||
|
{
|
||||||
spanStart = checkItem;
|
spanStart = checkItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
focusedItem.Focused = false;
|
focusedItem.Focused = false;
|
||||||
|
@ -757,16 +773,22 @@ namespace Beefy.widgets
|
||||||
mListSizeDirty = true;
|
mListSizeDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnsureItemVisible(ListViewItem item, bool centerView)
|
public enum VisibleKind
|
||||||
|
{
|
||||||
|
WasVisible,
|
||||||
|
Scrolled
|
||||||
|
}
|
||||||
|
|
||||||
|
public VisibleKind EnsureItemVisible(ListViewItem item, bool centerView)
|
||||||
{
|
{
|
||||||
if (mVertScrollbar == null)
|
if (mVertScrollbar == null)
|
||||||
return;
|
return .WasVisible;
|
||||||
|
|
||||||
if (mListSizeDirty)
|
if (mListSizeDirty)
|
||||||
UpdateListSize();
|
UpdateListSize();
|
||||||
|
|
||||||
if (mScrollContentContainer.mHeight <= 0)
|
if (mScrollContentContainer.mHeight <= 0)
|
||||||
return;
|
return .WasVisible;
|
||||||
|
|
||||||
float aX;
|
float aX;
|
||||||
float aY;
|
float aY;
|
||||||
|
@ -784,6 +806,7 @@ namespace Beefy.widgets
|
||||||
scrollPos = (float)Math.Round(scrollPos / lineHeight) * lineHeight;
|
scrollPos = (float)Math.Round(scrollPos / lineHeight) * lineHeight;
|
||||||
}
|
}
|
||||||
VertScrollTo(scrollPos);
|
VertScrollTo(scrollPos);
|
||||||
|
return .Scrolled;
|
||||||
}
|
}
|
||||||
else if (aY + lineHeight + mBottomInset >= mVertPos.mDest + mScrollContentContainer.mHeight)
|
else if (aY + lineHeight + mBottomInset >= mVertPos.mDest + mScrollContentContainer.mHeight)
|
||||||
{
|
{
|
||||||
|
@ -795,7 +818,9 @@ namespace Beefy.widgets
|
||||||
scrollPos = (float)Math.Round(scrollPos / lineHeight) * lineHeight;
|
scrollPos = (float)Math.Round(scrollPos / lineHeight) * lineHeight;
|
||||||
}
|
}
|
||||||
VertScrollTo(scrollPos);
|
VertScrollTo(scrollPos);
|
||||||
|
return .Scrolled;
|
||||||
}
|
}
|
||||||
|
return .WasVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListViewItem FindClosestItemAtYPosition(ListViewItem parentItem, float y, bool addHeight)
|
ListViewItem FindClosestItemAtYPosition(ListViewItem parentItem, float y, bool addHeight)
|
||||||
|
@ -855,6 +880,8 @@ namespace Beefy.widgets
|
||||||
newSelection = newSelection.mChildItems[newSelection.mChildItems.Count - 1];
|
newSelection = newSelection.mChildItems[newSelection.mChildItems.Count - 1];
|
||||||
}
|
}
|
||||||
case KeyCode.PageUp:
|
case KeyCode.PageUp:
|
||||||
|
selectedItem.SelfToOtherTranslate(mScrollContent, 0, 0, var absX, var absY);
|
||||||
|
|
||||||
int32 numIterations = (int32)(mScrollContentContainer.mHeight / selectedItem.mSelfHeight);
|
int32 numIterations = (int32)(mScrollContentContainer.mHeight / selectedItem.mSelfHeight);
|
||||||
for (int32 i = 0; i < numIterations; i++)
|
for (int32 i = 0; i < numIterations; i++)
|
||||||
KeyDown(KeyCode.Up, false);
|
KeyDown(KeyCode.Up, false);
|
||||||
|
@ -876,7 +903,7 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
triedMove = true;
|
triedMove = true;
|
||||||
case KeyCode.Down:
|
case KeyCode.Down:
|
||||||
if ((selectedItem.mChildItems != null) && (selectedItem.mChildItems.Count > 0) && (selectedItem.mChildAreaHeight > 0))
|
if (selectedItem.IsOpen)
|
||||||
newSelection = selectedItem.mChildItems[0];
|
newSelection = selectedItem.mChildItems[0];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -920,7 +947,8 @@ namespace Beefy.widgets
|
||||||
if (newSelection != null)
|
if (newSelection != null)
|
||||||
{
|
{
|
||||||
mRoot.SelectItem(newSelection, isDoingSpanSelection);
|
mRoot.SelectItem(newSelection, isDoingSpanSelection);
|
||||||
EnsureItemVisible(newSelection, false);
|
if (EnsureItemVisible(newSelection, false) == .Scrolled)
|
||||||
|
newSelection.mParent.UpdateAll(); // Update virtual list
|
||||||
}
|
}
|
||||||
else if ((triedMove) && (!isDoingSpanSelection) && (firstSelectedItem != null))
|
else if ((triedMove) && (!isDoingSpanSelection) && (firstSelectedItem != null))
|
||||||
mRoot.SelectItemExclusively(firstSelectedItem);
|
mRoot.SelectItemExclusively(firstSelectedItem);
|
||||||
|
|
|
@ -23,15 +23,8 @@ namespace Beefy.widgets
|
||||||
public delegate void RemovedFromParentHandler(Widget widget, Widget prevParent, WidgetWindow widgetWindow);
|
public delegate void RemovedFromParentHandler(Widget widget, Widget prevParent, WidgetWindow widgetWindow);
|
||||||
public delegate void AddedToParentHandler(Widget widget);
|
public delegate void AddedToParentHandler(Widget widget);
|
||||||
|
|
||||||
public class Widget : ILeakIdentifiable
|
public class Widget
|
||||||
{
|
{
|
||||||
static int32 sIdx;
|
|
||||||
public int32 mIdx = sIdx++;
|
|
||||||
public void ToLeakString(String str)
|
|
||||||
{
|
|
||||||
str.AppendF("Idx:{0}", mIdx);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TransformData
|
public class TransformData
|
||||||
{
|
{
|
||||||
public float a;
|
public float a;
|
||||||
|
|
|
@ -719,19 +719,6 @@ namespace Beefy.widgets
|
||||||
|
|
||||||
public override void MouseLeave()
|
public override void MouseLeave()
|
||||||
{
|
{
|
||||||
/*if (mTitle == "Tooltip")
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.WriteLine("MouseLeave {0}", this);*/
|
|
||||||
|
|
||||||
// This line breaks the ability to drag a tab outside the window. Why did we have it?
|
|
||||||
/*if (sMouseInsideWindow == this)
|
|
||||||
return;*/
|
|
||||||
|
|
||||||
//Debug.WriteLine("MouseLeave {0}", this);
|
|
||||||
|
|
||||||
if (sMouseInsideWindow == this)
|
if (sMouseInsideWindow == this)
|
||||||
{
|
{
|
||||||
sMouseInsideWindow = null;
|
sMouseInsideWindow = null;
|
||||||
|
|
|
@ -166,11 +166,6 @@ namespace System.Reflection
|
||||||
/*if (type.IsStruct)
|
/*if (type.IsStruct)
|
||||||
return &value;*/
|
return &value;*/
|
||||||
|
|
||||||
if (type.IsStruct)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type.IsBoxed)
|
if (type.IsBoxed)
|
||||||
return ((uint8*)(void*)value) + type.mMemberDataOffset;
|
return ((uint8*)(void*)value) + type.mMemberDataOffset;
|
||||||
return ((uint8*)(void*)value);
|
return ((uint8*)(void*)value);
|
||||||
|
|
|
@ -115,11 +115,6 @@ namespace System {
|
||||||
// there is a chance that the internal ConvertTime calls will throw since 'source' won't be reference equal to the new TimeZoneInfo.Local.
|
// there is a chance that the internal ConvertTime calls will throw since 'source' won't be reference equal to the new TimeZoneInfo.Local.
|
||||||
//
|
//
|
||||||
|
|
||||||
public ~this()
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma warning disable 0420
|
#pragma warning disable 0420
|
||||||
class CachedData
|
class CachedData
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,11 +21,6 @@ namespace IDE
|
||||||
{
|
{
|
||||||
Debug.Assert(Thread.CurrentThread == IDEApp.sApp.mMainThread);
|
Debug.Assert(Thread.CurrentThread == IDEApp.sApp.mMainThread);
|
||||||
|
|
||||||
/*if (gApp.mMainWindow.IsKeyDown(.Control))
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
Debug.Assert(mOnThreadDone == null);
|
Debug.Assert(mOnThreadDone == null);
|
||||||
//mBfSystem.PerfZoneStart("BfCompiler.ThreadStart");
|
//mBfSystem.PerfZoneStart("BfCompiler.ThreadStart");
|
||||||
|
|
||||||
|
|
|
@ -179,11 +179,6 @@ namespace IDE.Compiler
|
||||||
{
|
{
|
||||||
BfCompiler_Delete(mNativeBfCompiler);
|
BfCompiler_Delete(mNativeBfCompiler);
|
||||||
mNativeBfCompiler = null;
|
mNativeBfCompiler = null;
|
||||||
|
|
||||||
if (mCommandQueue.Count > 0)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Compile(BfPassInstance passInstance, String outputDirectory)
|
public bool Compile(BfPassInstance passInstance, String outputDirectory)
|
||||||
|
@ -556,10 +551,6 @@ namespace IDE.Compiler
|
||||||
{
|
{
|
||||||
if ([Friend]mThreadWorker.mThreadRunning)
|
if ([Friend]mThreadWorker.mThreadRunning)
|
||||||
{
|
{
|
||||||
/*if (gApp.mMainWindow.IsKeyDown(.Control))
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}*/
|
|
||||||
if (mNativeBfCompiler != null)
|
if (mNativeBfCompiler != null)
|
||||||
BfCompiler_Cancel(mNativeBfCompiler);
|
BfCompiler_Cancel(mNativeBfCompiler);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,11 +89,6 @@ namespace IDE.Compiler
|
||||||
mIsDisposed = true;
|
mIsDisposed = true;
|
||||||
BfPassInstance_Delete(mNativeBfPassInstance);
|
BfPassInstance_Delete(mNativeBfPassInstance);
|
||||||
mNativeBfPassInstance = null;
|
mNativeBfPassInstance = null;
|
||||||
|
|
||||||
if (mFailed)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool PopOutString(String outStr)
|
public bool PopOutString(String outStr)
|
||||||
|
|
|
@ -52,11 +52,6 @@ namespace IDE.Compiler
|
||||||
|
|
||||||
public void QueueDeferredResolveAll()
|
public void QueueDeferredResolveAll()
|
||||||
{
|
{
|
||||||
/*if (gApp.mMainWindow.IsKeyDown(.Control))
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
mResolveAllWait = 2;
|
mResolveAllWait = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,11 +129,6 @@ namespace IDE.Compiler
|
||||||
|
|
||||||
public void QueueResolveCommand()
|
public void QueueResolveCommand()
|
||||||
{
|
{
|
||||||
/*if (gApp.mMainWindow.IsKeyDown(.Control))
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
ResolveAllCommand command = new ResolveAllCommand();
|
ResolveAllCommand command = new ResolveAllCommand();
|
||||||
QueueCommand(command);
|
QueueCommand(command);
|
||||||
}
|
}
|
||||||
|
|
|
@ -480,10 +480,6 @@ namespace IDE.Debugger
|
||||||
{
|
{
|
||||||
str.Append(mSymbol);
|
str.Append(mSymbol);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToString_HitCount(String str)
|
public void ToString_HitCount(String str)
|
||||||
|
|
|
@ -361,7 +361,6 @@ namespace IDE
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
NOP!();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5380,10 +5379,6 @@ namespace IDE
|
||||||
if (createEditData)
|
if (createEditData)
|
||||||
{
|
{
|
||||||
editData = new FileEditData();
|
editData = new FileEditData();
|
||||||
if (filePath.EndsWith("main.cs"))
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
editData.mFilePath = new String(filePath);
|
editData.mFilePath = new String(filePath);
|
||||||
mFileEditData.Add(new String(fixedFilePath), editData);
|
mFileEditData.Add(new String(fixedFilePath), editData);
|
||||||
}
|
}
|
||||||
|
@ -10179,11 +10174,6 @@ namespace IDE
|
||||||
delete pendingHandler;
|
delete pendingHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expressionFlags != .None)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
mIsImmediateDebugExprEval = false;
|
mIsImmediateDebugExprEval = false;
|
||||||
|
|
||||||
String evalStr = scope String();
|
String evalStr = scope String();
|
||||||
|
|
|
@ -75,11 +75,6 @@ namespace IDE
|
||||||
Windows.DisconnectNamedPipe();
|
Windows.DisconnectNamedPipe();
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (lastError != 536)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((lastError != Windows.ERROR_PIPE_CONNECTED) && (lastError != Windows.ERROR_NO_DATA))
|
if ((lastError != Windows.ERROR_PIPE_CONNECTED) && (lastError != Windows.ERROR_NO_DATA))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1072,10 +1072,6 @@ namespace IDE
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
if ((int)(void*)this & 0xFFFF == (int)0x6180UL)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,6 @@ namespace IDE
|
||||||
|
|
||||||
public this()
|
public this()
|
||||||
{
|
{
|
||||||
NOP!();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Deref()
|
public void Deref()
|
||||||
|
@ -294,7 +293,6 @@ namespace IDE
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
NOP!();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -409,11 +409,6 @@ namespace IDE.ui
|
||||||
let dispWidth = g.mFont.GetWidth(selectedEntry.mEntryDisplay) + GS!(24);
|
let dispWidth = g.mFont.GetWidth(selectedEntry.mEntryDisplay) + GS!(24);
|
||||||
|
|
||||||
float width = mWidth - GS!(16) - mAutoCompleteListWidget.mRightBoxAdjust;
|
float width = mWidth - GS!(16) - mAutoCompleteListWidget.mRightBoxAdjust;
|
||||||
if (gApp.mMainWindow.IsKeyDown(.Alt))
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mAutoCompleteListWidget.mVertScrollbar != null)
|
if (mAutoCompleteListWidget.mVertScrollbar != null)
|
||||||
width -= GS!(18);
|
width -= GS!(18);
|
||||||
width = Math.Max(dispWidth, width);
|
width = Math.Max(dispWidth, width);
|
||||||
|
@ -1651,11 +1646,6 @@ namespace IDE.ui
|
||||||
gApp.mAutoCompletePanel.FinishBind();
|
gApp.mAutoCompletePanel.FinishBind();
|
||||||
SetIgnoreMove(false);
|
SetIgnoreMove(false);
|
||||||
|
|
||||||
if (changedAfterInfo)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((mAutoCompleteListWidget != null) && (!mAutoCompleteListWidget.mIsInitted))
|
if ((mAutoCompleteListWidget != null) && (!mAutoCompleteListWidget.mIsInitted))
|
||||||
mAutoCompleteListWidget.Init();
|
mAutoCompleteListWidget.Init();
|
||||||
if ((mInvokeWidget != null) && (!mInvokeWidget.mIsInitted))
|
if ((mInvokeWidget != null) && (!mInvokeWidget.mIsInitted))
|
||||||
|
|
|
@ -28,7 +28,6 @@ namespace IDE.ui
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
NOP!();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -534,11 +534,6 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
checkIdx++;
|
checkIdx++;
|
||||||
|
|
||||||
if (checkIdx == 0x82)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
line.Reference(lineStrView);
|
line.Reference(lineStrView);
|
||||||
if (line.Length == 0)
|
if (line.Length == 0)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -25,12 +25,7 @@ namespace IDE.ui
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
//Debug.Assert((mWatchSeriesInfo == null) || (mWatchSeriesInfo.mMoreButton == null));
|
|
||||||
|
|
||||||
if (mWatchSeriesInfo != null)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,18 +42,10 @@ namespace IDE.ui
|
||||||
|
|
||||||
public this(IWatchOwner watchOwner, HoverListView listView) : base(watchOwner, listView)
|
public this(IWatchOwner watchOwner, HoverListView listView) : base(watchOwner, listView)
|
||||||
{
|
{
|
||||||
if (mHLVItemId == 8)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
if (mHLVItemId == 8)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override WatchListViewItem GetWatchListViewItemParent()
|
public override WatchListViewItem GetWatchListViewItemParent()
|
||||||
|
@ -204,11 +191,6 @@ namespace IDE.ui
|
||||||
|
|
||||||
public override void Resize(float x, float y, float width, float height)
|
public override void Resize(float x, float y, float width, float height)
|
||||||
{
|
{
|
||||||
if (width < mWidth)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Resize(x, y, width, height);
|
base.Resize(x, y, width, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -293,17 +275,6 @@ namespace IDE.ui
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
//Debug.WriteLine("HoverWatch.~this {0}", this);
|
//Debug.WriteLine("HoverWatch.~this {0}", this);
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(mOrigEvalString))
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mListView != null)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -948,11 +919,6 @@ namespace IDE.ui
|
||||||
//var font = DarkTheme.sDarkTheme.mSmallFont;
|
//var font = DarkTheme.sDarkTheme.mSmallFont;
|
||||||
var listView = new HoverListView(this);
|
var listView = new HoverListView(this);
|
||||||
|
|
||||||
if (mListView != null)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
//Debug.WriteLine("HoverWatch.CreateListView {0}", listView);
|
//Debug.WriteLine("HoverWatch.CreateListView {0}", listView);
|
||||||
|
|
||||||
listView.mHoverWatch = this;
|
listView.mHoverWatch = this;
|
||||||
|
|
|
@ -1407,6 +1407,12 @@ namespace IDE.ui
|
||||||
clickedItem = (DarkListViewItem)clickedItem.GetSubItem(0);
|
clickedItem = (DarkListViewItem)clickedItem.GetSubItem(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (theEvent.mBtn != 0)
|
||||||
|
{
|
||||||
|
if (clickedItem.Selected)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SelectItem(clickedItem, true);
|
SelectItem(clickedItem, true);
|
||||||
|
|
||||||
if ((!clickedItem.IsParent) && (theEvent.mBtnCount > 1))
|
if ((!clickedItem.IsParent) && (theEvent.mBtnCount > 1))
|
||||||
|
|
|
@ -340,11 +340,6 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (type.IsEnum)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mApplyAction != null)
|
if (mApplyAction != null)
|
||||||
{
|
{
|
||||||
mApplyAction();
|
mApplyAction();
|
||||||
|
|
|
@ -933,11 +933,6 @@ namespace IDE.ui
|
||||||
|
|
||||||
public bool Classify(ResolveType resolveType, ResolveParams resolveParams = null)
|
public bool Classify(ResolveType resolveType, ResolveParams resolveParams = null)
|
||||||
{
|
{
|
||||||
if (resolveType == .GetFixits)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't allow other classify calls interrupt a symbol rename
|
// Don't allow other classify calls interrupt a symbol rename
|
||||||
if ((IDEApp.sApp.mSymbolReferenceHelper != null) && (IDEApp.sApp.mSymbolReferenceHelper.HasStarted) && (IDEApp.sApp.mSymbolReferenceHelper.mKind == SymbolReferenceHelper.Kind.Rename))
|
if ((IDEApp.sApp.mSymbolReferenceHelper != null) && (IDEApp.sApp.mSymbolReferenceHelper.HasStarted) && (IDEApp.sApp.mSymbolReferenceHelper.mKind == SymbolReferenceHelper.Kind.Rename))
|
||||||
return false;
|
return false;
|
||||||
|
@ -1812,10 +1807,6 @@ namespace IDE.ui
|
||||||
var sw = scope Stopwatch(true);
|
var sw = scope Stopwatch(true);
|
||||||
sw.Start();
|
sw.Start();
|
||||||
bfSystem.Lock(1);
|
bfSystem.Lock(1);
|
||||||
if (sw.ElapsedMicroseconds > 100)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
bfSystem.PerfZoneEnd();
|
bfSystem.PerfZoneEnd();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1865,11 +1856,6 @@ namespace IDE.ui
|
||||||
parser.ClassifySource(char8Data, !mIsBeefSource);
|
parser.ClassifySource(char8Data, !mIsBeefSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resolveType == .Autocomplete)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isBackground)
|
if (!isBackground)
|
||||||
{
|
{
|
||||||
String autocompleteInfo = scope String();
|
String autocompleteInfo = scope String();
|
||||||
|
@ -5225,10 +5211,7 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
for (int i < mProcessResolveCharData.Count)
|
for (int i < mProcessResolveCharData.Count)
|
||||||
{
|
{
|
||||||
if (mProcessResolveCharData[i].mDisplayFlags == 1)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkDirty();
|
MarkDirty();
|
||||||
|
|
|
@ -87,11 +87,6 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
if (mHoverWatch != null)
|
if (mHoverWatch != null)
|
||||||
{
|
{
|
||||||
if (mHoverWatch.mCloseCountdown == 1)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool hasActiveHoverWatch = false;
|
bool hasActiveHoverWatch = false;
|
||||||
|
|
||||||
if (mHoverWatch.mEditWidget != null)
|
if (mHoverWatch.mEditWidget != null)
|
||||||
|
|
|
@ -24,11 +24,6 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
if (mIsSelected != value)
|
if (mIsSelected != value)
|
||||||
{
|
{
|
||||||
if (!value)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
var threadListView = (ThreadListView)mListView;
|
var threadListView = (ThreadListView)mListView;
|
||||||
if (threadListView.mThreadPanel.mCallstackPopup != null)
|
if (threadListView.mThreadPanel.mCallstackPopup != null)
|
||||||
threadListView.mThreadPanel.mCallstackPopup.Close();
|
threadListView.mThreadPanel.mCallstackPopup.Close();
|
||||||
|
|
|
@ -50,11 +50,6 @@ namespace IDE.ui
|
||||||
else
|
else
|
||||||
isValid = gApp.mBfResolveCompiler.VerifyTypeName(editText, cursorPos);
|
isValid = gApp.mBfResolveCompiler.VerifyTypeName(editText, cursorPos);
|
||||||
|
|
||||||
if (isValid)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int ofs < editText.Length)
|
for (int ofs < editText.Length)
|
||||||
{
|
{
|
||||||
mEditWidgetContent.mData.mText[editOffset + ofs].mDisplayTypeId = isValid ? 0 : 1;
|
mEditWidgetContent.mData.mText[editOffset + ofs].mDisplayTypeId = isValid ? 0 : 1;
|
||||||
|
|
|
@ -445,11 +445,6 @@ namespace IDE.ui
|
||||||
public DarkButton mLessButton;
|
public DarkButton mLessButton;
|
||||||
public static int32 sIdx;
|
public static int32 sIdx;
|
||||||
public int32 mSeriesId = ++sIdx;
|
public int32 mSeriesId = ++sIdx;
|
||||||
|
|
||||||
public ~this()
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WatchRefreshButton : ButtonWidget
|
public class WatchRefreshButton : ButtonWidget
|
||||||
|
@ -815,8 +810,8 @@ namespace IDE.ui
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value)
|
/*if (value)
|
||||||
mParent.UpdateAll();
|
mParent.UpdateAll();*/
|
||||||
base.Selected = value;
|
base.Selected = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -831,11 +826,6 @@ namespace IDE.ui
|
||||||
|
|
||||||
public this(IWatchOwner watchOwner, IDEListView listView)
|
public this(IWatchOwner watchOwner, IDEListView listView)
|
||||||
{
|
{
|
||||||
if (mIdx == 670)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
|
|
||||||
mWatchOwner = watchOwner;
|
mWatchOwner = watchOwner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1357,7 +1347,7 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((forceDelete) ||
|
if ((forceDelete) ||
|
||||||
((wantsDelete) && (idx != 0) && (curWatchListViewItem != null) && (curWatchListViewItem.mChildAreaHeight == 0)))
|
((wantsDelete) && (idx != 0) && (curWatchListViewItem != null) && (curWatchListViewItem.mChildAreaHeight == 0) && (!curWatchListViewItem.mIsSelected)))
|
||||||
{
|
{
|
||||||
curMemberIdx--;
|
curMemberIdx--;
|
||||||
mParentItem.RemoveChildItem(curWatchListViewItem);
|
mParentItem.RemoveChildItem(curWatchListViewItem);
|
||||||
|
@ -1822,6 +1812,23 @@ namespace IDE.ui
|
||||||
|
|
||||||
SetupListViewItem(listViewItem, name, evalStr);
|
SetupListViewItem(listViewItem, name, evalStr);
|
||||||
|
|
||||||
|
if ((parentItem != null) && (parentItem.Selected))
|
||||||
|
{
|
||||||
|
// If the parentItem is selected and the next item after the parentItem is selected then we may have a selection span
|
||||||
|
// so we want to expand that selection to the newly-created item
|
||||||
|
|
||||||
|
int parentIdx = parentItem.mParentItem.GetIndexOfChild(parentItem);
|
||||||
|
if (parentIdx + 1 < parentItem.mParentItem.mChildItems.Count)
|
||||||
|
{
|
||||||
|
let nextItem = parentItem.mParentItem.mChildItems[parentIdx + 1];
|
||||||
|
if (nextItem.Selected)
|
||||||
|
{
|
||||||
|
if ((parentItem.mChildItems.Count == 1) || (parentItem.mChildItems[parentItem.mChildItems.Count - 2].Selected))
|
||||||
|
listViewItem.Selected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return listViewItem;
|
return listViewItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2126,8 +2133,11 @@ namespace IDE.ui
|
||||||
if (btnNum == 0)
|
if (btnNum == 0)
|
||||||
ListViewItemMouseDown(clickedItem, btnCount);
|
ListViewItemMouseDown(clickedItem, btnCount);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!clickedItem.GetSubItem(0).Selected)
|
||||||
ListViewItemMouseDown(clickedItem, 1);
|
ListViewItemMouseDown(clickedItem, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ClearWatchValues(ListViewItem parentListViewItem)
|
void ClearWatchValues(ListViewItem parentListViewItem)
|
||||||
{
|
{
|
||||||
|
@ -2563,11 +2573,6 @@ namespace IDE.ui
|
||||||
|
|
||||||
while (curIdx < mListView.GetRoot().GetChildCount())
|
while (curIdx < mListView.GetRoot().GetChildCount())
|
||||||
parentItem.RemoveChildItemAt(curIdx);
|
parentItem.RemoveChildItemAt(curIdx);
|
||||||
|
|
||||||
if (parentItem.GetChildCount() == 0)
|
|
||||||
{
|
|
||||||
NOP!();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2755,7 +2760,7 @@ namespace IDE.ui
|
||||||
void WithSelected(Action<ListViewItem> func)
|
void WithSelected(Action<ListViewItem> func)
|
||||||
{
|
{
|
||||||
var root = listView.GetRoot();
|
var root = listView.GetRoot();
|
||||||
root.WithSelectedItems(func);
|
root.WithSelectedItems(func, false, true);
|
||||||
|
|
||||||
if (clickedHoverItem != null)
|
if (clickedHoverItem != null)
|
||||||
func(clickedHoverItem);
|
func(clickedHoverItem);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue