Skip to content

Commit 2e3d91d

Browse files
committed
0.2.0-alpha3
1 parent 5751094 commit 2e3d91d

File tree

20 files changed

+170
-169
lines changed

20 files changed

+170
-169
lines changed

CSharpMath.Analyzers/CSharpMath.Analyzers.Test/CSharpMath.Analyzers.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PrivateAssets>all</PrivateAssets>
1010
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1111
</PackageReference>
12-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.9.0" />
12+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.10.0" />
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
1414
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
1515
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />

CSharpMath.Analyzers/CSharpMath.Analyzers/CSharpMath.Analyzers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<ItemGroup>
2626
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.6.2" PrivateAssets="all" />
27-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.9.0" PrivateAssets="all" />
27+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.10.0" PrivateAssets="all" />
2828
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
2929
</ItemGroup>
3030

CSharpMath.Editor/CSharpMath.Editor.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<GeneratePackageOnBuild Condition="'$(Configuration)' == 'Release'">true</GeneratePackageOnBuild>
44
<TargetFramework>netstandard1.3</TargetFramework>
55
<LangVersion>latest</LangVersion>
6-
<PackageVersion>0.2.0-alpha2</PackageVersion>
6+
<PackageVersion>0.2.0-alpha3</PackageVersion>
77
<PackageReleaseNotes>The 0.2.0 Editor Update brings an editor interface to CSharpMath.</PackageReleaseNotes>
88
<Description>The base code for a What You See Is What You Get math editor.</Description>
99
<PackageId>CSharpMath.Editor</PackageId>
@@ -16,7 +16,7 @@
1616
<RepositoryType>git</RepositoryType>
1717
<RepositoryUrl>https://github.com/verybadcat/CSharpMath.git</RepositoryUrl>
1818
<RepositoryBranch>master</RepositoryBranch>
19-
<RepositoryCommit>f7790129228ab88cb4af2ebcfd725383488bd527</RepositoryCommit>
19+
<RepositoryCommit>5751094f494526c7463a7aaef8f531dcc44ef213</RepositoryCommit>
2020
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2121
<Copyright>© CSharpMath Contributors 2018</Copyright>
2222
</PropertyGroup>

CSharpMath.Editor/Interfaces/IMathListIndex.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,6 @@
33
using System.Text;
44

