mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-26 11:38:02 +02:00
Got rid of Action<T>/Func<T>
This commit is contained in:
parent
44bd9c698f
commit
b52db47d55
37 changed files with 94 additions and 88 deletions
|
@ -53,7 +53,7 @@ namespace Beefy.theme.dark
|
|||
public FontAlign mLabelAlign = FontAlign.Centered;
|
||||
public FrameKind mFrameKind = .OnWindow;
|
||||
|
||||
public Event<Action<Menu>> mPopulateMenuAction ~ _.Dispose();
|
||||
public Event<delegate void(Menu)> mPopulateMenuAction ~ _.Dispose();
|
||||
public CBMenuWidget mCurMenuWidget;
|
||||
bool mJustClosed;
|
||||
public uint32 mBkgColor;
|
||||
|
|
|
@ -842,8 +842,8 @@ namespace Beefy.theme.dark
|
|||
public SortType mSortType = SortType() ~ { mSortType.mColumn = -1; };
|
||||
public Insets mInsets ~ delete _;
|
||||
|
||||
public Event<Action<DragEvent>> mOnDragUpdate ~ _.Dispose();
|
||||
public Event<Action<DragEvent>> mOnDragEnd ~ _.Dispose();
|
||||
public Event<delegate void(DragEvent)> mOnDragUpdate ~ _.Dispose();
|
||||
public Event<delegate void(DragEvent)> mOnDragEnd ~ _.Dispose();
|
||||
|
||||
public this()
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Beefy.theme.dark
|
|||
public bool mAllowEdit = true;
|
||||
public Object mValue;
|
||||
public List<Widget> mMoveWidgets;
|
||||
public Action<DarkSmartEdit> mValueChangedAction;
|
||||
public delegate void(DarkSmartEdit) mValueChangedAction;
|
||||
|
||||
bool mCancelingEdit;
|
||||
float mMouseDownX;
|
||||
|
|
|
@ -397,7 +397,7 @@ namespace Beefy.theme.dark
|
|||
return tabCount;
|
||||
}
|
||||
|
||||
public override void WithTabs(Action<TabbedView.TabButton> func)
|
||||
public override void WithTabs(delegate void(TabbedView.TabButton) func)
|
||||
{
|
||||
for (var tab in mTabs)
|
||||
func(tab);
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace Beefy.utils
|
|||
Clear();
|
||||
}
|
||||
|
||||
public void WithActions(Action<UndoAction> func)
|
||||
public void WithActions(delegate void(UndoAction) func)
|
||||
{
|
||||
for (var action in mUndoList)
|
||||
func(action);
|
||||
|
|
|
@ -376,7 +376,7 @@ namespace Beefy.widgets
|
|||
}
|
||||
|
||||
protected void SerializeTimeline<T>(StructuredData data, TimelineData<T> timelineData, String name,
|
||||
String[] componentNames, Action<StructuredData, T>[] writeActions, T theDefault) where T : IEquatable<T>
|
||||
String[] componentNames, Delegate[] writeActions, T theDefault) where T : IEquatable<T>
|
||||
{
|
||||
/*if ((timelineData.mEntries != null) && (timelineData.mEntries.Count > 0))
|
||||
{
|
||||
|
@ -433,7 +433,7 @@ namespace Beefy.widgets
|
|||
data.Add("ResId", resIdStr);
|
||||
}
|
||||
|
||||
SerializeTimeline(data, mTimelineAnchor, "Anchor",
|
||||
/*SerializeTimeline(data, mTimelineAnchor, "Anchor",
|
||||
scope String[] { "X", "Y" },
|
||||
scope Action<StructuredData, CompositionPos>[] { scope => CompositionPos.WriteX, scope => CompositionPos.WriteY },
|
||||
CompositionPos(0, 0));
|
||||
|
@ -451,7 +451,7 @@ namespace Beefy.widgets
|
|||
SerializeTimeline(data, mTimelineRot, "Rotation",
|
||||
scope String[] { "Angle" },
|
||||
null,
|
||||
0.0f);
|
||||
0.0f);*/
|
||||
}
|
||||
|
||||
public void RebuildChildIndices()
|
||||
|
|
|
@ -213,7 +213,7 @@ namespace Beefy.widgets
|
|||
return parentFrame;
|
||||
}
|
||||
|
||||
public void WithAllDockedWidgets(Action<DockedWidget> func)
|
||||
public void WithAllDockedWidgets(delegate void(DockedWidget) func)
|
||||
{
|
||||
for (var dockedWidget in mDockedWidgets)
|
||||
{
|
||||
|
|
|
@ -137,7 +137,7 @@ namespace Beefy.widgets
|
|||
}
|
||||
}
|
||||
|
||||
public void WithItems(Action<ListViewItem> func)
|
||||
public void WithItems(delegate void(ListViewItem) func)
|
||||
{
|
||||
if (mChildItems != null)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ namespace Beefy.widgets
|
|||
}
|
||||
}
|
||||
|
||||
public void WithSelectedItems(Action<ListViewItem> func, bool skipSelectedChildrenOnSelectedItems = false, bool skipClosed = false)
|
||||
public void WithSelectedItems(delegate void(ListViewItem) func, bool skipSelectedChildrenOnSelectedItems = false, bool skipClosed = false)
|
||||
{
|
||||
bool selfSelected = Selected;
|
||||
if (selfSelected)
|
||||
|
@ -684,7 +684,7 @@ namespace Beefy.widgets
|
|||
protected ListViewItem mRoot;
|
||||
public bool mListSizeDirty;
|
||||
public float mHeaderHeight;
|
||||
public Event<Action<ListViewItem>> mOnFocusChanged ~ _.Dispose();
|
||||
public Event<delegate void(ListViewItem)> mOnFocusChanged ~ _.Dispose();
|
||||
public float mBottomInset = 8;
|
||||
public bool mAllowMultiSelect = true;
|
||||
public Event<delegate void(ListViewItem item, float x, float y, int32 btnNum, int32 btnCount)> mOnItemMouseDown ~ _.Dispose();
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace Beefy.widgets
|
|||
public float mMaxContainerWidth = Int32.MaxValue;
|
||||
public Insets mPopupInsets = new Insets() ~ delete _;
|
||||
public bool mHasClosed;
|
||||
public Event<Action<int>> mOnSelectionChanged ~ _.Dispose();
|
||||
public Event<delegate void(int)> mOnSelectionChanged ~ _.Dispose();
|
||||
public bool mWasInitialized;
|
||||
|
||||
public this(Menu menu)
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Beefy.widgets
|
|||
{
|
||||
public Scrollbar mScrollbar;
|
||||
public DragHelper mDraggableHelper ~ delete _;
|
||||
public Event<Action<float, float>> mOnDrag ~ _.Dispose();
|
||||
public Event<delegate void(float, float)> mOnDrag ~ _.Dispose();
|
||||
|
||||
public this()
|
||||
{
|
||||
|
|
|
@ -346,7 +346,7 @@ namespace Beefy.widgets
|
|||
int32 mRefCount = 1;
|
||||
|
||||
public Event<OpenNewWindowDelegate> mOpenNewWindowDelegate ~ _.Dispose();
|
||||
public Event<Action<TabbedView>> mTabbedViewClosed ~ _.Dispose();
|
||||
public Event<delegate void(TabbedView)> mTabbedViewClosed ~ _.Dispose();
|
||||
|
||||
public SharedData Ref()
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ namespace Beefy.widgets
|
|||
|
||||
public delegate void OpenNewWindowDelegate(TabbedView tabbedView, WidgetWindow newWindow);
|
||||
|
||||
public Action<Menu> mPopulateMenuEvent;
|
||||
public delegate void(Menu) mPopulateMenuEvent;
|
||||
public float mTabHeight;
|
||||
public float mTabAreaWidth;
|
||||
public bool mNeedResizeTabs;
|
||||
|
@ -417,7 +417,7 @@ namespace Beefy.widgets
|
|||
return mTabs.Count;
|
||||
}
|
||||
|
||||
public virtual void WithTabs(Action<TabbedView.TabButton> func)
|
||||
public virtual void WithTabs(delegate void(TabbedView.TabButton) func)
|
||||
{
|
||||
for (var tab in mTabs)
|
||||
func(tab);
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace Beefy.widgets
|
|||
public Event<RemovedFromParentHandler> mOnRemovedFromParent ~ _.Dispose();
|
||||
public Event<AddedToParentHandler> mOnAddedToParent ~ _.Dispose();
|
||||
public Event<KeyDownHandler> mOnKeyDown ~ _.Dispose();
|
||||
public Event<Action<Widget>> mOnDeleted ~ _.Dispose();
|
||||
public Event<delegate void(Widget)> mOnDeleted ~ _.Dispose();
|
||||
|
||||
public Matrix Transform
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Beefy.widgets
|
|||
public Event<MouseWheelHandler> mOnMouseWheel ~ _.Dispose();
|
||||
public Event<MenuItemSelectedHandler> mOnMenuItemSelected ~ _.Dispose();
|
||||
public Event<KeyDownHandler> mOnWindowKeyDown ~ _.Dispose();
|
||||
public Event<Func<int32, int32, HitTestResult>> mOnHitTest ~ _.Dispose();
|
||||
public Event<delegate HitTestResult(int32, int32)> mOnHitTest ~ _.Dispose();
|
||||
|
||||
public static Event<MouseLeftWindowHandler> sOnMouseLeftWindow ~ _.Dispose();
|
||||
public static Event<WindowLostFocusHandler> sOnWindowLostFocus ~ _.Dispose();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue