SIL.FieldWorks.IText.ComplexConcPatternVc.DisplayMinMax C# (CSharp) Method

DisplayMinMax() private method

private DisplayMinMax ( int numLines, IVwEnv vwenv ) : void
numLines int
vwenv IVwEnv
return void
		private void DisplayMinMax(int numLines, IVwEnv vwenv)
		{
			int superOffset = 0;
			if (numLines == 1)
			{
				// if the inner context is a single line, then make the min value a subscript and the max value a superscript.
				// I tried to use the Views subscript and superscript properties, but they added extra space so that it would
				// have the same line height of a normal character, which is not what I wanted, so I compute the size myself
				int fontHeight = GetFontHeight(m_cache.DefaultUserWs);
				int superSubHeight = (fontHeight * 2) / 3;
				vwenv.set_IntProperty((int) FwTextPropType.ktptFontSize, (int) FwTextPropVar.ktpvMilliPoint, superSubHeight);
				vwenv.set_IntProperty((int) FwTextPropType.ktptLineHeight, (int) FwTextPropVar.ktpvMilliPoint, -superSubHeight);
				superOffset = superSubHeight / 2;
			}
			else
			{
				vwenv.set_IntProperty((int) FwTextPropType.ktptMarginTrailing, (int) FwTextPropVar.ktpvMilliPoint, PileMargin);
			}
			vwenv.OpenInnerPile();
			if (numLines == 1)
				vwenv.set_IntProperty((int) FwTextPropType.ktptOffset, (int) FwTextPropVar.ktpvMilliPoint, superOffset);
			vwenv.OpenParagraph();
			vwenv.AddProp(ktagRightNonBoundary, this, kfragNodeMax);
			vwenv.CloseParagraph();
			AddExtraLines(numLines - 2, ktagRightNonBoundary, vwenv);
			vwenv.set_IntProperty((int) FwTextPropType.ktptOffset, (int) FwTextPropVar.ktpvMilliPoint, 0);
			vwenv.OpenParagraph();
			vwenv.AddProp(ktagRightBoundary, this, kfragNodeMin);
			vwenv.CloseParagraph();
			vwenv.CloseInnerPile();
		}