Skip to content

Commit f028524

Browse files
committed
add generated code for ScottPlot 5.0
1 parent c396506 commit f028524

File tree

5 files changed

+490
-0
lines changed

5 files changed

+490
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
// Start of generated C# Markup API for Uno.WinUI
2+
#if NET8_0 && __ANDROID__
3+
4+
using System;
5+
using System.Collections.Generic;
6+
using CSharpMarkup.WinUI.GeneratedCodeUtilities;
7+
using Xaml = Microsoft.UI.Xaml;
8+
using Sp = ScottPlot;
9+
using SpUI = ScottPlot.WinUI;
10+
11+
namespace CSharpMarkup.WinUI.ScottPlot // WinUIPlot
12+
{
13+
public static partial class Helpers
14+
{
15+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
16+
public static WinUIPlot WinUIPlot(UIObject Content)
17+
{
18+
var ui = new SpUI.WinUIPlot();
19+
if (Content != null) ui.Content = Content.UI;
20+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
21+
}
22+
23+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
24+
public static WinUIPlot WinUIPlot(Xaml.Window? AppWindow = default, float? DisplayScale = default, Sp.IPlotMenu? Menu = default, Sp.IMultiplot Multiplot = default, UIObject Content = default)
25+
{
26+
var ui = new SpUI.WinUIPlot();
27+
if (AppWindow is not null) ui.AppWindow = AppWindow;
28+
if (DisplayScale is not null) ui.DisplayScale = DisplayScale.Value;
29+
if (Menu is not null) ui.Menu = Menu;
30+
if (Multiplot is not null) ui.Multiplot = Multiplot;
31+
if (Content != null) ui.Content = Content.UI;
32+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
33+
}
34+
35+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
36+
public static WinUIPlot WinUIPlot()
37+
{
38+
var ui = new SpUI.WinUIPlot();
39+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
40+
}
41+
42+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
43+
public static WinUIPlot WinUIPlot(nint javaReference, Android.Runtime.JniHandleOwnership transfer)
44+
{
45+
var ui = new SpUI.WinUIPlot(javaReference, transfer);
46+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
47+
}
48+
}
49+
50+
public partial class WinUIPlot : UserControl, IUI<SpUI.WinUIPlot>
51+
{
52+
static WinUIPlot instance;
53+
54+
internal static WinUIPlot StartChain(SpUI.WinUIPlot ui)
55+
{
56+
if (instance == null) instance = new WinUIPlot();
57+
instance.UI = ui;
58+
return instance;
59+
}
60+
61+
SpUI.WinUIPlot ui;
62+
63+
public new SpUI.WinUIPlot UI
64+
{
65+
get => ui;
66+
protected set => base.UI = ui = value;
67+
}
68+
69+
public static implicit operator Xaml.UIElement(WinUIPlot view) => view?.UI;
70+
71+
public static implicit operator SpUI.WinUIPlot(WinUIPlot view) => view?.UI;
72+
73+
public static implicit operator WinUIPlot(SpUI.WinUIPlot ui) => WinUIPlot.StartChain(ui);
74+
75+
public WinUIPlot Invoke(Action<SpUI.WinUIPlot> action) { action?.Invoke(UI); return this; }
76+
77+
protected WinUIPlot() { }
78+
}
79+
80+
public static partial class WinUIPlotExtensions
81+
{
82+
/// <summary>Set <see cref="SpUI.WinUIPlot.AppWindow"/></summary>
83+
public static TView AppWindow<TView>(this TView view, Xaml.Window? value) where TView : WinUIPlot { view.UI.AppWindow = value; return view; }
84+
85+
/// <summary>Set <see cref="SpUI.WinUIPlot.DisplayScale"/></summary>
86+
public static TView DisplayScale<TView>(this TView view, float value) where TView : WinUIPlot { view.UI.DisplayScale = value; return view; }
87+
88+
/// <summary>Set <see cref="SpUI.WinUIPlot.Menu"/></summary>
89+
public static TView Menu<TView>(this TView view, Sp.IPlotMenu? value) where TView : WinUIPlot { view.UI.Menu = value; return view; }
90+
91+
/// <summary>Set <see cref="SpUI.WinUIPlot.Multiplot"/></summary>
92+
public static TView Multiplot<TView>(this TView view, Sp.IMultiplot value) where TView : WinUIPlot { view.UI.Multiplot = value; return view; }
93+
}
94+
}
95+
96+
97+
#endif
98+
// End of generated C# Markup API for Uno.WinUI
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// Start of generated C# Markup API for Uno.WinUI
2+
#if NET8_0 && __MACCATALYST__
3+
4+
using System;
5+
using System.Collections.Generic;
6+
using CSharpMarkup.WinUI.GeneratedCodeUtilities;
7+
using Xaml = Microsoft.UI.Xaml;
8+
using Sp = ScottPlot;
9+
using SpUI = ScottPlot.WinUI;
10+
11+
namespace CSharpMarkup.WinUI.ScottPlot // WinUIPlot
12+
{
13+
public static partial class Helpers
14+
{
15+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
16+
public static WinUIPlot WinUIPlot(UIObject Content)
17+
{
18+
var ui = new SpUI.WinUIPlot();
19+
if (Content != null) ui.Content = Content.UI;
20+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
21+
}
22+
23+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
24+
public static WinUIPlot WinUIPlot(Xaml.Window? AppWindow = default, float? DisplayScale = default, Sp.IPlotMenu? Menu = default, Sp.IMultiplot Multiplot = default, UIObject Content = default)
25+
{
26+
var ui = new SpUI.WinUIPlot();
27+
if (AppWindow is not null) ui.AppWindow = AppWindow;
28+
if (DisplayScale is not null) ui.DisplayScale = DisplayScale.Value;
29+
if (Menu is not null) ui.Menu = Menu;
30+
if (Multiplot is not null) ui.Multiplot = Multiplot;
31+
if (Content != null) ui.Content = Content.UI;
32+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
33+
}
34+
35+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
36+
public static WinUIPlot WinUIPlot()
37+
{
38+
var ui = new SpUI.WinUIPlot();
39+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
40+
}
41+
42+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
43+
public static WinUIPlot WinUIPlot(nint handle)
44+
{
45+
var ui = new SpUI.WinUIPlot(handle);
46+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
47+
}
48+
49+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
50+
public static WinUIPlot WinUIPlot(ObjCRuntime.NativeHandle handle)
51+
{
52+
var ui = new SpUI.WinUIPlot(handle);
53+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
54+
}
55+
}
56+
57+
public partial class WinUIPlot : UserControl, IUI<SpUI.WinUIPlot>
58+
{
59+
static WinUIPlot instance;
60+
61+
internal static WinUIPlot StartChain(SpUI.WinUIPlot ui)
62+
{
63+
if (instance == null) instance = new WinUIPlot();
64+
instance.UI = ui;
65+
return instance;
66+
}
67+
68+
SpUI.WinUIPlot ui;
69+
70+
public new SpUI.WinUIPlot UI
71+
{
72+
get => ui;
73+
protected set => base.UI = ui = value;
74+
}
75+
76+
public static implicit operator Xaml.UIElement(WinUIPlot view) => view?.UI;
77+
78+
public static implicit operator SpUI.WinUIPlot(WinUIPlot view) => view?.UI;
79+
80+
public static implicit operator WinUIPlot(SpUI.WinUIPlot ui) => WinUIPlot.StartChain(ui);
81+
82+
public WinUIPlot Invoke(Action<SpUI.WinUIPlot> action) { action?.Invoke(UI); return this; }
83+
84+
protected WinUIPlot() { }
85+
}
86+
87+
public static partial class WinUIPlotExtensions
88+
{
89+
/// <summary>Set <see cref="SpUI.WinUIPlot.AppWindow"/></summary>
90+
public static TView AppWindow<TView>(this TView view, Xaml.Window? value) where TView : WinUIPlot { view.UI.AppWindow = value; return view; }
91+
92+
/// <summary>Set <see cref="SpUI.WinUIPlot.DisplayScale"/></summary>
93+
public static TView DisplayScale<TView>(this TView view, float value) where TView : WinUIPlot { view.UI.DisplayScale = value; return view; }
94+
95+
/// <summary>Set <see cref="SpUI.WinUIPlot.Menu"/></summary>
96+
public static TView Menu<TView>(this TView view, Sp.IPlotMenu? value) where TView : WinUIPlot { view.UI.Menu = value; return view; }
97+
98+
/// <summary>Set <see cref="SpUI.WinUIPlot.Multiplot"/></summary>
99+
public static TView Multiplot<TView>(this TView view, Sp.IMultiplot value) where TView : WinUIPlot { view.UI.Multiplot = value; return view; }
100+
}
101+
}
102+
103+
104+
#endif
105+
// End of generated C# Markup API for Uno.WinUI
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// Start of generated C# Markup API for Uno.WinUI
2+
#if NET8_0 && __WASM_OR_SKIA__ && !DESKTOP && !BROWSERWASM
3+
4+
using System;
5+
using System.Collections.Generic;
6+
using CSharpMarkup.WinUI.GeneratedCodeUtilities;
7+
using Xaml = Microsoft.UI.Xaml;
8+
using Sp = ScottPlot;
9+
using SpUI = ScottPlot.WinUI;
10+
11+
namespace CSharpMarkup.WinUI.ScottPlot // WinUIPlot
12+
{
13+
public static partial class Helpers
14+
{
15+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
16+
public static WinUIPlot WinUIPlot(UIObject Content)
17+
{
18+
var ui = new SpUI.WinUIPlot();
19+
if (Content != null) ui.Content = Content.UI;
20+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
21+
}
22+
23+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
24+
public static WinUIPlot WinUIPlot(Xaml.Window? AppWindow = default, float? DisplayScale = default, Sp.IPlotMenu? Menu = default, Sp.IMultiplot Multiplot = default, UIObject Content = default)
25+
{
26+
var ui = new SpUI.WinUIPlot();
27+
if (AppWindow is not null) ui.AppWindow = AppWindow;
28+
if (DisplayScale is not null) ui.DisplayScale = DisplayScale.Value;
29+
if (Menu is not null) ui.Menu = Menu;
30+
if (Multiplot is not null) ui.Multiplot = Multiplot;
31+
if (Content != null) ui.Content = Content.UI;
32+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
33+
}
34+
35+
/// <summary>Create a <see cref="SpUI.WinUIPlot"/></summary>
36+
public static WinUIPlot WinUIPlot()
37+
{
38+
var ui = new SpUI.WinUIPlot();
39+
return CSharpMarkup.WinUI.ScottPlot.WinUIPlot.StartChain(ui);
40+
}
41+
}
42+
43+
public partial class WinUIPlot : UserControl, IUI<SpUI.WinUIPlot>
44+
{
45+
static WinUIPlot instance;
46+
47+
internal static WinUIPlot StartChain(SpUI.WinUIPlot ui)
48+
{
49+
if (instance == null) instance = new WinUIPlot();
50+
instance.UI = ui;
51+
return instance;
52+
}
53+
54+
SpUI.WinUIPlot ui;
55+
56+
public new SpUI.WinUIPlot UI
57+
{
58+
get => ui;
59+
protected set => base.UI = ui = value;
60+
}
61+
62+
public static implicit operator Xaml.UIElement(WinUIPlot view) => view?.UI;
63+
64+
public static implicit operator SpUI.WinUIPlot(WinUIPlot view) => view?.UI;
65+
66+
public static implicit operator WinUIPlot(SpUI.WinUIPlot ui) => WinUIPlot.StartChain(ui);
67+
68+
public WinUIPlot Invoke(Action<SpUI.WinUIPlot> action) { action?.Invoke(UI); return this; }
69+
70+
protected WinUIPlot() { }
71+
}
72+
73+
public static partial class WinUIPlotExtensions
74+
{
75+
/// <summary>Set <see cref="SpUI.WinUIPlot.AppWindow"/></summary>
76+
public static TView AppWindow<TView>(this TView view, Xaml.Window? value) where TView : WinUIPlot { view.UI.AppWindow = value; return view; }
77+
78+
/// <summary>Set <see cref="SpUI.WinUIPlot.DisplayScale"/></summary>
79+
public static TView DisplayScale<TView>(this TView view, float value) where TView : WinUIPlot { view.UI.DisplayScale = value; return view; }
80+
81+
/// <summary>Set <see cref="SpUI.WinUIPlot.Menu"/></summary>
82+
public static TView Menu<TView>(this TView view, Sp.IPlotMenu? value) where TView : WinUIPlot { view.UI.Menu = value; return view; }
83+
84+
/// <summary>Set <see cref="SpUI.WinUIPlot.Multiplot"/></summary>
85+
public static TView Multiplot<TView>(this TView view, Sp.IMultiplot value) where TView : WinUIPlot { view.UI.Multiplot = value; return view; }
86+
}
87+
}
88+
89+
90+
#endif
91+
// End of generated C# Markup API for Uno.WinUI

0 commit comments

Comments
 (0)