/// <summary> /// Exit to parent scope /// </summary> /// <param name="newScope">The new scope.</param> protected void x_scopeOut() { // log("Scope out"); x_scopeAutoSave(scope); selectRangeAreaNamed scopeArea = null; // scope out if (scope == null) { scope = this as IMetaContentNested; log("Scope reached root position (null) -- this[" + GetType().Name + "]"); } else { scopeArea = metaContentRanges[scope.path]; scopeArea.setEnd(c.x, c.y); scope = (IMetaContentNested)scope.parent; } // scope out move c.moveToCorner(render.settings.cursorBehaviour.scopeOutMove); /// calls for execution of pending styles styleStack.execute(render, 10, this); #if (DOLOG) log(String.Format("x_scopeOut: {0}", scope.getPathToParent(scope))); #endif }
/// <summary> /// Gets from paths - TRUE if loaded all /// </summary> /// <param name="resolver">The resolver.</param> /// <param name="allowUnclosed">For special cases where we want to affect an area before it is <c>closed</c></param> /// <returns> /// TRUE if all areas are loaded - and no <c>path</c> is waiting to be loaded /// </returns> public Boolean resolveAreaPaths(selectRangeAreaDictionary resolver, Boolean allowUnclosed = false) { Boolean output = false; selectRangeAreaNamed area = null; List <String> waiting = new List <string>(); do { String pt = areaPaths.Pop(); area = resolver[pt]; if (area == null) { waiting.Add(pt); } else { if (area.isClosed || allowUnclosed) { areas.Add(area); } else { waiting.Add(pt); } } } while (areaPaths.Any()); if (!waiting.Any()) { return(true); } areaPaths.AddRange <String>(waiting); return(false); }