mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Split into smaller projects, now uses plugins.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
||||
}
|
37
RainmeterStudio.Core/Documents/DocumentTemplate.cs
Normal file
37
RainmeterStudio.Core/Documents/DocumentTemplate.cs
Normal 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();
|
||||
}
|
||||
}
|
25
RainmeterStudio.Core/Documents/IDocumentEditor.cs
Normal file
25
RainmeterStudio.Core/Documents/IDocumentEditor.cs
Normal 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; }
|
||||
}
|
||||
}
|
25
RainmeterStudio.Core/Documents/IDocumentEditorFactory.cs
Normal file
25
RainmeterStudio.Core/Documents/IDocumentEditorFactory.cs
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user