using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Media;
using System.ComponentModel;

namespace AIStudio.Wpf.DiagramDesigner
{
    public interface IDiagramViewModel
    {
        string Name
        {
            get; set;
        }
        List<SelectableDesignerItemViewModelBase> SelectedItems
        {
            get;
        }
        ObservableCollection<SelectableDesignerItemViewModelBase> Items
        {
            get;
        }
        SelectionService SelectionService
        {
            get;
        }

        SimpleCommand CreateNewDiagramCommand
        {
            get;
        }
        SimpleCommand DirectAddItemCommand
        {
            get;
        }
        SimpleCommand AddItemCommand
        {
            get;
        }
        SimpleCommand RemoveItemCommand
        {
            get;
        }
        SimpleCommand DirectRemoveItemCommand
        {
            get;
        }
        SimpleCommand ClearSelectedItemsCommand
        {
            get;
        }
        SimpleCommand AlignTopCommand
        {
            get;
        }
        SimpleCommand AlignVerticalCentersCommand
        {
            get;
        }
        SimpleCommand AlignBottomCommand
        {
            get;
        }
        SimpleCommand AlignLeftCommand
        {
            get;
        }
        SimpleCommand AlignHorizontalCentersCommand
        {
            get;
        }
        SimpleCommand AlignRightCommand
        {
            get;
        }
        SimpleCommand BringForwardCommand
        {
            get;
        }
        SimpleCommand BringToFrontCommand
        {
            get;
        }
        SimpleCommand SendBackwardCommand
        {
            get;
        }
        SimpleCommand SendToBackCommand
        {
            get;
        }

        SimpleCommand DistributeHorizontalCommand
        {
            get;
        }
        SimpleCommand DistributeVerticalCommand
        {
            get;
        }
        SimpleCommand SelectAllCommand
        {
            get;
        }
        SimpleCommand CopyCommand
        {
            get;
        }
        SimpleCommand PasteCommand
        {
            get;
        }
        SimpleCommand CutCommand
        {
            get;
        }
        SimpleCommand DeleteCommand
        {
            get;
        }
        SimpleCommand LeftMoveCommand
        {
            get;
        }
        SimpleCommand RightMoveCommand
        {
            get;
        }
        SimpleCommand UpMoveCommand
        {
            get;
        }
        SimpleCommand DownMoveCommand
        {
            get;
        }
        SimpleCommand CenterMoveCommand
        {
            get;
        }
        SimpleCommand SameSizeCommand
        {
            get;
        }
        SimpleCommand SameWidthCommand
        {
            get;
        }
        SimpleCommand SameHeightCommand
        {
            get;
        }
        SimpleCommand SameAngleCommand
        {
            get;
        }
        SimpleCommand GroupCommand
        {
            get;
        }
        SimpleCommand UngroupCommand
        {
            get;
        }
        SimpleCommand LockCommand
        {
            get;
        }
        SimpleCommand UnlockCommand
        {
            get;
        }

        SimpleCommand UndoCommand
        {
            get;
        }
        SimpleCommand RedoCommand
        {
            get;
        }

        Func<SelectableDesignerItemViewModelBase, bool> OutAddVerify
        {
            get; set;
        }
        void ClearSelectedItems();
        bool BelongToSameGroup(IGroupable item1, IGroupable item2);
        Rect GetBoundingRectangle(IEnumerable<DesignerItemViewModelBase> items);
        void UpdateZIndex();

        bool IsReadOnly
        {
            get; set;
        }
        bool IsLoading
        {
            get; set;
        }
        Size PageSize
        {
            get; set;
        }
        PageSizeType PageSizeType
        {
            get; set;
        }
        bool ShowGrid
        {
            get; set;
        }
        Size GridCellSize
        {
            get; set;
        }
        PageSizeOrientation PageSizeOrientation
        {
            get; set;
        }
        CellHorizontalAlignment CellHorizontalAlignment
        {
            get; set;
        }
        CellVerticalAlignment CellVerticalAlignment
        {
            get; set;
        }
        double GridMargin
        {
            get; set;
        }
        Color GridColor
        {
            get; set;
        }
        DiagramType DiagramType
        {
            get; set;
        }

        Point CurrentPoint
        {
            get; set;
        }
        Color CurrentColor
        {
            get; set;
        }
        #region 如果这个赋值了，优先用这个的
        IDrawModeViewModel DrawModeViewModel
        {
            get; set;
        }
        IColorViewModel ColorViewModel
        {
            get; set;
        }
        #endregion
        //用于wpf大小与物理像素之间转换
        double ScreenScale
        {
            get; set;
        }

        void SetScreenScale();

        event PropertyChangedEventHandler PropertyChanged;

    }
}
