IDocument.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System.Collections.Generic;
  2. using Avalonia.Media.Imaging;
  3. using ChunkyImageLib;
  4. using ChunkyImageLib.DataHolders;
  5. using PixiEditor.AvaloniaUI.Helpers;
  6. using PixiEditor.AvaloniaUI.Models.DocumentModels.Public;
  7. using PixiEditor.AvaloniaUI.Models.Structures;
  8. using PixiEditor.AvaloniaUI.Models.Tools;
  9. using PixiEditor.ChangeableDocument.Rendering;
  10. using PixiEditor.DrawingApi.Core.ColorsImpl;
  11. using PixiEditor.DrawingApi.Core.Numerics;
  12. using PixiEditor.DrawingApi.Core.Surface;
  13. using PixiEditor.DrawingApi.Core.Surface.Vector;
  14. using PixiEditor.Extensions.CommonApi.Palettes;
  15. using PixiEditor.Numerics;
  16. namespace PixiEditor.AvaloniaUI.Models.Handlers;
  17. internal interface IDocument : IHandler
  18. {
  19. public ObservableRangeCollection<PaletteColor> Palette { get; set; }
  20. public VecI SizeBindable { get; }
  21. public IStructureMemberHandler? SelectedStructureMember { get; }
  22. public IReferenceLayerHandler ReferenceLayerHandler { get; }
  23. public IAnimationHandler AnimationHandler { get; }
  24. public VectorPath SelectionPathBindable { get; }
  25. public INodeGraphHandler NodeGraphHandler { get; }
  26. public Dictionary<ChunkResolution, Surface> Surfaces { get; set; }
  27. public DocumentStructureModule StructureHelper { get; }
  28. public Surface PreviewSurface { get; set; }
  29. public bool AllChangesSaved { get; }
  30. public string CoordinatesString { get; set; }
  31. public IReadOnlyCollection<IStructureMemberHandler> SoftSelectedStructureMembers { get; }
  32. public ILayerHandlerFactory LayerHandlerFactory { get; }
  33. public IFolderHandlerFactory FolderHandlerFactory { get; }
  34. public ITransformHandler TransformHandler { get; }
  35. public bool Busy { get; set; }
  36. public ILineOverlayHandler LineToolOverlayHandler { get; }
  37. public bool HorizontalSymmetryAxisEnabledBindable { get; }
  38. public bool VerticalSymmetryAxisEnabledBindable { get; }
  39. public double HorizontalSymmetryAxisYBindable { get; }
  40. public double VerticalSymmetryAxisXBindable { get; }
  41. public IDocumentOperations Operations { get; }
  42. public DocumentRenderer Renderer { get; }
  43. public void RemoveSoftSelectedMember(IStructureMemberHandler member);
  44. public void ClearSoftSelectedMembers();
  45. public void AddSoftSelectedMember(IStructureMemberHandler member);
  46. public void SetSelectedMember(IStructureMemberHandler member);
  47. public void SetHorizontalSymmetryAxisY(double infoNewPosition);
  48. public void SetVerticalSymmetryAxisX(double infoNewPosition);
  49. public void SetHorizontalSymmetryAxisEnabled(bool infoState);
  50. public void SetVerticalSymmetryAxisEnabled(bool infoState);
  51. public void UpdateSelectionPath(VectorPath infoNewPath);
  52. public void SetSize(VecI infoSize);
  53. public Color PickColor(VecD controllerLastPrecisePosition, DocumentScope scope, bool includeReference, bool includeCanvas, int frame, bool isTopMost);
  54. public List<Guid> ExtractSelectedLayers(bool includeFoldersWithMask = false);
  55. public void UpdateSavedState();
  56. }