mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 15:46:05 +02:00
Property [Inline] changes, large container/string fixes, reload fixes
This commit is contained in:
parent
c531ade968
commit
becd673914
9 changed files with 45 additions and 37 deletions
|
@ -854,7 +854,7 @@ namespace Beefy.widgets
|
||||||
var action = new DeleteSelectionAction(this);
|
var action = new DeleteSelectionAction(this);
|
||||||
action.mMoveCursor = moveCursor;
|
action.mMoveCursor = moveCursor;
|
||||||
mData.mUndoManager.Add(action);
|
mData.mUndoManager.Add(action);
|
||||||
PhysDeleteSelection();
|
PhysDeleteSelection(moveCursor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ namespace System
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(.Method /*1*/ | .Invocation | .Property)]
|
[AttributeUsage(.Method /*1*/ | .Invocation)]
|
||||||
public struct InlineAttribute : Attribute
|
public struct InlineAttribute : Attribute
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -15,15 +15,15 @@ namespace System
|
||||||
mValue = value;
|
mValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public bool HasValue
|
public bool HasValue
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get { return mHasValue; }
|
get { return mHasValue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public T Value
|
public T Value
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (!mHasValue)
|
if (!mHasValue)
|
||||||
|
@ -35,9 +35,9 @@ namespace System
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public ref T ValueRef
|
public ref T ValueRef
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get mut
|
get mut
|
||||||
{
|
{
|
||||||
if (!mHasValue)
|
if (!mHasValue)
|
||||||
|
|
|
@ -51,64 +51,66 @@ namespace System
|
||||||
return Span<T>(array);
|
return Span<T>(array);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public int Length
|
public int Length
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return mLength;
|
return mLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Inline]
|
||||||
set mut
|
set mut
|
||||||
{
|
{
|
||||||
mLength = value;
|
mLength = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public T* Ptr
|
public T* Ptr
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return mPtr;
|
return mPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Inline]
|
||||||
set mut
|
set mut
|
||||||
{
|
{
|
||||||
mPtr = value;
|
mPtr = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public T* EndPtr
|
public T* EndPtr
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return mPtr + mLength;
|
return mPtr + mLength;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public bool IsEmpty
|
public bool IsEmpty
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return mLength == 0;
|
return mLength == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public bool IsNull
|
public bool IsNull
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return mPtr == null;
|
return mPtr == null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public ref T this[int index]
|
public ref T this[int index]
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return ref mPtr[index];
|
return ref mPtr[index];
|
||||||
|
@ -332,9 +334,9 @@ namespace System
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Inline]
|
|
||||||
public T* Ptr
|
public T* Ptr
|
||||||
{
|
{
|
||||||
|
[Inline]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return mPtr;
|
return mPtr;
|
||||||
|
|
|
@ -685,7 +685,7 @@ namespace System
|
||||||
void Realloc(int newSize)
|
void Realloc(int newSize)
|
||||||
{
|
{
|
||||||
Debug.Assert(AllocSize > 0, "String has been frozen");
|
Debug.Assert(AllocSize > 0, "String has been frozen");
|
||||||
Debug.Assert((uint_strsize)newSize <= cSizeFlags);
|
Debug.Assert((uint)newSize <= cSizeFlags);
|
||||||
char8* newPtr = new:this char8[newSize]*;
|
char8* newPtr = new:this char8[newSize]*;
|
||||||
Internal.MemCpy(newPtr, Ptr, mLength);
|
Internal.MemCpy(newPtr, Ptr, mLength);
|
||||||
if (IsDynAlloc)
|
if (IsDynAlloc)
|
||||||
|
@ -703,7 +703,7 @@ namespace System
|
||||||
void Realloc(char8* newPtr, int newSize)
|
void Realloc(char8* newPtr, int newSize)
|
||||||
{
|
{
|
||||||
Debug.Assert(AllocSize > 0, "String has been frozen");
|
Debug.Assert(AllocSize > 0, "String has been frozen");
|
||||||
Debug.Assert((uint_strsize)newSize <= cSizeFlags);
|
Debug.Assert((uint)newSize <= cSizeFlags);
|
||||||
Internal.MemCpy(newPtr, Ptr, mLength);
|
Internal.MemCpy(newPtr, Ptr, mLength);
|
||||||
if (IsDynAlloc)
|
if (IsDynAlloc)
|
||||||
delete:this mPtr;
|
delete:this mPtr;
|
||||||
|
|
|
@ -429,6 +429,12 @@ namespace System.Collections.Generic
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Insert(int index, Span<T> items)
|
||||||
|
{
|
||||||
|
if (items.Length == 0)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
public void RemoveAt(int index)
|
public void RemoveAt(int index)
|
||||||
{
|
{
|
||||||
if (((int)Internal.UnsafeCastToPtr(this) & 0xFFFF) == 0x4BA0)
|
if (((int)Internal.UnsafeCastToPtr(this) & 0xFFFF) == 0x4BA0)
|
||||||
|
|
|
@ -794,9 +794,9 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
else if (memberVals0 == ":repeat")
|
else if (memberVals0 == ":repeat")
|
||||||
{
|
{
|
||||||
int32 startIdx = int32.Parse(scope String(memberVals[1]));
|
int startIdx = Int.Parse(scope String(memberVals[1]));
|
||||||
int32 count = int32.Parse(scope String(memberVals[2]));
|
int count = Int.Parse(scope String(memberVals[2]));
|
||||||
int32 maxShow = int32.Parse(scope String(memberVals[3]));
|
int maxShow = Int.Parse(scope String(memberVals[3]));
|
||||||
|
|
||||||
String displayStr = new String(memberVals[4]);
|
String displayStr = new String(memberVals[4]);
|
||||||
String evalStr = new String(memberVals[5]);
|
String evalStr = new String(memberVals[5]);
|
||||||
|
@ -814,7 +814,7 @@ namespace IDE.ui
|
||||||
watchSeriesInfo.mEvalTemplate = evalStr;
|
watchSeriesInfo.mEvalTemplate = evalStr;
|
||||||
watchSeriesInfo.mStartIdx = startIdx;
|
watchSeriesInfo.mStartIdx = startIdx;
|
||||||
watchSeriesInfo.mCount = count;
|
watchSeriesInfo.mCount = count;
|
||||||
watchSeriesInfo.mShowPageSize = maxShow;
|
watchSeriesInfo.mShowPageSize = (int32)maxShow;
|
||||||
watchSeriesInfo.mShowPages = 1;
|
watchSeriesInfo.mShowPages = 1;
|
||||||
|
|
||||||
var memberWatch = new PendingWatch();
|
var memberWatch = new PendingWatch();
|
||||||
|
|
|
@ -354,7 +354,7 @@ namespace IDE.ui
|
||||||
|
|
||||||
editWidgetContent.mHadPersistentTextPositionDeletes = false;
|
editWidgetContent.mHadPersistentTextPositionDeletes = false;
|
||||||
editWidgetContent.mSelection = EditSelection(pos, pos + len);
|
editWidgetContent.mSelection = EditSelection(pos, pos + len);
|
||||||
editWidgetContent.DeleteSelection();
|
editWidgetContent.DeleteSelection(false);
|
||||||
|
|
||||||
// If we have modified a section of text containing breakpoint (for example), this gets encoded by
|
// If we have modified a section of text containing breakpoint (for example), this gets encoded by
|
||||||
// 'adds' of the new lines and then 'removes' of the old lines. We do a Levenshtein search for
|
// 'adds' of the new lines and then 'removes' of the old lines. We do a Levenshtein search for
|
||||||
|
@ -420,7 +420,7 @@ namespace IDE.ui
|
||||||
editWidgetContent.CursorTextPos = posTo;
|
editWidgetContent.CursorTextPos = posTo;
|
||||||
var subStr = scope String();
|
var subStr = scope String();
|
||||||
subStr.Append(text, posFrom, len);
|
subStr.Append(text, posFrom, len);
|
||||||
editWidgetContent.InsertAtCursor(subStr);
|
editWidgetContent.InsertAtCursor(subStr, .NoMoveCursor);
|
||||||
|
|
||||||
if (cmdParts.Count >= 5)
|
if (cmdParts.Count >= 5)
|
||||||
{
|
{
|
||||||
|
|
|
@ -434,9 +434,9 @@ namespace IDE.ui
|
||||||
public String mDisplayTemplate ~ delete _;
|
public String mDisplayTemplate ~ delete _;
|
||||||
public String mEvalTemplate ~ delete _;
|
public String mEvalTemplate ~ delete _;
|
||||||
public int32 mStartMemberIdx;
|
public int32 mStartMemberIdx;
|
||||||
public int32 mStartIdx;
|
public int mStartIdx;
|
||||||
public int32 mCount;
|
public int mCount;
|
||||||
public int32 mCurCount; // When counting up unsized series
|
public int mCurCount; // When counting up unsized series
|
||||||
public int32 mShowPages;
|
public int32 mShowPages;
|
||||||
public int32 mShowPageSize;
|
public int32 mShowPageSize;
|
||||||
public String mAddrs ~ delete _;
|
public String mAddrs ~ delete _;
|
||||||
|
@ -1262,10 +1262,10 @@ namespace IDE.ui
|
||||||
if (continuationDone)
|
if (continuationDone)
|
||||||
{
|
{
|
||||||
// We finally have the count
|
// We finally have the count
|
||||||
mWatchSeriesInfo.mCount = (int32)totalCount;
|
mWatchSeriesInfo.mCount = totalCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mWatchSeriesInfo.mCurCount = (int32)totalCount;
|
mWatchSeriesInfo.mCurCount = totalCount;
|
||||||
|
|
||||||
int showCount = Math.Min(totalCount, mWatchSeriesInfo.mShowPages * mWatchSeriesInfo.mShowPageSize);
|
int showCount = Math.Min(totalCount, mWatchSeriesInfo.mShowPages * mWatchSeriesInfo.mShowPageSize);
|
||||||
|
|
||||||
|
@ -1423,7 +1423,7 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
if (mWatchSeriesInfo.mMoreButton.mDisabled)
|
if (mWatchSeriesInfo.mMoreButton.mDisabled)
|
||||||
return;
|
return;
|
||||||
mWatchSeriesInfo.mShowPages = Math.Min(mWatchSeriesInfo.mShowPages + 1, 1 + (mWatchSeriesInfo.mCurCount + mWatchSeriesInfo.mShowPageSize - 1) / mWatchSeriesInfo.mShowPageSize);
|
mWatchSeriesInfo.mShowPages = (int32)Math.Min(mWatchSeriesInfo.mShowPages + 1, 1 + (mWatchSeriesInfo.mCurCount + mWatchSeriesInfo.mShowPageSize - 1) / mWatchSeriesInfo.mShowPageSize);
|
||||||
mWatchSeriesInfo.mMoreButton.mVisible = false;
|
mWatchSeriesInfo.mMoreButton.mVisible = false;
|
||||||
mWatchSeriesInfo.mLessButton.mVisible = false;
|
mWatchSeriesInfo.mLessButton.mVisible = false;
|
||||||
});
|
});
|
||||||
|
@ -2297,9 +2297,9 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
else if (memberVals0 == ":repeat")
|
else if (memberVals0 == ":repeat")
|
||||||
{
|
{
|
||||||
int32 startIdx = int32.Parse(scope String(memberVals[1]));
|
int startIdx = Int.Parse(scope String(memberVals[1]));
|
||||||
int32 count = int32.Parse(scope String(memberVals[2]));
|
int count = Int.Parse(scope String(memberVals[2]));
|
||||||
int32 maxShow = int32.Parse(scope String(memberVals[3]));
|
int maxShow = Int.Parse(scope String(memberVals[3]));
|
||||||
|
|
||||||
String displayStr = scope String(memberVals[4]);
|
String displayStr = scope String(memberVals[4]);
|
||||||
String evalStr = scope String(memberVals[5]);
|
String evalStr = scope String(memberVals[5]);
|
||||||
|
@ -2318,7 +2318,7 @@ namespace IDE.ui
|
||||||
watchSeriesInfo.mEvalTemplate = new String(evalStr);
|
watchSeriesInfo.mEvalTemplate = new String(evalStr);
|
||||||
watchSeriesInfo.mStartIdx = startIdx;
|
watchSeriesInfo.mStartIdx = startIdx;
|
||||||
watchSeriesInfo.mCount = count;
|
watchSeriesInfo.mCount = count;
|
||||||
watchSeriesInfo.mShowPageSize = maxShow;
|
watchSeriesInfo.mShowPageSize = (int32)maxShow;
|
||||||
watchSeriesInfo.mShowPages = 1;
|
watchSeriesInfo.mShowPages = 1;
|
||||||
|
|
||||||
WatchListViewItem memberItem;
|
WatchListViewItem memberItem;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue