Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ generated parser, on netstandard2.0): keep it so, and keep containers and other
| `samples/SharpEquations.Wpf.Demo/` | A window with the editor of `SharpEquations.Wpf` (Windows) |
| `samples/SharpEquations.WinForms.Demo/` | A form with the editor of `SharpEquations.WinForms` (Windows) |
| `samples/SharpEquations.Avalonia.Browser.Demo/` | The same demo on WebAssembly (needs the `wasm-tools` workload, so not in the solution; `.github/workflows/demo.yml` publishes it to GitHub Pages) |
| `samples/SharpEquations.Avalonia.MathTools.Demo/` | A second app, math tools around the editor: its views (`MathToolsView`, a page each: the scientific keypad, the library of formulas, whose Graph button draws a formula on the graphs page, the unit converter, the solver of triangles, the graphs: `GraphsPage` on a `GraphView`, a slider for each parameter; the graphs in space: `Graphs3DPage` on a `Graph3DView`, OpenGL through Silk.NET where there is a context and the Skia painter elsewhere, in the browser too; the worksheet: `WorksheetPage`) and the desktop window |
| `samples/SharpEquations.Avalonia.MathTools.Demo/` | A second app, math tools around the editor, in MVVM: the view models (`ViewModels/`: `MathToolsViewModel` and one for each page, over a small `ObservableObject` and `RelayCommand`, no package; the tests drive them) and the views in AXAML with compiled bindings (`Views/`: `MathToolsView`, with the brushes, the styles and the `Card` of the pages, a page each: the scientific keypad, the library of formulas, whose Graph button draws a formula on the graphs page, the unit converter, the solver of triangles, the graphs: `GraphsPage` on a `GraphView`, a slider for each parameter; the graphs in space: `Graphs3DPage` on a `Graph3DView`, OpenGL through Silk.NET where there is a context and the Skia painter elsewhere, in the browser too; the worksheet: `WorksheetPage`) and the desktop window |
| `samples/SharpEquations.MathTools.Core/` | The math tools without a user interface: `ICasEngine` (`AngouriMathEngine`, through `MathReader`, which reads what the normalized presentation MathML means: in radians or degrees, systems of equations, definitions `a≔5`), the formulas (a `GraphPreset` for those with a graph: the equation drawn and its parameters at their starting values, Greek letters too), the units (NIST factors) and triangles, the equations of the graphs in space (`SurfacePlot`: z=f(x,y) or a curve x,y,z of t, with their parameters), the `Worksheet` (the history of what was computed, kept as JSON in the settings, its definitions made again when it is read back), and the services the views ask the platform for (`ISettingsStore`: a file on the desktop, the local storage in the browser) |
| `samples/SharpEquations.MathTools.Graphing/` | The graphs of the math tools without a user interface: the region shown (`Viewport`), the marks of the axes, the points of a curve (`Sampler`: closer where it bends, broken at asymptotes and steps) and where a relation of x and y holds (`Contours`); in space, the meshes and curves in a cube (`Scene3D`), the camera turning around it (`OrbitCamera`) and the painter's algorithm that draws them without a graphics card (`Painter3D`) |
| `samples/SharpEquations.Avalonia.Browser.MathTools.Demo/` | The math tools on WebAssembly (as the web demo, not in the solution build; `demo.yml` publishes them under `math/`) |
Expand Down
2 changes: 1 addition & 1 deletion docs/EDITOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ of WinUI, the same code builds for WinUI 3 of the Windows App SDK (`net10.0-wind
off Windows; `UnoDisableRemoveUnsupportedTargetFrameworks` keeps it, since a library needs none of the tools of Windows
that an app does). The class that the XAML generator of Uno adds to a library (`GlobalStaticResources`) exists on the
targets of Uno only, so its public API is in `PublicAPI/Uno/`. The demo runs on WinUI too, without a package and with
the Windows App SDK in it (its own `Main` in `Platforms/Windows`, since the app has no XAML); it builds on Windows only.
the Windows App SDK in it; it builds on Windows only.

- **Drawing**: `MathCanvas` turns the `IMathCanvas` of the view into the children of a `Canvas`: rectangles, lines and
ellipses as shapes, each glyph as a `Path` from its outline (`OpenTypeMathFont.GetOutline`: the charstrings of CFF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
<RunAOTCompilation Condition="'$(Configuration)' == 'Release'">true</RunAOTCompilation>
<WasmBuildNative>true</WasmBuildNative>
<WasmEnableThreads>false</WasmEnableThreads>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

<ItemGroup>
<!-- the views of the desktop app (every file but its window and its entry point); the engine and the tools are
in SharpEquations.MathTools.Core, the graphs in SharpEquations.MathTools.Graphing -->
<Compile Include="..\SharpEquations.Avalonia.MathTools.Demo\*.cs" Exclude="..\SharpEquations.Avalonia.MathTools.Demo\Program.cs;..\SharpEquations.Avalonia.MathTools.Demo\MainWindow.cs" LinkBase="MathTools" />
<!-- the view models and the views of the desktop app (every file but its app, its window and its entry point);
the engine and the tools are in SharpEquations.MathTools.Core, the graphs in SharpEquations.MathTools.Graphing -->
<Compile Include="..\SharpEquations.Avalonia.MathTools.Demo\MathToolsTheme.cs;..\SharpEquations.Avalonia.MathTools.Demo\ViewModels\*.cs;..\SharpEquations.Avalonia.MathTools.Demo\Views\*.cs" LinkBase="MathTools" />
<AvaloniaXaml Include="..\SharpEquations.Avalonia.MathTools.Demo\Views\*.axaml" LinkBase="MathTools" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions samples/SharpEquations.Avalonia.Demo/App.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SharpEquations.Avalonia.Demo.App"
Name="SharpEquations"
RequestedThemeVariant="Default" />
23 changes: 23 additions & 0 deletions samples/SharpEquations.Avalonia.Demo/App.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace SharpEquations.Avalonia.Demo
{
using global::Avalonia;
using global::Avalonia.Controls.ApplicationLifetimes;
using global::Avalonia.Markup.Xaml;

/// <summary>The app of the desktop demo: the theme the WebAssembly demo has too, and <see cref="MainWindow"/>.</summary>
public sealed partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
DemoTheme.Apply(this);
}

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
desktop.MainWindow = new MainWindow();
base.OnFrameworkInitializationCompleted();
}
}
}
9 changes: 9 additions & 0 deletions samples/SharpEquations.Avalonia.Demo/MainWindow.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:demo="using:SharpEquations.Avalonia.Demo"
x:Class="SharpEquations.Avalonia.Demo.MainWindow"
Title="SharpEquations — equation editor"
Width="1240"
Height="900">
<demo:DemoView />
</Window>
10 changes: 10 additions & 0 deletions samples/SharpEquations.Avalonia.Demo/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace SharpEquations.Avalonia.Demo
{
using global::Avalonia.Controls;

/// <summary>The window of the desktop demo: the view the WebAssembly demo shows too.</summary>
public sealed partial class MainWindow : Window
{
public MainWindow() => InitializeComponent();
}
}
16 changes: 0 additions & 16 deletions samples/SharpEquations.Avalonia.Demo/MainWindow.cs

This file was deleted.

13 changes: 0 additions & 13 deletions samples/SharpEquations.Avalonia.Demo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ namespace SharpEquations.Avalonia.Demo
{
using System;
using global::Avalonia;
using global::Avalonia.Controls.ApplicationLifetimes;

public static class Program
{
Expand All @@ -11,16 +10,4 @@ public static class Program

public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure<App>().UsePlatformDetect();
}

public sealed class App : Application
{
public override void Initialize() => DemoTheme.Apply(this);

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
desktop.MainWindow = new MainWindow();
base.OnFrameworkInitializationCompleted();
}
}
}
Loading
Loading