Inheritance: SIL.FieldWorks.IText.InterlinVc
Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (m_vc != null)
					m_vc.Dispose();
			}
			m_vc = null;
			base.Dispose(disposing);
		}
Beispiel #4
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (m_vc != null)
         {
             m_vc.Dispose();
         }
     }
     m_vc = null;
     base.Dispose(disposing);
 }
Beispiel #5
0
		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();
		}
Beispiel #6
0
		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();
		}