Split into smaller projects, now uses plugins.

This commit is contained in:
2014-08-12 16:33:13 +03:00
parent 69913fa251
commit b8c8f2a1b0
80 changed files with 1520 additions and 494 deletions

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace RainmeterStudio.Core.Documents.DocumentEditorFeatures
{
public interface ICustomDocumentTitleProvider
{
string Title { get; }
event EventHandler TitleChanged;
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.Core.Documents.DocumentEditorFeatures
{
interface ISelectionPropertiesProvider
{
string SelectionName { get; }
IEnumerable<Property> SelectionProperties { get; }
event EventHandler SelectionChanged;
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace RainmeterStudio.Core.Documents.DocumentEditorFeatures
{
public interface IToolboxProvider
{
bool SupportsToolboxDrop { get; }
IEnumerable<string> ToolboxItems { get; }
event EventHandler ToolboxItemsChanged;
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace RainmeterStudio.Core.Documents.DocumentEditorFeatures
{
public interface IUndoSupport
{
// TODO
}
}

View File

@ -0,0 +1,37 @@
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.Core.Documents
{
/// <summary>
/// Represents a document template
/// </summary>
public abstract class DocumentTemplate
{
/// <summary>
/// Gets the document template name
/// </summary>
public string Name { get; private set; }
/// <summary>
/// Gets the default extension of this template
/// </summary>
public string DefaultExtension { get; private set; }
/// <summary>
/// Initializes the document template
/// </summary>
/// <param name="name">Name of template</param>
/// <param name="defaultExtension">Default extension</param>
public DocumentTemplate(string name, string defaultExtension)
{
Name = name;
DefaultExtension = defaultExtension;
}
/// <summary>
/// Creates a document using this template
/// </summary>
/// <returns></returns>
public abstract IDocument CreateDocument();
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.Core.Documents
{
/// <summary>
/// A document editor
/// </summary>
public interface IDocumentEditor
{
/// <summary>
/// Gets the document attached to this editor instance
/// </summary>
IDocument AttachedDocument { get; }
/// <summary>
/// Gets the UI control to display for this editor
/// </summary>
UIElement EditorUI { get; }
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.Core.Documents
{
public interface IDocumentEditorFactory
{
/// <summary>
/// Creates a new editor object
/// </summary>
/// <param name="document">Document to be edited by the editor</param>
/// <returns>A new document editor</returns>
IDocumentEditor CreateEditor(IDocument document);
/// <summary>
/// Tests if this editor can edit this document type
/// </summary>
/// <param name="type">Document type</param>
/// <returns>True if the editor can edit the document type</returns>
bool CanEdit(Type type);
}
}