本文整理汇总了C#中IVwEnv.CloseDiv方法的典型用法代码示例。如果您正苦于以下问题:C# IVwEnv.CloseDiv方法的具体用法?C# IVwEnv.CloseDiv怎么用?C# IVwEnv.CloseDiv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVwEnv
的用法示例。
在下文中一共展示了IVwEnv.CloseDiv方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Display
/// ------------------------------------------------------------------------------------
/// <summary>
/// This is the main interesting method of displaying objects and fragments of them.
/// A Scripture is displayed by displaying its Books;
/// and a Book is displayed by displaying its Title and Sections;
/// and a Section is diplayed by displaying its Heading and Content;
/// which are displayed by using the standard view constructor for StText.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvo"></param>
/// <param name="frag"></param>
/// ------------------------------------------------------------------------------------
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
CheckDisposed();
if (hvo == 0)
return; // not much we can display without a valid object
switch (frag)
{
case (int)ScrFrags.kfrBook:
vwenv.OpenDiv();
vwenv.AddObjProp(ScrBookTags.kflidTitle, this,
(int)StTextFrags.kfrText);
vwenv.NoteDependency(new int[] { m_cache.LanguageProject.TranslatedScriptureOA.Hvo },
new int[] { ScriptureTags.kflidScriptureBooks }, 1);
vwenv.NoteDependency(new int[] { hvo },
new int[] { ScrBookTags.kflidSections }, 1);
vwenv.AddLazyVecItems(ScrBookTags.kflidSections, this, (int)ScrFrags.kfrSection);
// TODO (EberhardB): The gap between the intro division and the text
// division probably needs to be configurable somewhere...
// Add a 24 point gap at the bottom of the intro section
vwenv.AddSimpleRect((int)ColorUtil.ConvertColorToBGR(BackColor), -1, 24000, 0);
vwenv.CloseDiv();
break;
default:
base.Display(vwenv, hvo, frag);
break;
}
}
示例2: Display
/// ------------------------------------------------------------------------------------
/// <summary>
/// This is the main interesting method of displaying objects and fragments of them.
/// A Scripture is displayed by displaying its Books;
/// and a Book is displayed by displaying its Title and Sections;
/// and a Section is diplayed by displaying its Heading and Content;
/// which are displayed by using the standard view constructor for StText.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvo"></param>
/// <param name="frag"></param>
/// ------------------------------------------------------------------------------------
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
CheckDisposed();
if (hvo == 0)
return; // not much we can display without a valid object
switch (frag)
{
case (int)ScrFrags.kfrBook:
vwenv.OpenDiv();
vwenv.NoteDependency(new int[] { m_cache.LanguageProject.TranslatedScriptureOA.Hvo },
new int[] { ScriptureTags.kflidScriptureBooks }, 1);
vwenv.NoteDependency(new int[] { hvo },
new int[] { ScrBookTags.kflidSections }, 1);
vwenv.AddLazyVecItems(ScrBookTags.kflidSections, this, (int)ScrFrags.kfrSection);
vwenv.CloseDiv();
break;
default:
base.Display(vwenv, hvo, frag);
break;
}
}
示例3: DisplayList
/// ------------------------------------------------------------------------------------
/// <summary>
/// Displays the list of items in the list box.
/// </summary>
/// <param name="vwenv">The view environment</param>
/// ------------------------------------------------------------------------------------
protected virtual void DisplayList(IVwEnv vwenv)
{
vwenv.OpenDiv();
vwenv.AddObjVecItems((int)InnerFwListBox.ktagItems, this,
(int)InnerFwListBox.kfragItems);
vwenv.CloseDiv();
}
示例4: Display
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
ITsStrFactory tsf = null;
switch (frag)
{
case kfragStText: // The whole text, root object for the InterlinDocChild.
if (hvo == 0)
return; // What if the user deleted all the texts? See LT-6727.
IStText stText = m_coRepository.GetObject(hvo) as IStText;
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvDefault,
(int)TptEditable.ktptNotEditable);
vwenv.OpenDiv();
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, 6000);
vwenv.set_IntProperty((int)FwTextPropType.ktptFontSize,
(int)FwTextPropVar.ktpvMilliPoint, 24000);
// Add both vernacular and analysis if we have them (LT-5561).
bool fAddedVernacular = false;
int wsVernTitle = 0;
//
if (stText.Title.TryWs(WritingSystemServices.kwsFirstVern, out wsVernTitle))
{
vwenv.OpenParagraph();
vwenv.AddStringAltMember(vtagStTextTitle, wsVernTitle, this);
vwenv.CloseParagraph();
fAddedVernacular = true;
}
int wsAnalysisTitle = 0;
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, 10000);
vwenv.OpenParagraph();
ITsString tssAnal;
if (stText.Title.TryWs(WritingSystemServices.kwsFirstAnal, out wsAnalysisTitle, out tssAnal) &&
!tssAnal.Equals(stText.Title.BestVernacularAlternative))
{
if (fAddedVernacular)
{
// display analysis title at smaller font size.
vwenv.set_IntProperty((int)FwTextPropType.ktptFontSize,
(int)FwTextPropVar.ktpvMilliPoint, 12000);
}
vwenv.AddStringAltMember(vtagStTextTitle, wsAnalysisTitle, this);
}
else
{
// just add a blank title.
tsf = TsStrFactoryClass.Create();
ITsString blankTitle = tsf.MakeString("", m_wsAnalysis);
vwenv.AddString(blankTitle);
}
vwenv.CloseParagraph();
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, 10000);
int wsSource = 0;
if (stText.Source.TryWs(WritingSystemServices.kwsFirstVernOrAnal, out wsSource))
{
vwenv.OpenParagraph();
vwenv.set_IntProperty((int)FwTextPropType.ktptFontSize,
(int)FwTextPropVar.ktpvMilliPoint, 12000);
vwenv.AddStringAltMember(vtagStTextSource, wsSource, this);
vwenv.CloseParagraph();
}
else
{
// just add a blank source.
tsf = TsStrFactoryClass.Create();
ITsString tssBlank = tsf.MakeString("", m_wsAnalysis);
vwenv.AddString(tssBlank);
}
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, 10000);
vwenv.OpenParagraph();
if (stText.OwningFlid == TextTags.kflidContents)
{
vwenv.AddObjProp((int)CmObjectFields.kflidCmObject_Owner, this, kfragTextDescription);
}
vwenv.CloseParagraph();
base.Display(vwenv, hvo, frag);
vwenv.CloseDiv();
break;
case kfragTextDescription:
vwenv.AddStringAltMember(CmMajorObjectTags.kflidDescription, m_wsAnalysis, this);
break;
default:
base.Display(vwenv, hvo, frag);
break;
}
}
示例5: Display
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
CheckDisposed();
ITsStrFactory tsf = null;
switch (frag)
{
case kfragStText: // The whole text, root object for the InterlinDocChild.
if (hvo == 0)
return; // What if the user deleted all the texts? See LT-6727.
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvDefault,
(int)TptEditable.ktptNotEditable);
vwenv.OpenDiv();
StText stText = new StText(m_cache, hvo);
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, 6000);
vwenv.set_IntProperty((int)FwTextPropType.ktptFontSize,
(int)FwTextPropVar.ktpvMilliPoint, 24000);
// Add both vernacular and analysis if we have them (LT-5561).
bool fAddedVernacular = false;
int wsVernTitle = 0;
//
if (stText.Title.TryWs(LangProject.kwsFirstVern, out wsVernTitle))
{
vwenv.OpenParagraph();
vwenv.AddStringAltMember(vtagStTextTitle, wsVernTitle, this);
vwenv.CloseParagraph();
fAddedVernacular = true;
}
int wsAnalysisTitle = 0;
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, 10000);
vwenv.OpenParagraph();
ITsString tssAnal;
if (stText.Title.TryWs(LangProject.kwsFirstAnal, out wsAnalysisTitle, out tssAnal) &&
!tssAnal.Equals(stText.Title.BestVernacularAlternative))
{
if (fAddedVernacular)
{
// display analysis title at smaller font size.
vwenv.set_IntProperty((int)FwTextPropType.ktptFontSize,
(int)FwTextPropVar.ktpvMilliPoint, 12000);
}
vwenv.AddStringAltMember(vtagStTextTitle, wsAnalysisTitle, this);
}
else
{
// just add a blank title.
tsf = TsStrFactoryClass.Create();
ITsString blankTitle = tsf.MakeString("", m_wsAnalysis);
vwenv.AddString(blankTitle);
}
vwenv.CloseParagraph();
int wsSource = 0;
ITsString tssSource = stText.SourceOfTextForWs(m_wsVernForDisplay);
if (tssSource == null || tssSource.Length == 0)
{
tssSource = stText.SourceOfTextForWs(m_wsAnalysis);
if (tssSource != null && tssSource.Length > 0)
wsSource = m_wsAnalysis;
}
else
{
wsSource = m_wsVernForDisplay;
}
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, 10000);
if (tssSource != null && tssSource.Length > 0)
{
vwenv.OpenParagraph();
vwenv.set_IntProperty((int)FwTextPropType.ktptFontSize,
(int)FwTextPropVar.ktpvMilliPoint, 12000);
vwenv.AddStringAltMember(vtagStTextSource, wsSource, this);
vwenv.CloseParagraph();
}
else
{
// just add a blank source.
tsf = TsStrFactoryClass.Create();
ITsString tssBlank = tsf.MakeString("", m_wsAnalysis);
vwenv.AddString(tssBlank);
}
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, 10000);
vwenv.OpenParagraph();
if (stText.OwningFlid == (int)Text.TextTags.kflidContents)
{
vwenv.AddObjProp((int)CmObjectFields.kflidCmObject_Owner, this, kfragTextDescription);
}
vwenv.CloseParagraph();
base.Display(vwenv, hvo, frag);
vwenv.CloseDiv();
break;
case kfragTextDescription:
vwenv.AddStringAltMember((int)CmMajorObject.CmMajorObjectTags.kflidDescription, m_wsAnalysis, this);
break;
case kfragSegFf: // One freeform annotation.
int[] wssAnalysis = m_WsList.AnalysisWsIds;
if (wssAnalysis.Length == 0)
//.........这里部分代码省略.........
示例6: Display
/// ------------------------------------------------------------------------------------
/// <summary>
/// This is the main interesting method of displaying objects and fragments of them.
/// Scripture Footnotes are displayed by displaying each footnote's reference and text.
/// The text is displayed using the standard view constructor for StText.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvo"></param>
/// <param name="frag"></param>
/// ------------------------------------------------------------------------------------
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
CheckDisposed();
switch (frag)
{
case (int)FootnoteFrags.kfrScripture:
{
vwenv.NoteDependency(new int[] { m_cache.LangProject.TranslatedScriptureOAHvo },
new int[] { (int)Scripture.ScriptureTags.kflidScriptureBooks }, 1);
vwenv.AddLazyVecItems(BooksTag, this, (int)FootnoteFrags.kfrBook);
break;
}
case (int)FootnoteFrags.kfrRootInPageSeq:
{
int tag = DummyVirtualHandler.InstallDummyHandler(m_cache.VwCacheDaAccessor,
"Scripture", "FootnotesOnPage",
(int)CellarModuleDefns.kcptReferenceSequence).Tag;
// Get the list of footnotes to display
int[] hvos = m_cache.GetVectorProperty(hvo, tag, true);
if (hvos.Length > 0)
{
int ownerHvo = m_cache.GetOwnerOfObject(hvos[0]);
// The ownerHvo should be the HVO of the book
vwenv.NoteDependency(new int[] { ownerHvo },
new int[] { (int)ScrBook.ScrBookTags.kflidFootnotes }, 1);
}
vwenv.AddObjVec(tag, this, (int)FootnoteFrags.kfrAllFootnotesWithinPagePara);
break;
}
case (int)FootnoteFrags.kfrFootnoteWithinPagePara:
{
// Note a dependency on the footnote options so that the footnote will
// be refreshed when these are changed.
int[] depHvos = { hvo };
int[] depTags = { StFootnote.ktagFootnoteOptions };
vwenv.NoteDependency(depHvos, depTags, 1);
// Insert the marker and reference
vwenv.AddObj(hvo, this, (int)StTextFrags.kfrFootnoteMarker);
vwenv.AddObj(hvo, this,(int)StTextFrags.kfrFootnoteReference);
// Insert (we hope only one) paragraph contents.
vwenv.AddObjVecItems((int)StText.StTextTags.kflidParagraphs, this,
(int)FootnoteFrags.kfrFootnoteParaWithinPagePara);
break;
}
case (int) FootnoteFrags.kfrFootnoteParaWithinPagePara:
{
if (!InsertParaContentsUserPrompt(vwenv, hvo))
{
// Display the text paragraph contents, or its user prompt.
vwenv.AddStringProp((int)StTxtPara.StTxtParaTags.kflidContents, null);
}
break;
}
case (int)FootnoteFrags.kfrBook:
{
vwenv.OpenDiv();
vwenv.AddObjVecItems((int)ScrBook.ScrBookTags.kflidFootnotes, this,
(int)StTextFrags.kfrFootnote);
vwenv.CloseDiv();
break;
}
case (int)StTextFrags.kfrFootnoteMarker:
{
ScrFootnote footnote = new ScrFootnote(Cache, hvo);
if (footnote.DisplayFootnoteMarker)
DisplayFootnoteMarker(vwenv, footnote);
break;
}
case (int)StTextFrags.kfrFootnoteReference:
{
ITsStrFactory tsStrFactory = TsStrFactoryClass.Create();
ITsPropsFactory tpf = TsPropsFactoryClass.Create();
ITsTextProps ttp = tpf.MakeProps(ScrStyleNames.FootnoteTargetRef, m_wsDefault, 0);
ScrFootnote footnote = new ScrFootnote(m_cache, hvo);
string footnoteRef = footnote.GetReference(m_wsDefault);
ITsString tssRef = tsStrFactory.MakeStringWithPropsRgch(footnoteRef,
footnoteRef.Length, ttp);
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvEnum,
(int)TptEditable.ktptNotEditable);
vwenv.AddString(tssRef);
break;
}
default:
base.Display(vwenv, hvo, frag);
break;
//.........这里部分代码省略.........
示例7: AddFreeformComment
//.........这里部分代码省略.........
if (wssAnalysis.Length > 1)
vwenv.get_StringWidth(tssLabel, null, out labelWidth, out labelHeight);
if (IsWsRtl(wssAnalysis[0]) != m_fRtl)
{
ITsStrBldr bldr = tssLabel.GetBldr();
bldr.Replace(bldr.Length - 1, bldr.Length, null, null);
ITsString tssLabelNoSpace = bldr.GetString();
// (First) analysis language is upstream; insert label at end.
vwenv.AddString(GetTssDirForWs(wssAnalysis[0]));
AddFreeformComment(vwenv, hvoSeg, wssAnalysis[0], flid);
vwenv.AddString(GetTssDirForWs(wssAnalysis[0]));
if (wssAnalysis.Length != 1)
{
// Insert WS label for first line
vwenv.AddString(m_tssDir);
vwenv.AddString(m_tssSpace);
vwenv.AddString(m_tssDir);
SetNoteLabelProps(vwenv);
vwenv.AddString(WsListManager.WsLabel(m_cache, wssAnalysis[0]));
}
vwenv.AddString(m_tssDir);
vwenv.AddString(m_tssSpace);
vwenv.AddString(m_tssDir);
vwenv.AddString(tssLabelNoSpace);
vwenv.AddString(m_tssDir);
}
else
{
vwenv.AddString(m_tssDir);
vwenv.AddString(tssLabel);
vwenv.AddString(m_tssDir);
if (wssAnalysis.Length == 1)
{
vwenv.AddString(GetTssDirForWs(wssAnalysis[0]));
AddFreeformComment(vwenv, hvoSeg, wssAnalysis[0], flid);
}
else
{
SetNoteLabelProps(vwenv);
vwenv.AddString(WsListManager.WsLabel(m_cache, wssAnalysis[0]));
vwenv.AddString(m_tssDir);
vwenv.AddString(m_tssSpace);
// label width unfortunately does not include trailing space.
vwenv.AddString(m_tssDir);
vwenv.AddString(GetTssDirForWs(wssAnalysis[0]));
AddFreeformComment(vwenv, hvoSeg, wssAnalysis[0], flid);
}
}
// Add any other lines, each in its appropriate direction.
for (int i = 1; i < wssAnalysis.Length; i++)
{
vwenv.CloseParagraph();
// Indent subsequent paragraphs by the width of the main label.
if (IsWsRtl(wssAnalysis[i]) != m_fRtl)
{
vwenv.set_IntProperty((int)FwTextPropType.ktptTrailingIndent,
(int)FwTextPropVar.ktpvMilliPoint, labelWidth);
}
else
{
vwenv.set_IntProperty((int) FwTextPropType.ktptLeadingIndent,
(int) FwTextPropVar.ktpvMilliPoint, labelWidth);
}
SetParaDirectionAndAlignment(vwenv, wssAnalysis[i]);
vwenv.OpenParagraph();
if (IsWsRtl(wssAnalysis[i]) != m_fRtl)
{
// upstream...reverse everything.
vwenv.AddString(GetTssDirForWs(wssAnalysis[i]));
AddFreeformComment(vwenv, hvoSeg, wssAnalysis[i], flid);
vwenv.AddString(GetTssDirForWs(wssAnalysis[i]));
vwenv.AddString(m_tssDir);
vwenv.AddString(m_tssSpace);
vwenv.AddString(m_tssDir);
vwenv.AddString(m_tssDir);
SetNoteLabelProps(vwenv);
vwenv.AddString(WsListManager.WsLabel(m_cache, wssAnalysis[i]));
vwenv.AddString(m_tssDir);
vwenv.AddString(m_tssSpace);
vwenv.AddString(m_tssDir);
}
else
{
vwenv.AddString(m_tssDir);
vwenv.AddString(m_tssSpace);
vwenv.AddString(m_tssDir);
SetNoteLabelProps(vwenv);
vwenv.AddString(WsListManager.WsLabel(m_cache, wssAnalysis[i]));
vwenv.AddString(m_tssDir);
vwenv.AddString(m_tssSpace);
vwenv.AddString(m_tssDir);
vwenv.AddString(GetTssDirForWs(wssAnalysis[i]));
AddFreeformComment(vwenv, hvoSeg, wssAnalysis[i], flid);
}
}
vwenv.CloseParagraph();
vwenv.CloseDiv();
}
示例8: Display
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
#if __MonoCS__
// TODO-Linux: Randomly m_tsf seem to have been Release.
// eg Marshal.ReleaseComObject(m_tsf);
// However the Dispose method isn't called (which calls the Release)
// Currently unsure what is doing this need to find out - very concerning
// Hack - just recreate a new TsStrFactory each time... for now
// seems to stop the problem.
m_tsf = TsStrFactoryClass.Create();
#endif
CheckDisposed();
if (hvo == 0)
return; // Can't do anything without an hvo (except crash -- see LT-9348).
#if DEBUG
//TimeRecorder.Begin("Display");
#endif
switch (frag)
{
case kfragStText: // new root object for InterlinDocChild.
SetupRealVernWsForDisplay(WritingSystemServices.ActualWs(m_cache, WritingSystemServices.kwsVernInParagraph,
hvo, StTextTags.kflidParagraphs));
vwenv.AddLazyVecItems(StTextTags.kflidParagraphs, this, kfragInterlinPara);
break;
case kfragInterlinPara: // Whole StTxtPara. This can be the root fragment in DE view.
if (vwenv.DataAccess.get_VecSize(hvo, StTxtParaTags.kflidSegments) == 0)
{
vwenv.NoteDependency(new int[] { hvo }, new int[] { StTxtParaTags.kflidSegments }, 1);
vwenv.AddString(m_tssEmptyPara);
}
else
{
PreferredVernWs = WritingSystemServices.ActualWs(m_cache, WritingSystemServices.kwsVernInParagraph, hvo, StTxtParaTags.kflidSegments);
// Include the plain text version of the paragraph?
vwenv.AddLazyVecItems(StTxtParaTags.kflidSegments, this, kfragParaSegment);
}
break;
case kfragParaSegment:
// Don't put anything in this segment if it is a 'label' segment (typically containing a verse
// number for TE).
var seg = m_segRepository.GetObject(hvo);
if (seg.IsLabel)
break;
// This puts ten points between segments. There's always 5 points below each line of interlinear;
// if there are no freeform annotations another 5 points makes 10 between segments.
// If there are freeforms, we need the full 10 points after the last of them.
var haveFreeform = seg.FreeTranslation != null || seg.LiteralTranslation != null || seg.NotesOS.Count > 0;
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, !haveFreeform ? 5000 : 10000);
vwenv.OpenDiv();
// Enhance JohnT: determine what the overall direction of the paragraph should
// be and set it.
if (m_mpBundleHeight == 0)
{
// First time...figure it out.
int dmpx, dmpyAnal, dmpyVern;
vwenv.get_StringWidth(m_tssEmptyAnalysis, null, out dmpx, out dmpyAnal);
vwenv.get_StringWidth(m_tssEmptyVern, null, out dmpx, out dmpyVern);
m_mpBundleHeight = dmpyAnal * 4 + dmpyVern * 3;
}
// The interlinear bundles are not editable.
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvEnum, (int)TptEditable.ktptNotEditable);
if (m_fRtl)
{
vwenv.set_IntProperty((int)FwTextPropType.ktptRightToLeft,
(int)FwTextPropVar.ktpvEnum, (int)FwTextToggleVal.kttvForceOn);
vwenv.set_IntProperty((int)FwTextPropType.ktptAlign,
(int)FwTextPropVar.ktpvEnum, (int) FwTextAlign.ktalRight);
}
vwenv.set_IntProperty((int)FwTextPropType.ktptSpellCheck, (int)FwTextPropVar.ktpvEnum,
(int)SpellingModes.ksmDoNotCheck);
vwenv.OpenParagraph();
AddSegmentReference(vwenv, hvo); // Calculate and display the segment reference.
AddLabelPile(vwenv, m_tsf, m_cache, true, m_fShowMorphBundles);
vwenv.AddObjVecItems(SegmentTags.kflidAnalyses, this, kfragBundle);
// JohnT, 1 Feb 2008. Took this out as I can see no reason for it; AddObjVecItems handles
// the dependency already. Adding it just means that any change to the forms list
// regenerates a higher level than needed, which contributes to a great deal of scrolling
// and flashing (LT-7470).
// Originally added by Eric in revision 72 on the trunk as part of handling phrases.
// Eric can't see any reason we need it now, either. If you find a need to re-insert it,
// please document carefully the reasons it is needed and what bad consequences follow
// from removing it.
//vwenv.NoteDependency(new int[] { hvo }, new int[] { ktagSegmentForms }, 1);
vwenv.CloseParagraph();
// We'd get the same visual effect from just calling AddFreeformAnnotations here. But then a regenerate
// such as happens when hiding or showing a prompt has to redisplay the whole segment. This initially
// makes it lazy, then the lazy stuff gets expanded. In the process we may get undesired scrolling (LT-12248).
// So we insert another layer of object, allowing just the freeforms to be regenerated.
var flidSelf = Cache.MetaDataCacheAccessor.GetFieldId2(CmObjectTags.kClassId, "Self", false);
vwenv.AddObjProp(flidSelf, this, kfragFreeformBundle);
vwenv.CloseDiv();
break;
case kfragFreeformBundle:
AddFreeformAnnotations(vwenv, hvo);
break;
case kfragBundle: // One annotated word bundle; hvo is the IAnalysis object.
// checking AllowLayout (especially in context of Undo/Redo make/break phrase)
//.........这里部分代码省略.........
示例9: Display
/// ------------------------------------------------------------------------------------
/// <summary>
/// This is the main interesting method of displaying objects and fragments of them.
/// A Scripture is displayed by displaying its Books;
/// and a Book is displayed by displaying its Title and Sections;
/// and a Section is diplayed by displaying its Heading and Content;
/// which are displayed by showing the style for each paragraph in the StText.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvo"></param>
/// <param name="frag"></param>
/// ------------------------------------------------------------------------------------
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
CheckDisposed();
ISilDataAccess silDataAccess = vwenv.DataAccess;
int wsUser = Cache.WritingSystemFactory.UserWs;
switch(frag)
{
case (int)FootnoteFrags.kfrBook:
case (int)ScrFrags.kfrBook:
{
vwenv.OpenDiv();
if (m_displayForFootnotes)
{
vwenv.AddObjVecItems(ScrBookTags.kflidFootnotes,
this, (int)FootnoteFrags.kfrFootnoteStyles);
}
else
{
vwenv.AddObjProp(ScrBookTags.kflidTitle, this,
(int)ScrFrags.kfrTextStyles);
vwenv.AddLazyVecItems(ScrBookTags.kflidSections, this,
(int)ScrFrags.kfrSection);
InsertBookSeparator(hvo, vwenv);
}
vwenv.CloseDiv();
break;
}
case (int)ScrFrags.kfrSection:
{
vwenv.OpenDiv();
vwenv.AddObjProp(ScrSectionTags.kflidHeading, this,
(int)ScrFrags.kfrTextStyles);
vwenv.AddObjProp(ScrSectionTags.kflidContent, this,
(int)ScrFrags.kfrTextStyles);
vwenv.CloseDiv();
break;
}
case (int)ScrFrags.kfrTextStyles:
{
// We need to show something, since the current view code can't handle a property
// containing no boxes.
if (HandleEmptyText(vwenv, hvo))
break;
if (m_fLazy)
{
vwenv.AddLazyVecItems(StTextTags.kflidParagraphs, this,
(int)ScrFrags.kfrParaStyles);
}
else
{
vwenv.AddObjVecItems(StTextTags.kflidParagraphs, this,
(int)ScrFrags.kfrParaStyles);
}
break;
}
case (int)FootnoteFrags.kfrFootnoteStyles:
{
if (HandleEmptyText(vwenv, hvo))
break;
vwenv.AddObjVecItems(StTextTags.kflidParagraphs, this,
(int)ScrFrags.kfrParaStyles);
break;
}
case (int)ScrFrags.kfrParaStyles:
{
var tsTextProps = silDataAccess.get_UnknownProp(hvo, StParaTags.kflidStyleRules)
as ITsTextProps;
string styleName = ScrStyleNames.Normal;
if (tsTextProps != null)
styleName = tsTextProps.GetStrPropValue((int)FwTextPropType.ktptNamedStyle);
// To insert it into the view it has to be an ITsString
ITsStrFactory tsStrFactory =
TsStrFactoryClass.Create();
// Last arg is writing system. Should we use English? UI writing system?
// Note that when we support localization of style names this code will need
// to be enhanced as the stylename from the TsTextProps will be a raw name or
// GUID that the user shouldn't see.
ITsString tssStyle = tsStrFactory.MakeStringRgch(styleName,
styleName.Length, wsUser);
// To make the pile align things properly, top and bottom margins for the
// matching boxes must be the same as the original.
// A 'concordance' paragraph is a way of preventing wrapping.
vwenv.OpenConcPara(0, 0, 0, 0);
vwenv.AddString(tssStyle);
//.........这里部分代码省略.........
示例10: Display
/// <summary></summary>
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
switch(frag)
{
case (int)SampleFrags.kfrText:
if (m_fontName != null && m_fontName.Length > 0)
vwenv.set_StringProperty((int)FwTextPropType.ktptFontFamily, m_fontName);
// Force to 12 point.
vwenv.set_IntProperty((int)FwTextPropType.ktptFontSize,
(int)FwTextPropVar.ktpvMilliPoint, 12000);
vwenv.OpenDiv();
vwenv.AddLazyVecItems((int)SampleTags.ktagTextParas, this, (int)SampleFrags.kfrPara);
vwenv.CloseDiv();
break;
case (int)SampleFrags.kfrPara:
vwenv.AddStringProp((int)SampleTags.ktagParaContents, this);
break;
}
}
示例11: Display
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
CheckDisposed();
try
{
switch (frag)
{
case kfragBundle: // One annotated word bundle, in this case, the whole view.
if (hvo == 0)
return;
vwenv.set_IntProperty((int)FwTextPropType.ktptSpellCheck, (int)FwTextPropVar.ktpvEnum,
(int)SpellingModes.ksmDoNotCheck);
vwenv.set_IntProperty((int)FwTextPropType.ktptBackColor,
(int)FwTextPropVar.ktpvDefault, krgbBackground);
vwenv.OpenDiv();
vwenv.OpenParagraph();
// Since embedded in a pile with context, we need another layer of pile here,.
// It's an overlay sandbox: draw a box around it.
vwenv.OpenInnerPile();
// Inside that division we need a paragraph which does not have any border
// or background. This suppresses the 'infinite width' behavior for the
// nested paragraphs that may have grey border.
vwenv.OpenParagraph();
// This makes a little separation between left border and arrows.
vwenv.set_IntProperty((int)FwTextPropType.ktptPadLeading,
(int)FwTextPropVar.ktpvMilliPoint, 1000);
if (m_fRtl)
{
// This must not be on the outer paragraph or we get infinite width behavior.
vwenv.set_IntProperty((int)FwTextPropType.ktptRightToLeft,
(int)FwTextPropVar.ktpvEnum, (int)FwTextToggleVal.kttvForceOn);
vwenv.set_IntProperty((int)FwTextPropType.ktptAlign,
(int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
}
vwenv.OpenInnerPile();
for (int ispec = 0; ispec < m_choices.Count; )
{
InterlinLineSpec spec = m_choices[ispec];
if (!spec.WordLevel)
break;
if (spec.MorphemeLevel)
{
DisplayMorphBundles(vwenv, hvo);
ispec = m_choices.LastMorphemeIndex + 1;
continue;
}
switch (spec.Flid)
{
case InterlinLineChoices.kflidWord:
int ws = GetActualWs(hvo, spec.StringFlid, spec.WritingSystem);
DisplayWordform(vwenv, ws, ispec);
break;
case InterlinLineChoices.kflidWordGloss:
DisplayWordGloss(vwenv, hvo, spec.WritingSystem, ispec);
break;
case InterlinLineChoices.kflidWordPos:
DisplayWordPOS(vwenv, hvo, spec.WritingSystem, ispec);
break;
}
ispec++;
}
vwenv.CloseInnerPile();
vwenv.CloseParagraph();
vwenv.CloseInnerPile();
vwenv.CloseParagraph();
vwenv.CloseDiv();
break;
case kfragFirstMorph: // first morpheme in word
case kfragMorph: // The bundle of 4 lines representing a morpheme.
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginTrailing,
(int)FwTextPropVar.ktpvMilliPoint, 10000);
vwenv.OpenInnerPile();
for (int ispec = m_choices.FirstMorphemeIndex; ispec <= m_choices.LastMorphemeIndex; ispec++)
{
int tagLexEntryIcon = 0;
if (m_choices.FirstLexEntryIndex == ispec)
tagLexEntryIcon = ktagMorphEntryIcon;
InterlinLineSpec spec = m_choices[ispec];
switch (spec.Flid)
{
case InterlinLineChoices.kflidMorphemes:
DisplayMorphForm(vwenv, hvo, frag, spec.WritingSystem, ispec);
break;
case InterlinLineChoices.kflidLexEntries:
AddOptionalNamedObj(vwenv, hvo, ktagSbMorphEntry, ktagMissingEntry,
kfragMissingEntry, tagLexEntryIcon, spec.WritingSystem, ispec);
break;
case InterlinLineChoices.kflidLexGloss:
AddOptionalNamedObj(vwenv, hvo, ktagSbMorphGloss, ktagMissingMorphGloss,
kfragMissingMorphGloss, tagLexEntryIcon, spec.WritingSystem, ispec);
break;
case InterlinLineChoices.kflidLexPos:
AddOptionalNamedObj(vwenv, hvo, ktagSbMorphPos, ktagMissingMorphPos,
kfragMissingMorphPos, tagLexEntryIcon, spec.WritingSystem, ispec);
break;
}
//.........这里部分代码省略.........
示例12: Display
/// ------------------------------------------------------------------------------------
/// <summary>
/// This is the main interesting method of displaying objects and fragments of them.
/// Scripture Footnotes are displayed by displaying each footnote's reference and text.
/// The text is displayed using the standard view constructor for StText.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvo"></param>
/// <param name="frag"></param>
/// ------------------------------------------------------------------------------------
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
switch (frag)
{
case (int)StTextFrags.kfrFootnote:
{
// FWR-1640: Make the sequence of footnote paragraphs non-editable
// since we only allow one para per footnote. This will cause
// pasting multiple paragraphs to work correctly.
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvEnum,
(int)TptEditable.ktptNotEditable);
base.Display(vwenv, hvo, frag);
break;
}
case (int)FootnoteFrags.kfrScripture:
{
vwenv.NoteDependency(new int[] { m_cache.LanguageProject.TranslatedScriptureOA.Hvo },
new int[] { (int)ScriptureTags.kflidScriptureBooks }, 1);
vwenv.AddLazyVecItems(BooksTag, this, (int)FootnoteFrags.kfrBook);
break;
}
case (int)FootnoteFrags.kfrRootInPageSeq:
{
vwenv.AddObjVec(ScrBookTags.kflidFootnotes, this, (int)FootnoteFrags.kfrAllFootnotesWithinPagePara);
break;
}
case (int)FootnoteFrags.kfrFootnoteWithinPagePara:
{
// Insert the marker and reference
vwenv.AddObj(hvo, this, (int)StTextFrags.kfrFootnoteMarker);
vwenv.AddObj(hvo, this,(int)StTextFrags.kfrFootnoteReference);
// Insert (we hope only one) paragraph contents.
vwenv.AddObjVecItems(StTextTags.kflidParagraphs, this, (int)FootnoteFrags.kfrFootnoteParaWithinPagePara);
break;
}
case (int) FootnoteFrags.kfrFootnoteParaWithinPagePara:
{
if (!InsertParaContentsUserPrompt(vwenv, hvo))
{
// Display the text paragraph contents, or its user prompt.
vwenv.AddStringProp(StTxtParaTags.kflidContents, null);
}
break;
}
case (int)FootnoteFrags.kfrBook:
{
vwenv.OpenDiv();
vwenv.AddObjVecItems(ScrBookTags.kflidFootnotes, this,
(int)StTextFrags.kfrFootnote);
vwenv.CloseDiv();
break;
}
case (int)StTextFrags.kfrFootnoteReference:
{
DisplayFootnoteReference(vwenv, hvo);
break;
}
default:
base.Display(vwenv, hvo, frag);
break;
}
}
示例13: Display
/// ------------------------------------------------------------------------------------
/// <summary>
///
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvo"></param>
/// <param name="frag"></param>
/// ------------------------------------------------------------------------------------
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
if ((m_displayType & DisplayType.kLiteralStringLabels) != 0)
{
ITsStrFactory factory = TsStrFactoryClass.Create();
vwenv.AddString(factory.MakeString("Label" + m_counter++, m_wsDefault));
}
switch(frag)
{
case 1: // the root; display the subitems, first using non-lazy view, then lazy one.
if ((m_displayType & DisplayType.kFootnoteDetailsSeparateParas) == DisplayType.kFootnoteDetailsSeparateParas)
vwenv.AddObjVecItems(m_flid, this, 10);
if ((m_displayType & DisplayType.kFootnoteDetailsSinglePara) == DisplayType.kFootnoteDetailsSinglePara)
vwenv.AddObjVecItems(m_flid, this, 11);
else
{
if ((m_displayType & DisplayType.kNormal) == DisplayType.kNormal)
{
vwenv.AddObjVecItems(m_flid, this, 3);
}
if ((m_displayType & DisplayType.kLazy) == DisplayType.kLazy)
{
vwenv.AddObjVecItems(m_flid, this, 2);
}
}
if ((m_displayType & DisplayType.kTitle) == DisplayType.kTitle)
vwenv.AddObjProp(SimpleRootsiteTestsConstants.kflidDocTitle, this, 3);
if (m_displayType == DisplayType.kOuterObjDetails)
vwenv.AddObjVecItems(m_flid, this, 6);
break;
case 2: // An StText, display paragraphs lazily
if ((m_displayType & DisplayType.kWithTopMargin) == DisplayType.kWithTopMargin)
vwenv.AddLazyVecItems(SimpleRootsiteTestsConstants.kflidTextParas, this, 4);
vwenv.AddLazyVecItems(SimpleRootsiteTestsConstants.kflidTextParas, this, 5);
break;
case 3: // An StText, display paragraphs not lazily.
if ((m_displayType & DisplayType.kWithTopMargin) == DisplayType.kWithTopMargin)
vwenv.AddObjVecItems(SimpleRootsiteTestsConstants.kflidTextParas, this, 4);
vwenv.AddObjVecItems(SimpleRootsiteTestsConstants.kflidTextParas, this, 5);
if ((m_displayType & DisplayType.kDuplicateParagraphs) != 0)
vwenv.AddObjVecItems(SimpleRootsiteTestsConstants.kflidTextParas, this, 5);
break;
case 4: // StTxtPara, display contents with top margin
OpenParaIfNeeded(vwenv, hvo);
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginTop,
(int)FwTextPropVar.ktpvMilliPoint, kMarginTop);
AddParagraphContents(vwenv);
break;
case 5: // StTxtPara, display contents without top margin
OpenParaIfNeeded(vwenv, hvo);
AddParagraphContents(vwenv);
break;
case 6: // StTxtPara, display details of our outer object
int hvoOuter, tag, ihvo;
vwenv.GetOuterObject(vwenv.EmbeddingLevel - 1, out hvoOuter, out tag, out ihvo);
ITsString tss = TsStringHelper.MakeTSS("Hvo = " + hvoOuter + "; Tag = " + tag + "; Ihvo = " + ihvo,
m_wsDefault);
vwenv.AddString(tss);
break;
case SimpleRootsiteTestsConstants.kflidDocDivisions:
vwenv.AddObjVecItems(SimpleRootsiteTestsConstants.kflidDocDivisions, this,
SimpleRootsiteTestsConstants.kflidSectionStuff);
break;
case SimpleRootsiteTestsConstants.kflidSectionStuff:
if ((m_displayType & DisplayType.kNormal) == DisplayType.kNormal)
vwenv.AddObjProp(frag, this, 3);
if ((m_displayType & DisplayType.kLazy) == DisplayType.kLazy)
vwenv.AddObjProp(frag, this, 2);
break;
case 7: // ScrBook
vwenv.OpenDiv();
vwenv.AddObjVecItems(SimpleRootsiteTestsConstants.kflidDocFootnotes, this, 8);
vwenv.CloseDiv();
break;
case 8: // StFootnote
vwenv.AddObjVecItems(SimpleRootsiteTestsConstants.kflidTextParas, this,
9);
break;
case 9: // StTxtPara
vwenv.AddStringProp(SimpleRootsiteTestsConstants.kflidParaContents, null);
break;
case 10:
// Display a Footnote by displaying its "FootnoteMarker" in a paragraph
// by itself, followed by the sequence of paragraphs.
vwenv.AddStringProp(SimpleRootsiteTestsConstants.kflidFootnoteMarker, null);
vwenv.AddObjVecItems(SimpleRootsiteTestsConstants.kflidTextParas, this,
9);
break;
case 11:
// Display a Footnote by displaying its "FootnoteMarker" followed by the
// contents of its first paragraph (similar to the way footnotes are displayed in
// real life.
//.........这里部分代码省略.........
示例14: Display
/// ------------------------------------------------------------------------------------
/// <summary>
/// This is the main interesting method of displaying objects and fragments of them.
/// A Scripture is displayed by displaying its Books;
/// and a Book is displayed by displaying its Title and Sections;
/// and a Section is displayed by displaying its Heading and Content;
/// which are displayed by using the standard view constructor for StText.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvo"></param>
/// <param name="frag"></param>
/// ------------------------------------------------------------------------------------
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
CheckDisposed();
switch (frag)
{
case (int)ScrFrags.kfrScripture:
vwenv.AddLazyVecItems((int)Scripture.ScriptureTags.kflidScriptureBooks,
this, (int)ScrFrags.kfrBook);
break;
case (int)ScrFrags.kfrBook:
vwenv.OpenDiv();
vwenv.AddObjProp((int)ScrBook.ScrBookTags.kflidTitle, this,
(int)StTextFrags.kfrText);
vwenv.AddLazyVecItems((int)ScrBook.ScrBookTags.kflidSections, this,
(int)ScrFrags.kfrSection);
vwenv.CloseDiv();
break;
case (int)ScrFrags.kfrSection:
vwenv.OpenDiv();
vwenv.AddObjProp((int)ScrSection.ScrSectionTags.kflidHeading, this,
(int)StTextFrags.kfrText);
vwenv.AddObjProp((int)ScrSection.ScrSectionTags.kflidContent, this,
(int)StTextFrags.kfrText);
vwenv.CloseDiv();
break;
case (int)StTextFrags.kfrPara:
if (m_hvosReadOnly.Contains(hvo))
{
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvEnum,
(int)TptEditable.ktptNotEditable);
}
base.Display(vwenv, hvo, frag);
break;
default:
base.Display(vwenv, hvo, frag);
break;
}
}
示例15: Display
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
CheckDisposed();
if (hvo == 0)
return; // Can't do anything without an hvo (except crash -- see LT-9348).
#if DEBUG
//TimeRecorder.Begin("Display");
#endif
switch (frag)
{
case kfragText: // The whole text, root object for the InterlinDocChild.
vwenv.AddObjProp((int)Text.TextTags.kflidContents, this, kfragStText);
break;
// case kfragTxtSection: // obsolete
// // Enhance JohnT: possibly some extra space, bold the heading, or whatever?
// vwenv.AddObjProp((int)TxtSection.TxtSectionTags.kflidHeading, this, kfragStText);
// vwenv.AddObjProp((int)TxtSection.TxtSectionTags.kflidContents, this, kfragStText);
// vwenv.AddLazyVecItems((int)TxtSection.TxtSectionTags.kflidSubsections, this, kfragTxtSection);
// break;
case kfragStText: // new root object for InterlinDocChild.
SetupRealVernWsForDisplay(m_cache.LangProject.ActualWs(LangProject.kwsVernInParagraph,
hvo, (int)StText.StTextTags.kflidParagraphs));
vwenv.AddLazyVecItems((int)StText.StTextTags.kflidParagraphs, this, kfragInterlinPara);
break;
case kfragInterlinPara: // Whole StTxtPara. This can be the root fragment in DE view.
if (vwenv.DataAccess.get_VecSize(hvo, ktagParaSegments) == 0)
{
vwenv.NoteDependency(new int[] {hvo}, new int[] {ktagParaSegments}, 1);
vwenv.AddString(m_tssEmptyPara);
}
else
{
PreferredVernWs = m_cache.LangProject.ActualWs(LangProject.kwsVernInParagraph, hvo, ktagParaSegments);
// Include the plain text version of the paragraph?
vwenv.AddLazyVecItems(ktagParaSegments, this, kfragParaSegment);
}
break;
case kfragParaSegment:
// Don't put anything in this segment if it is a 'label' segment (typically containing a verse
// number for TE).
CmBaseAnnotation seg = CmObject.CreateFromDBObject(m_cache, hvo, false) as CmBaseAnnotation;
StTxtPara para = seg.BeginObjectRA as StTxtPara;
if (SegmentBreaker.HasLabelText(para.Contents.UnderlyingTsString, seg.BeginOffset, seg.EndOffset))
break;
// This puts ten points between segments. There's always 5 points below each line of interlinear;
// if there are no freeform annotations another 5 points makes 10 between segments.
// If there are freeforms, we need the full 10 points after the last of them.
int cfreeform = vwenv.DataAccess.get_VecSize(hvo, ktagSegFF);
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, cfreeform == 0 ? 5000 : 10000);
vwenv.OpenDiv();
// Enhance JohnT: determine what the overall direction of the paragraph should
// be and set it.
if (m_mpBundleHeight == 0)
{
// First time...figure it out.
int dmpx, dmpyAnal, dmpyVern;
vwenv.get_StringWidth(m_tssEmptyAnalysis, null, out dmpx, out dmpyAnal);
vwenv.get_StringWidth(m_tssEmptyVern, null, out dmpx, out dmpyVern);
m_mpBundleHeight = dmpyAnal * 4 + dmpyVern * 3;
}
// The interlinear bundles are not editable.
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvEnum, (int)TptEditable.ktptNotEditable);
if (m_fRtl)
{
vwenv.set_IntProperty((int)FwTextPropType.ktptRightToLeft,
(int)FwTextPropVar.ktpvEnum, (int)FwTextToggleVal.kttvForceOn);
vwenv.set_IntProperty((int)FwTextPropType.ktptAlign,
(int)FwTextPropVar.ktpvEnum, (int) FwTextAlign.ktalRight);
}
vwenv.set_IntProperty((int)FwTextPropType.ktptSpellCheck, (int)FwTextPropVar.ktpvEnum,
(int)SpellingModes.ksmDoNotCheck);
vwenv.OpenParagraph();
AddSegmentReference(vwenv, hvo); // Calculate and display the segment reference.
AddLabelPile(vwenv, m_tsf, m_cache, true, m_fShowMorphBundles);
vwenv.AddObjVecItems(ktagSegmentForms, this, kfragBundle);
// JohnT, 1 Feb 2008. Took this out as I can see no reason for it; AddObjVecItems handles
// the dependency already. Adding it just means that any change to the forms list
// regenerates a higher level than needed, which contributes to a great deal of scrolling
// and flashing (LT-7470).
// Originally added by Eric in revision 72 on the trunk as part of handling phrases.
// Eric can't see any reason we need it now, either. If you find a need to re-insert it,
// please document carefully the reasons it is needed and what bad consequences follow
// from removing it.
//vwenv.NoteDependency(new int[] { hvo }, new int[] { ktagSegmentForms }, 1);
vwenv.CloseParagraph();
// This puts 3 points of margin on the first FF annotation, if any.
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginTop,
(int)FwTextPropVar.ktpvMilliPoint, 0); // 3000
vwenv.AddObjVec(ktagSegFF, this, kfragSegFf);
vwenv.CloseDiv();
break;
case kfragBundle: // One annotated word bundle; hvo is CmBaseAnnotation.
// checking AllowLayout (especially in context of Undo/Redo make/break phrase)
// helps prevent us from rebuilding the display until we've finished
// reconstructing the data and cache. Otherwise we can crash.
if (m_rootsite != null && !m_rootsite.AllowLayout)
return;
//.........这里部分代码省略.........