IHistoryView.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using JetBrains.Annotations;
  4. using Unity.Cloud.Collaborate.Models.Structures;
  5. using Unity.Cloud.Collaborate.Presenters;
  6. namespace Unity.Cloud.Collaborate.Views
  7. {
  8. internal interface IHistoryView : IView<IHistoryPresenter>
  9. {
  10. /// <summary>
  11. /// Set busy status in the view.
  12. /// </summary>
  13. /// <param name="busy">Whether or not the presenter is busy with a request.</param>
  14. void SetBusyStatus(bool busy);
  15. /// <summary>
  16. /// Set the history list to be displayed. If the history list is not the current display, the view should switch
  17. /// to it upon receiving this call.
  18. /// </summary>
  19. /// <param name="list">List of entries to display.</param>
  20. void SetHistoryList(IReadOnlyList<IHistoryEntry> list);
  21. /// <summary>
  22. /// Set the current page and max page so that the paginator can be populated.
  23. /// </summary>
  24. /// <param name="page">Current page.</param>
  25. /// <param name="max">Max page.</param>
  26. void SetPage(int page, int max);
  27. /// <summary>
  28. /// Set the single history entry to display the provided entry. If the history single entry view is not the
  29. /// current display, the view should switch to it upon receiving this call.
  30. /// </summary>
  31. /// <param name="entry">Entry to display.</param>
  32. void SetSelection([NotNull] IHistoryEntry entry);
  33. /// <summary>
  34. /// Display a dialogue to the user.
  35. /// </summary>
  36. /// <param name="title">Title for the dialogue.</param>
  37. /// <param name="message">Message inside the dialogue.</param>
  38. /// <param name="affirmative">Affirmative button text.</param>
  39. /// <returns>True if affirmative is clicked.</returns>
  40. bool DisplayDialogue([NotNull] string title, [NotNull] string message, [NotNull] string affirmative);
  41. /// <summary>
  42. /// Display a dialogue to the user.
  43. /// </summary>
  44. /// <param name="title">Title for the dialogue.</param>
  45. /// <param name="message">Message inside the dialogue.</param>
  46. /// <param name="affirmative">Affirmative button text.</param>
  47. /// <param name="negative">Negative button text.</param>
  48. /// <returns>True if affirmative is clicked.</returns>
  49. bool DisplayDialogue([NotNull] string title, [NotNull] string message, [NotNull] string affirmative, [NotNull] string negative);
  50. }
  51. }