Skip to content

Commit

Permalink
0.2.0-alpha3
Browse files Browse the repository at this point in the history
  • Loading branch information
Happypig375 committed Nov 24, 2018
1 parent 5751094 commit 2e3d91d
Show file tree
Hide file tree
Showing 20 changed files with 170 additions and 169 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.9.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.6.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.9.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.10.0" PrivateAssets="all" />
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions CSharpMath.Editor/CSharpMath.Editor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<GeneratePackageOnBuild Condition="'$(Configuration)' == 'Release'">true</GeneratePackageOnBuild>
<TargetFramework>netstandard1.3</TargetFramework>
<LangVersion>latest</LangVersion>
<PackageVersion>0.2.0-alpha2</PackageVersion>
<PackageVersion>0.2.0-alpha3</PackageVersion>
<PackageReleaseNotes>The 0.2.0 Editor Update brings an editor interface to CSharpMath.</PackageReleaseNotes>
<Description>The base code for a What You See Is What You Get math editor.</Description>
<PackageId>CSharpMath.Editor</PackageId>
Expand All @@ -16,7 +16,7 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/verybadcat/CSharpMath.git</RepositoryUrl>
<RepositoryBranch>master</RepositoryBranch>
<RepositoryCommit>f7790129228ab88cb4af2ebcfd725383488bd527</RepositoryCommit>
<RepositoryCommit>5751094f494526c7463a7aaef8f531dcc44ef213</RepositoryCommit>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>© CSharpMath Contributors 2018</Copyright>
</PropertyGroup>
Expand Down
25 changes: 0 additions & 25 deletions CSharpMath.Editor/Interfaces/IMathListIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,6 @@
using System.Text;

