Start adding some UE-specific OptionProviders

This commit is contained in:
Michael Becker 2019-07-28 10:27:13 -04:00
parent 44e2df5f08
commit 6192763052
6 changed files with 211 additions and 2 deletions

View File

@ -0,0 +1,57 @@
//
// FileSystemEditorOptionProvider.cs
//
// Author:
// Mike Becker <alcexhim@gmail.com>
//
// 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 <http://www.gnu.org/licenses/>.
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<int> ("Default option for _executable text files", null, new ChoiceOption<int>.ChoiceOptionValue[]
{
new ChoiceOption<int>.ChoiceOptionValue ("Display them in text editor", 1),
new ChoiceOption<int>.ChoiceOptionValue ("Run them as executable", 2),
new ChoiceOption<int>.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[]
{
}));
}
}
}

View File

@ -0,0 +1,50 @@
//
// PlainTextEditorOptionProvider.cs
//
// Author:
// Mike Becker <alcexhim@gmail.com>
//
// 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 <http://www.gnu.org/licenses/>.
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)
}));
}
}
}

View File

@ -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()

View File

@ -68,7 +68,6 @@
<Compile Include="HostApplicationOutputWindow.cs" />
<Compile Include="Editor.cs" />
<Compile Include="IHostApplicationWindow.cs" />
<Compile Include="IOptionPanelImplementation.cs" />
<Compile Include="Language.cs" />
<Compile Include="ObjectModelChangingEvent.cs" />
<Compile Include="Perspective.cs" />
@ -109,6 +108,8 @@
<Compile Include="Dialogs\GenericBrowserPopup.Designer.cs" />
<Compile Include="Dialogs\CustomOptionsDialog.cs" />
<Compile Include="Panels\StartPagePanel.cs" />
<Compile Include="Editors\FileSystem\FileSystemEditorOptionProvider.cs" />
<Compile Include="Editors\Text\Plain\PlainTextEditorOptionProvider.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">

View File

@ -0,0 +1,84 @@
//
// SingingStyleDefaultsOptionProvider.cs
//
// Author:
// Mike Becker <alcexhim@gmail.com>
//
// 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 <http://www.gnu.org/licenses/>.
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<int>("_Input device"),
new ChoiceOption<int>("_Output device")
}),
new BooleanOption("Play notes through MIDI output upon _selection"),
new BooleanOption("Send _Program Change for the following program before continuing"),
new ChoiceOption<int>(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<string>("_Template", null, new ChoiceOption<string>.ChoiceOptionValue[]
{
new ChoiceOption<string>.ChoiceOptionValue("(Custom)", "custom"),
new ChoiceOption<string>.ChoiceOptionValue("Normal", "normal"),
new ChoiceOption<string>.ChoiceOptionValue("Accent", "accent"),
new ChoiceOption<string>.ChoiceOptionValue("Strong Accent", "strongaccent"),
new ChoiceOption<string>.ChoiceOptionValue("Legato", "legato"),
new ChoiceOption<string>.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)
})
});
}
}
}

View File

@ -33,6 +33,7 @@
<Compile Include="Editors\Multimedia\Picture\PictureEditor.cs" />
<Compile Include="Editors\Multimedia\Picture\PictureEditor.Designer.cs" />
<Compile Include="Controls\DrawingArea\DrawingAreaControl.cs" />
<Compile Include="OptionProviders\SingingStyleDefaultsOptionProvider.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Editors\" />
@ -40,6 +41,7 @@
<Folder Include="Editors\Multimedia\Picture\" />
<Folder Include="Controls\" />
<Folder Include="Controls\DrawingArea\" />
<Folder Include="OptionProviders\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Libraries\UniversalEditor.Core\UniversalEditor.Core.csproj">