BaseInterfaces.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Text;
  7. using System.Collections;
  8. namespace FastReport.DataVisualization.Charting
  9. {
  10. /// <summary>
  11. /// IChartElement is implemented by both ChartElements and ChartElementCollection to provide a unified access to Parent/Common elements.
  12. /// </summary>
  13. internal interface IChartElement
  14. {
  15. //Properties
  16. IChartElement Parent { get; set; }
  17. CommonElements Common { get; }
  18. //Methods
  19. void Invalidate();
  20. }
  21. /// <summary>
  22. /// Named controller interface allows ChartNamedElements to check the uniqueness of their names
  23. /// </summary>
  24. internal interface INameController
  25. {
  26. /// <summary>
  27. /// Determines whether is the name us unique.
  28. /// </summary>
  29. /// <param name="name">The name.</param>
  30. /// <returns>
  31. /// <c>true</c> if is the name us unique; otherwise, <c>false</c>.
  32. /// </returns>
  33. bool IsUniqueName(string name);
  34. /// <summary>
  35. /// Gets or sets a value indicating whether this instance is in edit mode by collecrtion editor.
  36. /// </summary>
  37. /// <value>
  38. /// <c>true</c> if this instance the colection is editing; otherwise, <c>false</c>.
  39. /// </value>
  40. bool IsColectionEditing { get; set; }
  41. /// <summary>
  42. /// Does the snapshot of collection items.
  43. /// </summary>
  44. /// <param name="save">if set to <c>true</c> collection items will be saved.</param>
  45. /// <param name="changingCallback">The changing callback.</param>
  46. /// <param name="changedCallback">The changed callback.</param>
  47. void DoSnapshot(bool save,
  48. EventHandler<NameReferenceChangedEventArgs> changingCallback,
  49. EventHandler<NameReferenceChangedEventArgs> changedCallback);
  50. /// <summary>
  51. /// Gets the snapshot of saved collection items.
  52. /// </summary>
  53. /// <value>The snapshot.</value>
  54. IList Snapshot {get;}
  55. /// <summary>
  56. /// Raises the <see cref="E:NameReferenceChanged"/> event.
  57. /// </summary>
  58. /// <param name="e">The <see cref="NameReferenceChangedEventArgs"/> instance containing the event data.</param>
  59. void OnNameReferenceChanged(NameReferenceChangedEventArgs e);
  60. /// <summary>
  61. /// Raises the <see cref="E:NameReferenceChanging"/> event.
  62. /// </summary>
  63. /// <param name="e">The <see cref="NameReferenceChangedEventArgs"/> instance containing the event data.</param>
  64. void OnNameReferenceChanging(NameReferenceChangedEventArgs e);
  65. }
  66. }