A constituent chart is used to organize words (and perhaps eventally somehow morphemes) into a table where rows roughtly correspond to clauses and columns to key parts of a clause. A typical chart has two pre-nuclear columns, three or four nuclear ones (SVO and perhaps indirect object) and one or two post-nuclear ones. Currently the constituent chart is displayed as a tab in the interlinear window. It is created by reflection because it needs to refer to the interlinear assembly (in order to display words in interlinear mode), so the interlinear assembly can't know about this one.
상속: System.Windows.Forms.UserControl, IxCoreColleague
예제 #1
0
		/// <summary>
		/// Make one.
		/// </summary>
		public ConstChartBody(ConstituentChartLogic logic, ConstituentChart chart)
			: base(null)
		{
			m_logic = logic;
			m_logic.RowModifiedEvent += new RowModifiedEventHandler(m_logic_RowModifiedEvent);
			m_chart = chart;
			//this.ReadOnlyView = true;
		}
예제 #2
0
		/// <summary>
		/// Make one.
		/// </summary>
		public ConstChartBody(ConstituentChartLogic logic, ConstituentChart chart)
			: base(null)
		{
			m_logic = logic;
			m_logic.RowModifiedEvent += m_logic_RowModifiedEvent;
			m_chart = chart;
			IsRightToLeft = m_chart.ChartIsRtL;
			//this.ReadOnlyView = true;
		}
예제 #3
0
        protected override void CreateTestData()
        {
            base.CreateTestData();
            m_logic        = new TestCCLogic(Cache, m_chart, m_stText);      // m_chart is still null!
            m_helper.Logic = m_logic;
            m_logic.Ribbon = new MockRibbon(Cache, m_stText.Hvo);
            m_helper.MakeTemplate(out m_allColumns);
            // Note: do this AFTER creating the template, which may also create the DiscourseData object.
            m_chart = m_helper.SetupAChart();

            m_constChart = new ConstituentChart(Cache, m_logic);
            m_constChart.Init(null, null, null);
            m_chartBody       = m_constChart.Body;
            m_chartBody.Cache = Cache;             // don't know why constructor doesn't do this, but it doesn't.

            m_chartBody.SetRoot(m_chart, m_allColumns.ToArray());
        }
예제 #4
0
		protected override void CreateTestData()
		{
			base.CreateTestData();
			m_logic = new TestCCLogic(Cache, m_chart, m_stText); // m_chart is still null!
			m_helper.Logic = m_logic;
			m_logic.Ribbon = new MockRibbon(Cache, m_stText.Hvo);
			m_helper.MakeTemplate(out m_allColumns);
			// Note: do this AFTER creating the template, which may also create the DiscourseData object.
			m_chart = m_helper.SetupAChart();

			m_constChart = new ConstituentChart(Cache, m_logic);
			m_constChart.Init(null, null);
			m_chartBody = m_constChart.Body;
			m_chartBody.Cache = Cache; // don't know why constructor doesn't do this, but it doesn't.

			m_chartBody.SetRoot(m_chart, m_allColumns.ToArray());
		}
예제 #5
0
		protected override void CreateTestData()
		{
			base.CreateTestData();
			m_firstParaWfics = m_helper.MakeAnnotations(m_firstPara);
			m_logic = new TestCCLogic(Cache, m_chart, m_stText.Hvo); // m_chart is still null!
			m_helper.Logic = m_logic;
			m_logic.Ribbon = m_mockRibbon = new MockRibbon(Cache, m_stText.Hvo);
			m_template = m_helper.MakeTemplate(out m_allColumns);
			// Note: do this AFTER creating the template, which may also create the DiscourseData object.
			m_chart = new DsConstChart();
			Cache.LangProject.DiscourseDataOA.ChartsOC.Add(m_chart);
			m_chart.TemplateRA = m_template;
			m_logic.Chart = m_chart;
			m_helper.MakeDefaultChartMarkers();
			m_helper.Chart = m_chart;

			m_constChart = new ConstituentChart(Cache, m_logic);
			m_constChart.Init(null, null);
			m_chartBody = m_constChart.Body;
			m_chartBody.Cache = Cache; // don't know why constructor doesn't do this, but it doesn't.
			m_chartBody.SetRoot(m_chart.Hvo, m_allColumns.ToArray());
		}
예제 #6
0
        protected override void CreateTestData()
        {
            base.CreateTestData();
            m_firstParaWfics = m_helper.MakeAnnotations(m_firstPara);
            m_logic          = new TestCCLogic(Cache, m_chart, m_stText.Hvo);    // m_chart is still null!
            m_helper.Logic   = m_logic;
            m_logic.Ribbon   = m_mockRibbon = new MockRibbon(Cache, m_stText.Hvo);
            m_template       = m_helper.MakeTemplate(out m_allColumns);
            // Note: do this AFTER creating the template, which may also create the DiscourseData object.
            m_chart = new DsConstChart();
            Cache.LangProject.DiscourseDataOA.ChartsOC.Add(m_chart);
            m_chart.TemplateRA = m_template;
            m_logic.Chart      = m_chart;
            m_helper.MakeDefaultChartMarkers();
            m_helper.Chart = m_chart;

            m_constChart = new ConstituentChart(Cache, m_logic);
            m_constChart.Init(null, null);
            m_chartBody       = m_constChart.Body;
            m_chartBody.Cache = Cache;             // don't know why constructor doesn't do this, but it doesn't.
            m_chartBody.SetRoot(m_chart.Hvo, m_allColumns.ToArray());
        }
예제 #7
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.ListView"/> and optionally releases the managed resources.
		/// </summary>
		/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
		/// ------------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
			}
			m_chart = null;

			base.Dispose(disposing);
		}
예제 #8
0
		/// <summary>
		/// Create one and set the chart it belongs to.
		/// </summary>
		/// <param name="chart"></param>
		public ChartHeaderView(ConstituentChart chart)
		{
			m_chart = chart;
		}
예제 #9
0
 public void Basic()
 {
     using (var chart = new ConstituentChart(Cache))
     {
     }
 }
예제 #10
0
		public void Basic()
		{
			using(var chart = new ConstituentChart(Cache))
			{
			}
		}
예제 #11
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.ListView"/> and optionally releases the managed resources.
		/// </summary>
		/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
		/// ------------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			//Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
			}
			m_chart = null;

			base.Dispose(disposing);
		}