예제 #1
0
 public WrappedReflexiveEntry GetTopLevelWrapper(ReflexiveData reflexive, WrappedReflexiveEntry wrapper)
 {
     FlattenedReflexive flattened;
     if (_flattenInfo.TryGetValue(reflexive, out flattened))
         return flattened.GetTopLevelWrapper(wrapper);
     return null;
 }
예제 #2
0
        public WrappedReflexiveEntry GetTopLevelWrapper(ReflexiveData reflexive, WrappedReflexiveEntry wrapper)
        {
            FlattenedReflexive flattened;

            if (_flattenInfo.TryGetValue(reflexive, out flattened))
            {
                return(flattened.GetTopLevelWrapper(wrapper));
            }
            return(null);
        }
예제 #3
0
		public WrappedReflexiveEntry WrapField(MetaField field, double width, bool last)
		{
			_loadedFields.Add(field);
			_fieldVisibility.Add(true);
			_tracker.AttachTo(field);

			var wrapper = new WrappedReflexiveEntry(_loadedFields, _wrappers.Count, width, last);
			_wrappers.Add(wrapper);
			return wrapper;
		}
예제 #4
0
        public WrappedReflexiveEntry WrapField(MetaField field, double width, bool last)
        {
            _loadedFields.Add(field);
            _fieldVisibility.Add(true);
            _tracker.AttachTo(field);

            var wrapper = new WrappedReflexiveEntry(_loadedFields, _wrappers.Count, width, last);

            _wrappers.Add(wrapper);
            return(wrapper);
        }
예제 #5
0
        public WrappedReflexiveEntry GetTopLevelWrapper(WrappedReflexiveEntry wrapper)
        {
            WrappedReflexiveEntry result    = wrapper;
            FlattenedReflexive    reflexive = _parent;

            while (reflexive != null)
            {
                int index = reflexive._template.Template.IndexOf(result);
                result    = reflexive._wrappers[index];
                reflexive = reflexive._parent;
            }
            return(result);
        }
예제 #6
0
        public void VisitReflexiveEntry(WrappedReflexiveEntry field)
        {
            // Save our state and recurse into it
            double oldTotal = _totalWidth;

            _totalWidth = 0;
            Add(field.WrappedField);

            double entryWidth = _totalWidth;

            _totalWidth = oldTotal;

            AddWidth(entryWidth + ReflexiveSubEntryExtraWidth);
        }
예제 #7
0
        public void VisitReflexive(ReflexiveData field)
        {
            // Create flatten information for the reflexive and attach event handlers to it
            var flattened = new FlattenedReflexive(_flatParent, field, _topLevelFields, _tracker, _changes);

            AttachTo(field, flattened);

            FlattenedReflexive oldParent = _flatParent;

            _flatParent = flattened;
            Flatten(field.Template);
            field.UpdateWidth();
            _flatParent = oldParent;

            for (int i = 0; i < field.Template.Count; i++)
            {
                WrappedReflexiveEntry wrapper = flattened.WrapField(field.Template[i], field.Width, i == field.Template.Count - 1);
                _index++;
                _fields.Insert(_index, wrapper);
            }
        }
예제 #8
0
 public void VisitReflexiveEntry(WrappedReflexiveEntry field)
 {
 }
예제 #9
0
		// Passed as the callback to ReflexiveFlattener.EnumWrappers in VisitReflexive
		private void ReflexiveFlattener_HandleWrapper(WrappedReflexiveEntry wrapper)
		{
			_topLevelField = _flattener.GetTopLevelWrapper(_currentReflexive, wrapper);
			_highlighter(wrapper, _highlightLevel > 0);
			wrapper.WrappedField.Accept(this);
		}
예제 #10
0
		public void VisitReflexiveEntry(WrappedReflexiveEntry field)
		{
			// Ignore - wrapper handling is done inside VisitReflexive/HandleWrapper to ensure that
			// closed reflexives aren't skipped over
		}
예제 #11
0
 public void VisitReflexiveEntry(WrappedReflexiveEntry field)
 {
 }
예제 #12
0
 public WrappedReflexiveEntry GetTopLevelWrapper(WrappedReflexiveEntry wrapper)
 {
     WrappedReflexiveEntry result = wrapper;
     FlattenedReflexive reflexive = _parent;
     while (reflexive != null)
     {
         int index = reflexive._template.Template.IndexOf(result);
         result = reflexive._wrappers[index];
         reflexive = reflexive._parent;
     }
     return result;
 }
예제 #13
0
        public void VisitReflexiveEntry(WrappedReflexiveEntry field)
        {
            // Save our state and recurse into it
            double oldTotal = _totalWidth;
            _totalWidth = 0;
            Add(field.WrappedField);

            double entryWidth = _totalWidth;
            _totalWidth = oldTotal;

            AddWidth(entryWidth + ReflexiveSubEntryExtraWidth);
        }
예제 #14
0
 // Passed as the callback to ReflexiveFlattener.EnumWrappers in VisitReflexive
 private void ReflexiveFlattener_HandleWrapper(WrappedReflexiveEntry wrapper)
 {
     _topLevelField = _flattener.GetTopLevelWrapper(_currentReflexive, wrapper);
     _highlighter(wrapper, _highlightLevel > 0);
     wrapper.WrappedField.Accept(this);
 }
예제 #15
0
 public void VisitReflexiveEntry(WrappedReflexiveEntry field)
 {
     // Ignore - wrapper handling is done inside VisitReflexive/HandleWrapper to ensure that
     // closed reflexives aren't skipped over
 }