protected void RegisterChild(Plate child) { if (!children.Contains(child)) { children.Add(child); } }
internal static List <Binding> GetList(Plate panel, Dictionary <Plate, List <Binding> > bindings) { if (bindings.ContainsKey(panel)) { return(bindings[panel]); } List <Binding> list = new List <Binding>(); bindings.Add(panel, list); return(list); }
public virtual void Initialize() { if (Initialized) { return; } Initialized = true; if (plate || (plate = GetComponent <Plate>())) { plate.stateHandle = this; plate.onEvaluateState += Plate_onEvaluateState; } }
public void Initialize() { if (plate || (plate = GetComponent <Plate>())) { plate.renderer = this; plate.onRefreshStatic += Plate_onRefreshStatic; plate.onRefreshDynamic += Plate_onRefreshDynamic; if ((Model || (Model = GetComponent <IModel>() as Object)) && Model is IModel iModel) { viewModel = iModel; viewModel.onModelChange += Model_onModelChange; } } }
protected virtual void GetLocalReferences() { if (!router) { router = GetComponentInParent <Router>(); } // Get nearest parent if (parent || (parent = transform.parent.GetComponentInParent <Plate>())) { parent.RegisterChild(this); } if (!customView) { customView = GetComponent <ViewHandle>(); } }
public virtual void Initialize() { if (Initialized) { return; } Initialized = true; if (plate || (plate = GetComponent <Plate>())) { plate.onEvaluateState += Plate_onEvaluateState; } // Get the router in case we didn't inject if (!router) { router = GetComponentInParent <Router <T> >(); } // Subscribe to router state changes router.onStateChange += Router_onStateChange; }
public void Initialize() { if (Initialized) { return; } Initialized = true; if (!router) { router = GetComponentInParent <Router <string> >(); } router.RegisterInterpreter(this); router.onStateChange += Router_onStateChange; if (!plate) { plate = GetComponent <Plate>(); plate.onShow.AddListener(Plate_OnShow); plate.onHide.AddListener(Plate_OnHide); } plate.onRefreshVisualTree += Plate_onRefreshHierarchy; }
public void RebuildBranch(Plate plate) { }
//public abstract List<object> GetDrawableObjects() { } public abstract void Initialize(VisualElement container, Plate plate);