IChangesPresenter.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. using JetBrains.Annotations;
  2. using Unity.Cloud.Collaborate.Models.Structures;
  3. namespace Unity.Cloud.Collaborate.Presenters
  4. {
  5. internal interface IChangesPresenter : IPresenter
  6. {
  7. /// <summary>
  8. /// Count of the number of toggled entries.
  9. /// </summary>
  10. int ToggledCount { get; }
  11. /// <summary>
  12. /// Count of the total number of entries.
  13. /// </summary>
  14. int TotalCount { get; }
  15. /// <summary>
  16. /// Count of the number of conflicted entries.
  17. /// </summary>
  18. int ConflictedCount { get; }
  19. /// <summary>
  20. /// Whether or no a search is occuring.
  21. /// </summary>
  22. bool Searching { get; }
  23. /// <summary>
  24. /// Toggles or untoggles the entry associated with the give path. If the toggle impacts more than the existing
  25. /// entry, then this will return true to indicate that the toggled states must be refreshed.
  26. /// </summary>
  27. /// <param name="path">Path of the associated entry.</param>
  28. /// <param name="toggled">Whether or not the entry is now toggled.</param>
  29. /// <returns>True if the list must be refreshed.</returns>
  30. bool UpdateEntryToggle([NotNull] string path, bool toggled);
  31. /// <summary>
  32. /// Request a publish with the existing values known by the presenter.
  33. /// </summary>
  34. void RequestPublish();
  35. /// <summary>
  36. /// Request a discard for the file at the given path.
  37. /// </summary>
  38. /// <param name="entry">Entry to discard.</param>
  39. void RequestDiscard([NotNull] IChangeEntry entry);
  40. /// <summary>
  41. /// Request a diff of the file at the given path.
  42. /// </summary>
  43. /// <param name="path">Path of the file to diff.</param>
  44. void RequestDiffChanges([NotNull] string path);
  45. /// <summary>
  46. /// Provide the presenter with the latest search query.
  47. /// </summary>
  48. /// <param name="query">Latest search query.</param>
  49. void SetSearchQuery([NotNull] string query);
  50. /// <summary>
  51. /// Provide the latest revision summary to the presenter.
  52. /// </summary>
  53. /// <param name="message">Latest commit message.</param>
  54. void SetRevisionSummary([NotNull] string message);
  55. /// <summary>
  56. /// Number of entries in the group overflow menu.
  57. /// </summary>
  58. int GroupOverflowEntryCount { get; }
  59. /// <summary>
  60. /// Event handler for clicking the overflow button in the changes list.
  61. /// </summary>
  62. /// <param name="x">X position of the click.</param>
  63. /// <param name="y">Y position of the click.</param>
  64. void OnClickGroupOverflow(float x, float y);
  65. /// <summary>
  66. /// Number of entries in the conflict group overflow menu.
  67. /// </summary>
  68. int ConflictGroupOverflowEntryCount { get; }
  69. /// <summary>
  70. /// Event handler for clicking the overflow button in the conflicts list.
  71. /// </summary>
  72. /// <param name="x">X position of the click.</param>
  73. /// <param name="y">Y position of the click.</param>
  74. void OnClickConflictGroupOverflow(float x, float y);
  75. /// <summary>
  76. /// Show the difference between both version of a conlicted file.
  77. /// </summary>
  78. /// <param name="path">Path of the file to show.</param>
  79. void RequestShowConflictedDifferences([NotNull] string path);
  80. /// <summary>
  81. /// Request to choose merge for the provided conflict.
  82. /// </summary>
  83. /// <param name="path">Path of the file to choose merge for.</param>
  84. void RequestChooseMerge([NotNull] string path);
  85. /// <summary>
  86. /// Request to choose mine for the provided conflict.
  87. /// </summary>
  88. /// <param name="path">Path of the file to choose mine for.</param>
  89. void RequestChooseMine([NotNull] string path);
  90. /// <summary>
  91. /// Request to choose remote for the provided conflict.
  92. /// </summary>
  93. /// <param name="path">Path of the file to choose remote for.</param>
  94. void RequestChooseRemote([NotNull] string path);
  95. }
  96. }