55
namespace CSharpMath.Editor {
6-
/**
7-
@typedef MTMathListSubIndexType
8-
@brief The type of the subindex.
9-
10-
The type of the subindex denotes what branch the path to the atom that this index points to takes.
11-
*/
12-
public enum MathListSubIndexType : byte {
13-
/// The index denotes the whole atom, subIndex is nil.
14-
None = 0,
15-
/// The position in the subindex is an index into the nucleus
16-
Nucleus,
17-
/// The subindex indexes into the superscript.
18-
Superscript,
19-
/// The subindex indexes into the subscript
20-
Subscript,
21-
/// The subindex indexes into the numerator (only valid for fractions)
22-
Numerator,
23-
/// The subindex indexes into the denominator (only valid for fractions)
24-
Denominator,
25-
/// The subindex indexes into the radicand (only valid for radicals)
26-
Radicand,
27-
/// The subindex indexes into the degree (only valid for radicals)
28-
Degree
29-
}
30-
316
/**
327
* An index that points to a particular character in the MTMathList. The index is a LinkedList that represents
338
* a path from the beginning of the MTMathList to reach a particular atom in the list. The next node of the path

CSharpMath.Editor/Keyboards/DefaultMathKeyboardView.cs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
2020
layoutCtor,
2121
registerPressed,
2222
new RectangleF(0, 0, 320, 225),
23-
ctor(new RectangleF(0, 0, 40, 45), "◄", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
23+
ctor(new RectangleF(0, 0, 40, 45), Constants.KeyboardSymbols.Left, DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
2424
new MathKeyboard<TButton, TLayout>(layoutCtor,
2525
registerPressed,
2626
new RectangleF(0, 45, 320, 180),
27-
#warning Replace "⸋⁄□" with image
28-
ctor(new RectangleF(0, 90, 49.5f, 45), "⸋⁄□", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
29-
ctor(new RectangleF(199, 45, 49, 45), Constants.Symbols.Multiplication.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
27+
#warning Replace Constants.KeyboardSymbols.Fraction with image
28+
ctor(new RectangleF(0, 90, 49.5f, 45), Constants.KeyboardSymbols.Fraction, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
29+
ctor(new RectangleF(199, 45, 49, 45), Constants.Symbols.Multiplication, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
3030
ctor(new RectangleF(149, 135, 50, 45), "=", 25, DefaultTitle, DefaultShadow, DefaultHighlight, DefaultDisabled),
31-
ctor(new RectangleF(199, 0, 49, 45), Constants.Symbols.Division.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
32-
#warning Replace "⬜⸋" with image
33-
ctor(new RectangleF(0, 135, 50, 45), "⬜⸋", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
31+
ctor(new RectangleF(199, 0, 49, 45), Constants.Symbols.Division, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
32+
#warning Replace Constants.KeyboardSymbols.Exponent with image
33+
ctor(new RectangleF(0, 135, 50, 45), Constants.KeyboardSymbols.Exponent, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
3434
null,
3535
null,
3636
null,
@@ -65,26 +65,26 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
6565
null,
6666
null,
6767
null,
68-
ctor(new RectangleF(248.5f, 0, 71.5f, 45), "🔙", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
69-
ctor(new RectangleF(248.5f, 135, 71.5f, 45), "🚫", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
70-
ctor(new RectangleF(248.5f, 45, 71.5f, 90), "⏎", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null)
68+
ctor(new RectangleF(248.5f, 0, 71.5f, 45), Constants.KeyboardSymbols.Back, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
69+
ctor(new RectangleF(248.5f, 135, 71.5f, 45), Constants.KeyboardSymbols.Dismiss, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
70+
ctor(new RectangleF(248.5f, 45, 71.5f, 90), Constants.KeyboardSymbols.Enter, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null)
7171
),
7272
ctor(new RectangleF(40, 0, 60, 45), "123", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
7373
new MathKeyboard<TButton, TLayout>(layoutCtor,
7474
registerPressed,
7575
new RectangleF(0, 45, 320, 180),
76-
ctor(new RectangleF(0, 90, 50, 45), "⸋⁄□", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
76+
ctor(new RectangleF(0, 90, 50, 45), Constants.KeyboardSymbols.Fraction, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
7777
null,
7878
null,
7979
null,
80-
#warning Replace "⬜⸋" with image
81-
ctor(new RectangleF(0, 135, 50, 45), "⬜⸋", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
80+
#warning Replace Constants.KeyboardSymbols.Exponent with image
81+
ctor(new RectangleF(0, 135, 50, 45), Constants.KeyboardSymbols.Exponent, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
8282
null,
8383
null,
8484
null,
8585
null,
8686
null,
87-
ctor(new RectangleF(150, 90, 49, 45), $"|⬜|", 24, DefaultTitle, DefaultShadow, DefaultHighlight, null),
87+
ctor(new RectangleF(150, 90, 49, 45), Constants.KeyboardSymbols.Absolute, 24, DefaultTitle, DefaultShadow, DefaultHighlight, null),
8888
null,
8989
new[] {
9090
ctor(new RectangleF(0, 0, 50, 45), "x", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
@@ -94,14 +94,14 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
9494
new[] {
9595
ctor(new RectangleF(50, 90, 50, 45), "{", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
9696
ctor(new RectangleF(100, 45, 50, 45), "]", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
97-
ctor(new RectangleF(150, 45, 49, 45), Constants.Symbols.LessEqual.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
97+
ctor(new RectangleF(150, 45, 49, 45), Constants.Symbols.LessEqual, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
9898
ctor(new RectangleF(50, 0, 50, 45), "(", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
9999
ctor(new RectangleF(100, 0, 50, 45), ")", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
100100
ctor(new RectangleF(150, 0, 49, 45), "<", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
101-
ctor(new RectangleF(100, 135, 50, 45), Constants.Symbols.Infinity.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
101+
ctor(new RectangleF(100, 135, 50, 45), Constants.Symbols.Infinity, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
102102
ctor(new RectangleF(50, 135, 50, 45), "!", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
103103
ctor(new RectangleF(199, 90, 50, 45), "%", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
104-
ctor(new RectangleF(199, 45, 50, 45), Constants.Symbols.GreaterEqual.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
104+
ctor(new RectangleF(199, 45, 50, 45), Constants.Symbols.GreaterEqual, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
105105
ctor(new RectangleF(199, 0, 50, 45), ">", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
106106
ctor(new RectangleF(150, 135, 49, 45), ":", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
107107
ctor(new RectangleF(199, 135, 50, 45), ",", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
@@ -115,24 +115,24 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
115115
null,
116116
null,
117117
null,
118-
ctor(new RectangleF(249, 0, 71, 45), "🔙", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
119-
ctor(new RectangleF(249, 135, 71, 45), "🚫", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
120-
ctor(new RectangleF(249, 45, 71, 90), "⏎", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
118+
ctor(new RectangleF(249, 0, 71, 45), Constants.KeyboardSymbols.Back, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
119+
ctor(new RectangleF(249, 135, 71, 45), Constants.KeyboardSymbols.Dismiss, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
120+
ctor(new RectangleF(249, 45, 71, 90), Constants.KeyboardSymbols.Enter, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
121121
),
122122
ctor(new RectangleF(100, 0, 60, 45), "()<>", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
123123
new MathKeyboard<TButton, TLayout>(layoutCtor,
124124
registerPressed,
125125
new RectangleF(0, 45, 320, 180),
126-
ctor(new RectangleF(0, 90, 49.5f, 45), "⸋⁄□", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
126+
ctor(new RectangleF(0, 90, 49.5f, 45), Constants.KeyboardSymbols.Fraction, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
127127
null,
128128
null,
129129
null,
130-
ctor(new RectangleF(0, 135, 50, 45), "⬜⸋", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
131-
ctor(new RectangleF(50, 135, 50, 45), "⎵", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
130+
ctor(new RectangleF(0, 135, 50, 45), Constants.KeyboardSymbols.Exponent, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
131+
ctor(new RectangleF(50, 135, 50, 45), Constants.KeyboardSymbols.Subscript, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
132132
null,
133-
ctor(new RectangleF(100, 135, 50, 45), "√⬜", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
134-
ctor(new RectangleF(150, 135, 49, 45), "⸋√⬜", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, DefaultDisabled),
135-
ctor(new RectangleF(150, 90, 49, 45), "ˡᵒᵍ▫", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
133+
ctor(new RectangleF(100, 135, 50, 45), Constants.KeyboardSymbols.SquareRoot, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
134+
ctor(new RectangleF(150, 135, 49, 45), Constants.KeyboardSymbols.NthRoot, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, DefaultDisabled),
135+
ctor(new RectangleF(150, 90, 49, 45), Constants.KeyboardSymbols.LogBase, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
136136
null,
137137
null,
138138
new[] {
@@ -164,9 +164,9 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
164164
null,
165165
null,
166166
null,
167-
ctor(new RectangleF(249, 0, 71, 45), "🔙", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
168-
ctor(new RectangleF(249, 135, 71, 45), "🚫", DefaultFontSize, ToBeReplacedWithImage, DefaultTitle, ToBeReplacedWithImage, null),
169-
ctor(new RectangleF(249, 45, 71, 90), "⏎", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
167+
ctor(new RectangleF(249, 0, 71, 45), Constants.KeyboardSymbols.Back, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
168+
ctor(new RectangleF(249, 135, 71, 45), Constants.KeyboardSymbols.Dismiss, DefaultFontSize, ToBeReplacedWithImage, DefaultTitle, ToBeReplacedWithImage, null),
169+
ctor(new RectangleF(249, 45, 71, 90), Constants.KeyboardSymbols.Enter, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
170170
),
171171
ctor(new RectangleF(160, 0, 60, 45), "f(x)", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
172172
new MathKeyboard<TButton, TLayout>(layoutCtor,
@@ -221,12 +221,12 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
221221
ctor(new RectangleF(144, 135, 32, 45), "σ", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
222222
ctor(new RectangleF(176, 135, 32, 45), "μ", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
223223
ctor(new RectangleF(208, 135, 32, 45), "λ", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
224-
ctor(new RectangleF(272, 90, 48, 45), "🔙", 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
225-
ctor(new RectangleF(0, 135, 80, 45), "🚫", 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
226-
ctor(new RectangleF(239, 135, 81, 45), "⏎", 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
224+
ctor(new RectangleF(272, 90, 48, 45), Constants.KeyboardSymbols.Back, 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
225+
ctor(new RectangleF(0, 135, 80, 45), Constants.KeyboardSymbols.Dismiss, 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
226+
ctor(new RectangleF(239, 135, 81, 45), Constants.KeyboardSymbols.Enter, 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
227227
),
228228
ctor(new RectangleF(220, 0, 60, 45), "abc", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
229-
ctor(new RectangleF(280, 0, 40, 45), "►", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null)
229+
ctor(new RectangleF(280, 0, 40, 45), Constants.KeyboardSymbols.Right, DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null)
230230
);
231231
}
232232
}

0 commit comments

Comments
 (0)