IUIViewModel.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. namespace XGame.Framework.UI
  2. {
  3. /// <summary>
  4. /// UI操作接口
  5. /// UGUI、FGUI组件的操作在该接口的实现类里
  6. /// </summary>
  7. public interface IUIViewModel
  8. {
  9. void AddChild(INestedView nestedView);
  10. void RemoveChild(INestedView nestedView);
  11. }
  12. public interface IUIViewModelSetter
  13. {
  14. IUIViewModel ViewModel { set; }
  15. }
  16. public interface IUIVMInternal
  17. {
  18. void Init(IUIPanel panel, IUIViewAdapter adapter);
  19. void Init(IUINested nested, IUIViewAdapter adapter);
  20. /// <summary>
  21. /// 激活嵌套UI
  22. /// 先父后子递归执行
  23. /// 只有嵌套UI的节点是显示状态才会被激活
  24. /// </summary>
  25. /// <param name="intent"></param>
  26. void EnableChildren(object intent = null);
  27. /// <summary>
  28. /// 隐藏嵌套UI
  29. /// 先子后父递归执行
  30. /// 只有嵌套UI的节点是显示状态才会被隐藏
  31. /// </summary>
  32. void DisableChildren();
  33. }
  34. }