From 619276305282cbc61b27f62d8b375de8e48c8f16 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sun, 28 Jul 2019 10:27:13 -0400 Subject: [PATCH] Start adding some UE-specific OptionProviders --- .../FileSystemEditorOptionProvider.cs | 57 +++++++++++++ .../Plain/PlainTextEditorOptionProvider.cs | 50 +++++++++++ .../UniversalEditor.UserInterface/Engine.cs | 17 +++- .../UniversalEditor.UserInterface.csproj | 3 +- .../SingingStyleDefaultsOptionProvider.cs | 84 +++++++++++++++++++ ...or.Plugins.Multimedia.UserInterface.csproj | 2 + 6 files changed, 211 insertions(+), 2 deletions(-) create mode 100644 CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditorOptionProvider.cs create mode 100644 CSharp/Libraries/UniversalEditor.UserInterface/Editors/Text/Plain/PlainTextEditorOptionProvider.cs create mode 100644 CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/OptionProviders/SingingStyleDefaultsOptionProvider.cs diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditorOptionProvider.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditorOptionProvider.cs new file mode 100644 index 00000000..8c7944fe --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditorOptionProvider.cs @@ -0,0 +1,57 @@ +// +// FileSystemEditorOptionProvider.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +using UniversalWidgetToolkit; + +namespace UniversalEditor.Editors.FileSystem +{ + public class FileSystemEditorOptionProvider : OptionProvider + { + public FileSystemEditorOptionProvider () + { + OptionGroups.Add (new OptionGroup ("Editors:File System:Views", new Option[] + { + new BooleanOption ("Sort _folders before files"), + new BooleanOption ("Allow folders to be _expanded") + })); + OptionGroups.Add (new OptionGroup ("Editors:File System:Behavior", new Option[] + { + new BooleanOption ("_Single-click to open items"), + new BooleanOption ("Show action to create symbolic _links"), + new ChoiceOption ("Default option for _executable text files", null, new ChoiceOption.ChoiceOptionValue[] + { + new ChoiceOption.ChoiceOptionValue ("Display them in text editor", 1), + new ChoiceOption.ChoiceOptionValue ("Run them as executable", 2), + new ChoiceOption.ChoiceOptionValue ("Ask me what to do", 3) + }), + new BooleanOption ("Ask before _emptying the Trash/Recycle Bin"), + new BooleanOption ("Show action to _permanently delete files and folders") + })); + OptionGroups.Add (new OptionGroup ("Editors:File System:List Columns", new Option[] + { + })); + OptionGroups.Add (new OptionGroup ("Editors:File System:Search and Preview", new Option[] + { + })); + } + } +} + diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Editors/Text/Plain/PlainTextEditorOptionProvider.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/Text/Plain/PlainTextEditorOptionProvider.cs new file mode 100644 index 00000000..d53c74c9 --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/Text/Plain/PlainTextEditorOptionProvider.cs @@ -0,0 +1,50 @@ +// +// PlainTextEditorOptionProvider.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +using UniversalWidgetToolkit; + +namespace UniversalEditor.Editors.Text.Plain +{ + public class PlainTextEditorOptionProvider : OptionProvider + { + public PlainTextEditorOptionProvider() + { + OptionGroups.Add(new OptionGroup("Editors:Plain Text Editor", new Option[] + { + new BooleanOption("_Display line numbers"), + new BooleanOption("_Display right margin"), + new TextOption("Right margin at _column"), + new BooleanOption("Display _overview map"), + + new BooleanOption("Enable text _wrapping"), + new BooleanOption("Do not _split words over two lines"), + + new BooleanOption("Highlight current _line"), + new BooleanOption("Highlight matching _brackets"), + + new RangeOption("_Tab width", 8, 1, 24), + new BooleanOption("Insert _spaces instead of tabs"), + new BooleanOption("_Enable automatic indentation", true) + })); + } + } +} + diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs index 37b52aa4..97fbeb6a 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs @@ -60,6 +60,19 @@ namespace UniversalEditor.UserInterface protected void BeforeInitialization () { + Application.DefaultOptionProvider.OptionGroups.Add ("Application:Author Information", new Option[] { + new TextOption("_Name"), + new TextOption("_E-mail address") + }); + Application.DefaultOptionProvider.OptionGroups.Add ("Application:Documents", new Option[] { + }); + Application.DefaultOptionProvider.OptionGroups.Add("Application:Projects and Solutions", new Option[] + { + }); + Application.DefaultOptionProvider.OptionGroups.Add("Source Control", new Option[] + { + }); + // Application.EnableVisualStyles(); // Application.SetCompatibleTextRenderingDefault(false); @@ -1336,7 +1349,9 @@ namespace UniversalEditor.UserInterface splasher.InvokeUpdateStatus(message); } */ - splasher.SetStatus(message, progressValue, progressMinimum, progressMaximum); + if (!splasher.IsDisposed) { + splasher.SetStatus (message, progressValue, progressMinimum, progressMaximum); + } } private void Initialize() diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/UniversalEditor.UserInterface.csproj b/CSharp/Libraries/UniversalEditor.UserInterface/UniversalEditor.UserInterface.csproj index dbe775fa..371e4bea 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/UniversalEditor.UserInterface.csproj +++ b/CSharp/Libraries/UniversalEditor.UserInterface/UniversalEditor.UserInterface.csproj @@ -68,7 +68,6 @@ - @@ -109,6 +108,8 @@ + + diff --git a/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/OptionProviders/SingingStyleDefaultsOptionProvider.cs b/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/OptionProviders/SingingStyleDefaultsOptionProvider.cs new file mode 100644 index 00000000..9807671e --- /dev/null +++ b/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/OptionProviders/SingingStyleDefaultsOptionProvider.cs @@ -0,0 +1,84 @@ +// +// SingingStyleDefaultsOptionProvider.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +using UniversalWidgetToolkit; + +namespace UniversalEditor.Plugins.Multimedia.UserInterface.OptionProviders +{ + public class SingingStyleDefaultsOptionProvider : OptionProvider + { + public SingingStyleDefaultsOptionProvider () + { + OptionGroups.Add ("Editors:Synthesized Audio:External Programs", new Option[] + { + new BooleanOption("Use external _wavefile manipulation tool"), + new TextOption("Path"), + new BooleanOption("Use external _resampling tool"), + new TextOption("Path"), + new TextOption("Voicebank _directory") + }); + OptionGroups.Add ("Editors:Synthesized Audio:MIDI Settings", new Option[] + { + new GroupOption("MIDI Devices", new Option[] + { + new ChoiceOption("_Input device"), + new ChoiceOption("_Output device") + }), + new BooleanOption("Play notes through MIDI output upon _selection"), + new BooleanOption("Send _Program Change for the following program before continuing"), + new ChoiceOption(String.Empty) + }); + OptionGroups.Add ("Editors:Synthesized Audio:Phoneme Dictionary", new Option[] + { + }); + OptionGroups.Add ("Editors:Synthesized Audio:Synthesizers", new Option[] + { + }); + OptionGroups.Add("Editors:Synthesized Audio:Singing Style Defaults", new Option[] + { + // new CommandOption("_Load settings from VOCALOID2"), + // 2q22wnew CommandOption("_Save settings from VOCALOID2"), + new ChoiceOption("_Template", null, new ChoiceOption.ChoiceOptionValue[] + { + new ChoiceOption.ChoiceOptionValue("(Custom)", "custom"), + new ChoiceOption.ChoiceOptionValue("Normal", "normal"), + new ChoiceOption.ChoiceOptionValue("Accent", "accent"), + new ChoiceOption.ChoiceOptionValue("Strong Accent", "strongaccent"), + new ChoiceOption.ChoiceOptionValue("Legato", "legato"), + new ChoiceOption.ChoiceOptionValue("Slow Legato", "slowlegato"), + }), + new GroupOption("Pitch control", new Option[] + { + new RangeOption("_Bend depth", 8, 0, 100), + new RangeOption("Bend _length", 0, 0, 100), + new BooleanOption("Add portamento in _rising movement"), + new BooleanOption("Add portamento in _falling movement") + }), + new GroupOption("Dynamics control", new Option[] + { + new RangeOption("_Decay", 50, 0, 100), + new RangeOption("_Accent", 50, 0, 100) + }) + }); + } + } +} + diff --git a/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface.csproj b/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface.csproj index 8bc5b902..77357bc0 100644 --- a/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface.csproj +++ b/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface.csproj @@ -33,6 +33,7 @@ + @@ -40,6 +41,7 @@ +