IUIView.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using XGame.Framework.Interfaces;
  3. namespace XGame.Framework.UI
  4. {
  5. /// <summary>
  6. /// UI对象的管理接口
  7. /// 管理UIPanel,UIController,UIViewModel等
  8. /// </summary>
  9. public interface IUIView : IUpdate, ILateUpdate
  10. {
  11. /// <summary>
  12. /// Panel实例
  13. /// </summary>
  14. IUIPanel Panel { get; }
  15. /// <summary>
  16. /// 激活状态
  17. /// </summary>
  18. bool Active { get; }
  19. /// <summary>
  20. /// 激活
  21. /// </summary>
  22. void Enable(object intent = null);
  23. /// <summary>
  24. /// 隐藏
  25. /// </summary>
  26. void Disable();
  27. }
  28. /// <summary>
  29. /// UIView适配器
  30. /// </summary>
  31. public interface IUIViewAdapter
  32. {
  33. /// <summary>
  34. /// Context对应的UIKey
  35. /// 业务不要赋值
  36. /// </summary>
  37. public UIKey Key { set; }
  38. ///// <summary>
  39. ///// UIView的UIControllerGroup对象
  40. ///// </summary>
  41. //public IUIControllerGroup CtrlGroup { get; set; }
  42. /// <summary>
  43. /// 构建NestedView
  44. /// </summary>
  45. /// <typeparam name="TNestedView"></typeparam>
  46. /// <param name="nested"></param>
  47. /// <param name="isStatic">是否是静态的(其他预制的子节点)</param>
  48. /// <returns></returns>
  49. TNestedView CreateNested<TNestedView>(IUINested nested, bool isStatic) where TNestedView : class, INestedView;
  50. /// <summary>
  51. /// 构建NestedView
  52. /// </summary>
  53. /// <param name="nestedViewType">TNestedView : class, INestedView</param>
  54. /// <param name="nested"></param>
  55. /// <param name="isStatic">是否是静态的(其他预制的子节点)</param>
  56. /// <returns></returns>
  57. INestedView CreateNested(Type nestedViewType, IUINested nested, bool isStatic);
  58. }
  59. }