public override void MakeRoot() { CheckDisposed(); m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); m_vc = new RibbonVc(this); if (LineChoices == null) { // fall-back (mainly for testing). LineChoices = new InterlinLineChoices(Cache.LangProject, Cache.DefaultVernWs, Cache.DefaultAnalWs); LineChoices.Add(InterlinLineChoices.kflidWord); LineChoices.Add(InterlinLineChoices.kflidWordGloss); } m_vc.LineChoices = LineChoices; m_rootb.DataAccess = Decorator; m_rootb.SetRootObject(HvoRoot, m_vc, kfragRibbonWordforms, this.StyleSheet); base.MakeRoot(); m_rootb.Activate(VwSelectionState.vssOutOfFocus); // Makes selection visible even before ever got focus.\ MakeInitialSelection(); }
public override void MakeRoot() { CheckDisposed(); m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); m_vc = new RibbonVc(this); if (m_lineChoices == null) { // fall-back (mainly for testing). m_lineChoices = new InterlinLineChoices(0, m_cache.DefaultAnalWs, m_cache.LangProject); m_lineChoices.Add(InterlinLineChoices.kflidWord); m_lineChoices.Add(InterlinLineChoices.kflidWordGloss); } m_vc.LineChoices = m_lineChoices; // may be needed..normally happens when the VC displays a top-level paragraph. //SetupRealVernWsForDisplay(m_cache.LangProject.ActualWs(LangProject.kwsVernInParagraph, // hvo, (int)StText.StTextTags.kflidParagraphs)); m_rootb.DataAccess = m_cache.MainCacheAccessor; m_rootb.SetRootObject(HvoRoot, m_vc, kfragRibbonAnnotations, this.StyleSheet); base.MakeRoot(); m_rootb.Activate(VwSelectionState.vssOutOfFocus); // Makes selection visible even before ever got focus.\ MakeInitialSelection(); }
protected override void Dispose(bool disposing) { if (disposing) { if (m_vc != null) m_vc.Dispose(); } m_vc = null; base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (m_vc != null) { m_vc.Dispose(); } } m_vc = null; base.Dispose(disposing); }