namespace CSharpMath.Editor {
/**
@typedef MTMathListSubIndexType
@brief The type of the subindex.
The type of the subindex denotes what branch the path to the atom that this index points to takes.
*/
public enum MathListSubIndexType : byte {
/// The index denotes the whole atom, subIndex is nil.
None = 0,
/// The position in the subindex is an index into the nucleus
Nucleus,
/// The subindex indexes into the superscript.
Superscript,
/// The subindex indexes into the subscript
Subscript,
/// The subindex indexes into the numerator (only valid for fractions)
Numerator,
/// The subindex indexes into the denominator (only valid for fractions)
Denominator,
/// The subindex indexes into the radicand (only valid for radicals)
Radicand,
/// The subindex indexes into the degree (only valid for radicals)
Degree
}

/**
* An index that points to a particular character in the MTMathList. The index is a LinkedList that represents
* a path from the beginning of the MTMathList to reach a particular atom in the list. The next node of the path
Expand Down
66 changes: 33 additions & 33 deletions CSharpMath.Editor/Keyboards/DefaultMathKeyboardView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
layoutCtor,
registerPressed,
new RectangleF(0, 0, 320, 225),
ctor(new RectangleF(0, 0, 40, 45), "◄", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(0, 0, 40, 45), Constants.KeyboardSymbols.Left, DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
new MathKeyboard<TButton, TLayout>(layoutCtor,
registerPressed,
new RectangleF(0, 45, 320, 180),
#warning Replace "⸋⁄□" with image
ctor(new RectangleF(0, 90, 49.5f, 45), "⸋⁄□", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(199, 45, 49, 45), Constants.Symbols.Multiplication.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
#warning Replace Constants.KeyboardSymbols.Fraction with image
ctor(new RectangleF(0, 90, 49.5f, 45), Constants.KeyboardSymbols.Fraction, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(199, 45, 49, 45), Constants.Symbols.Multiplication, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(149, 135, 50, 45), "=", 25, DefaultTitle, DefaultShadow, DefaultHighlight, DefaultDisabled),
ctor(new RectangleF(199, 0, 49, 45), Constants.Symbols.Division.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
#warning Replace "⬜⸋" with image
ctor(new RectangleF(0, 135, 50, 45), "⬜⸋", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(199, 0, 49, 45), Constants.Symbols.Division, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
#warning Replace Constants.KeyboardSymbols.Exponent with image
ctor(new RectangleF(0, 135, 50, 45), Constants.KeyboardSymbols.Exponent, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
null,
null,
null,
Expand Down Expand Up @@ -65,26 +65,26 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
null,
null,
null,
ctor(new RectangleF(248.5f, 0, 71.5f, 45), "🔙", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(248.5f, 135, 71.5f, 45), "🚫", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(248.5f, 45, 71.5f, 90), "⏎", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null)
ctor(new RectangleF(248.5f, 0, 71.5f, 45), Constants.KeyboardSymbols.Back, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(248.5f, 135, 71.5f, 45), Constants.KeyboardSymbols.Dismiss, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(248.5f, 45, 71.5f, 90), Constants.KeyboardSymbols.Enter, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null)
),
ctor(new RectangleF(40, 0, 60, 45), "123", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
new MathKeyboard<TButton, TLayout>(layoutCtor,
registerPressed,
new RectangleF(0, 45, 320, 180),
ctor(new RectangleF(0, 90, 50, 45), "⸋⁄□", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(0, 90, 50, 45), Constants.KeyboardSymbols.Fraction, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
null,
null,
null,
#warning Replace "⬜⸋" with image
ctor(new RectangleF(0, 135, 50, 45), "⬜⸋", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
#warning Replace Constants.KeyboardSymbols.Exponent with image
ctor(new RectangleF(0, 135, 50, 45), Constants.KeyboardSymbols.Exponent, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
null,
null,
null,
null,
null,
ctor(new RectangleF(150, 90, 49, 45), $"|⬜|", 24, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(150, 90, 49, 45), Constants.KeyboardSymbols.Absolute, 24, DefaultTitle, DefaultShadow, DefaultHighlight, null),
null,
new[] {
ctor(new RectangleF(0, 0, 50, 45), "x", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
Expand All @@ -94,14 +94,14 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
new[] {
ctor(new RectangleF(50, 90, 50, 45), "{", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(100, 45, 50, 45), "]", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(150, 45, 49, 45), Constants.Symbols.LessEqual.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(150, 45, 49, 45), Constants.Symbols.LessEqual, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(50, 0, 50, 45), "(", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(100, 0, 50, 45), ")", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(150, 0, 49, 45), "<", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(100, 135, 50, 45), Constants.Symbols.Infinity.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(100, 135, 50, 45), Constants.Symbols.Infinity, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(50, 135, 50, 45), "!", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(199, 90, 50, 45), "%", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(199, 45, 50, 45), Constants.Symbols.GreaterEqual.ToString(), DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(199, 45, 50, 45), Constants.Symbols.GreaterEqual, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(199, 0, 50, 45), ">", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(150, 135, 49, 45), ":", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(199, 135, 50, 45), ",", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
Expand All @@ -115,24 +115,24 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
null,
null,
null,
ctor(new RectangleF(249, 0, 71, 45), "🔙", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(249, 135, 71, 45), "🚫", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(249, 45, 71, 90), "⏎", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
ctor(new RectangleF(249, 0, 71, 45), Constants.KeyboardSymbols.Back, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(249, 135, 71, 45), Constants.KeyboardSymbols.Dismiss, DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(249, 45, 71, 90), Constants.KeyboardSymbols.Enter, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
),
ctor(new RectangleF(100, 0, 60, 45), "()<>", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
new MathKeyboard<TButton, TLayout>(layoutCtor,
registerPressed,
new RectangleF(0, 45, 320, 180),
ctor(new RectangleF(0, 90, 49.5f, 45), "⸋⁄□", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(0, 90, 49.5f, 45), Constants.KeyboardSymbols.Fraction, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
null,
null,
null,
ctor(new RectangleF(0, 135, 50, 45), "⬜⸋", 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(50, 135, 50, 45), "⎵", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(0, 135, 50, 45), Constants.KeyboardSymbols.Exponent, 18, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(50, 135, 50, 45), Constants.KeyboardSymbols.Subscript, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
null,
ctor(new RectangleF(100, 135, 50, 45), "√⬜", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(150, 135, 49, 45), "⸋√⬜", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, DefaultDisabled),
ctor(new RectangleF(150, 90, 49, 45), "ˡᵒᵍ▫", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(100, 135, 50, 45), Constants.KeyboardSymbols.SquareRoot, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(150, 135, 49, 45), Constants.KeyboardSymbols.NthRoot, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, DefaultDisabled),
ctor(new RectangleF(150, 90, 49, 45), Constants.KeyboardSymbols.LogBase, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
null,
null,
new[] {
Expand Down Expand Up @@ -164,9 +164,9 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
null,
null,
null,
ctor(new RectangleF(249, 0, 71, 45), "🔙", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(249, 135, 71, 45), "🚫", DefaultFontSize, ToBeReplacedWithImage, DefaultTitle, ToBeReplacedWithImage, null),
ctor(new RectangleF(249, 45, 71, 90), "⏎", DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
ctor(new RectangleF(249, 0, 71, 45), Constants.KeyboardSymbols.Back, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(249, 135, 71, 45), Constants.KeyboardSymbols.Dismiss, DefaultFontSize, ToBeReplacedWithImage, DefaultTitle, ToBeReplacedWithImage, null),
ctor(new RectangleF(249, 45, 71, 90), Constants.KeyboardSymbols.Enter, DefaultFontSize, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
),
ctor(new RectangleF(160, 0, 60, 45), "f(x)", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
new MathKeyboard<TButton, TLayout>(layoutCtor,
Expand Down Expand Up @@ -221,12 +221,12 @@ public static MathKeyboardView<TButton, TLayout> Default(ButtonCtor ctor, Func<T
ctor(new RectangleF(144, 135, 32, 45), "σ", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(176, 135, 32, 45), "μ", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(208, 135, 32, 45), "λ", DefaultFontSize, DefaultTitle, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(272, 90, 48, 45), "🔙", 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(0, 135, 80, 45), "🚫", 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(239, 135, 81, 45), "⏎", 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
ctor(new RectangleF(272, 90, 48, 45), Constants.KeyboardSymbols.Back, 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(0, 135, 80, 45), Constants.KeyboardSymbols.Dismiss, 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null),
ctor(new RectangleF(239, 135, 81, 45), Constants.KeyboardSymbols.Enter, 27, ToBeReplacedWithImage, DefaultShadow, ToBeReplacedWithImage, null)
),
ctor(new RectangleF(220, 0, 60, 45), "abc", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null),
ctor(new RectangleF(280, 0, 40, 45), "►", DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null)
ctor(new RectangleF(280, 0, 40, 45), Constants.KeyboardSymbols.Right, DefaultFontSize, DefaultTitleBar, DefaultShadow, DefaultHighlight, null)
);
}
}
Expand Down
Loading

0 comments on commit 2e3d91d

Please sign in to comment.