using System.Collections.Generic;
using System.Windows;
using System.Windows.Media;
using System.Xml;
using Machinations.FromFlash.machinations.model;
using Machinations.UserComponents;

namespace Machinations.FromFlash.graph
{
    /// <summary>
    /// interface for graph
    /// </summary>
    public interface IGraph
    {
        List<GraphElement> Elements { get; set; }

        List<IUserComponentSchema> UserComponents { get; set; }

        void AddElement(GraphElement element);


        void RemoveElement(GraphElement element);

        XmlDocument GenerateXml();

        //void ReadXml(XmlDocument document);

        void FillXmlElement(XmlElement filled);

        void Clear();

        void OnChanged(string reason, string message = null);

        ResourceConnection CreateResourceConnection(GraphElement startElement, GraphElement endElement, Color color, string label = null);

        StateConnection CreateStateConnection(GraphElement startElement, GraphElement endElement, Color color, string label = null);
        Point GetCenter();
    }
}