ILNEditor 1.3.0
See the version list below for details.
dotnet add package ILNEditor --version 1.3.0
NuGet\Install-Package ILNEditor -Version 1.3.0
<PackageReference Include="ILNEditor" Version="1.3.0" />
paket add ILNEditor --version 1.3.0
#r "nuget: ILNEditor, 1.3.0"
// Install ILNEditor as a Cake Addin #addin nuget:?package=ILNEditor&version=1.3.0 // Install ILNEditor as a Cake Tool #tool nuget:?package=ILNEditor&version=1.3.0
ILNEditor
Editor for ILNumerics (http://ilnumerics.net/) scene graphs and plot cubes.
How to use
Attach the editor to your ILPanel instance:
ILPanelEditor.AttachTo(ilPanel);
or (if you want to interact with the editor in code, e.g. serialization)
var editor = ILPanelEditor.AttachTo(ilPanel);
Open the editor dialog by clicking on an object in the graph/plot. For example, click on
- the Axes X/Y/Z for axis properties
- the SurfacePlot for ILSurface properties
- a LinePlot line for ILLinePlot properties
- etc.
Context menu (right click) provides additional options.
Public Methods
There are a few public methods on the panel editor:
ShowEditor()
open the panel editor (interactively change properties) from codeShowPlotBrowser()
open the plot browser (list of known plot types) from code
De/Serialize scene state
Scene state refers to the properties of all objects in the scene graph. It does NOT (de)serialize the actual scene graph, i.e. it does NOT restore the graph on deserialization. The scene state captures colors, line styles, visibility, fonts and font sizes, etc., all the properties defining the visual appearance of the scene. The primary use case is to save and re-apply or transfer the style to a new scene graph. To some degree the serialization is fuzzy, i.e. it still applies if objects are removed or added to the original scene (new objects obviously won't receive any styling).
Serialize settings from the current scene:
var serializer = new XmlSerializer();
editor.Serialize(serializer);
//string xmlString = serializer.SaveToString();
serializer.SaveToFile(filePath);
Deserialize settings to the current scene:
var deserializer = new XmlDeserializer();
//deserializer.LoadFromString(xmlString);
deserializer.LoadFromFile(filePath);
editor.Deserialize(deserializer);
PropertyChanged notifications
You can monitor for changes of the current scene's state by subscribing to the PropertyChanged event of the panel editor:
editor.PropertyChanged += myChangeHandler;
PlotCube menu
To customize the PlotCube menu obtain a reference to it by calling the GetPlotCubeMenu() method of the panel editor.
var menu = editor.GetPlotCubeMenu();
menu.Add("-"); // Separator
menu.Add("Click Me", null, (sender, args) => { /* do something*/ });
Disclaimer
ILNEditor is in an early phase of development and should be considered experimental.
As of today (July 2021) the plot types in ILNumerics.Toolboxes.Drawing2 are not supported yet. However, you can inject support for custom types (and still unsupported types) by adding your own wrappers to the WrapperMap
of panel editor. Of course, I hope to add support in the future.
License
ILNEditor is licensed under the terms of the MIT license (http://opensource.org/licenses/MIT, see LICENSE.txt).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. |
-
net6.0-windows7.0
- ILNumerics.Computing (>= 6.0.124)
- ILNumerics.Drawing (>= 6.0.124)
- ILNumerics.Drawing.Platforms (>= 6.0.124)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.