using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media;
using Machinations.FromFlash.graph;

namespace Machinations.GUI
{
    /// <summary>
    /// interface for views of object,which should be moved similary to elements view. Their position is defined by one point, connections can end and start in them and can be selected
    /// </summary>
    public interface IObjectView
    {
        string Label { get; set; }
        Color BaseColor { get; set; }
        ViewSelectionMode Selected { get; set; }
        ViewHighlightMode Highlighted { get; set; }
        //System.Windows.UIElement MainUiElement { get; }
        UIElement UiElement { get; }
        Point Position { get; }
        //object Model { get; }
        event Action OnLoaded;

        List<UIElement> GetAllUiElements();
        Point LinePosition(Point beforeLast);

        GraphElement GetModelElement();



        void AddConnection(IConnectionView connectionView, bool start, bool withModel = true);

        void RemoveConnection(IConnectionView connection, bool start);

        void Move(double deltaX, double deltaY);

        void Dispose();
    }

    public interface IObjectView<out T> : IObjectView
    {
        T Model { get; }
    }
}
