private IInputElement InputHitTestSection(PTS.FSPOINT pt, ref PTS.FSSECTIONDESCRIPTION sectionDesc) { IInputElement result = null; PTS.FSSECTIONDETAILS fssectiondetails; PTS.Validate(PTS.FsQuerySectionDetails(this.PtsContext.Context, sectionDesc.pfssection, out fssectiondetails)); if (PTS.ToBoolean(fssectiondetails.fFootnotesAsPagenotes)) { ErrorHandler.Assert(fssectiondetails.u.withpagenotes.cEndnoteColumns == 0, ErrorHandler.NotSupportedFootnotes); if (fssectiondetails.u.withpagenotes.cBasicColumns != 0) { PTS.FSTRACKDESCRIPTION[] array; PtsHelper.TrackListFromSection(this.PtsContext, sectionDesc.pfssection, ref fssectiondetails, out array); for (int i = 0; i < array.Length; i++) { if (array[i].fsrc.Contains(pt)) { result = PtsHelper.InputHitTestTrack(this.PtsContext, pt, ref array[i]); break; } } } } else { ErrorHandler.Assert(false, ErrorHandler.NotSupportedCompositeColumns); } return(result); }
private void ArrangeSection(ref PTS.FSSECTIONDESCRIPTION sectionDesc) { PTS.FSSECTIONDETAILS fssectiondetails; PTS.Validate(PTS.FsQuerySectionDetails(this.PtsContext.Context, sectionDesc.pfssection, out fssectiondetails)); if (PTS.ToBoolean(fssectiondetails.fFootnotesAsPagenotes)) { ErrorHandler.Assert(fssectiondetails.u.withpagenotes.cEndnoteColumns == 0, ErrorHandler.NotSupportedFootnotes); if (fssectiondetails.u.withpagenotes.cBasicColumns != 0) { PTS.FSTRACKDESCRIPTION[] array; PtsHelper.TrackListFromSection(this.PtsContext, sectionDesc.pfssection, ref fssectiondetails, out array); for (int i = 0; i < array.Length; i++) { this._section.StructuralCache.CurrentArrangeContext.PushNewPageData(this._pageContextOfThisPage, array[i].fsrc, this._finitePage); PtsHelper.ArrangeTrack(this.PtsContext, ref array[i], fssectiondetails.u.withpagenotes.fswdir); this._section.StructuralCache.CurrentArrangeContext.PopPageData(); } return; } } else { ErrorHandler.Assert(false, ErrorHandler.NotSupportedCompositeColumns); } }
internal unsafe static void SectionListFromPage(PtsContext ptsContext, IntPtr page, ref PTS.FSPAGEDETAILS pageDetails, out PTS.FSSECTIONDESCRIPTION[] arraySectionDesc) { arraySectionDesc = new PTS.FSSECTIONDESCRIPTION[pageDetails.u.complex.cSections]; int num; fixed(PTS.FSSECTIONDESCRIPTION *ptr = arraySectionDesc) { PTS.Validate(PTS.FsQueryPageSectionList(ptsContext.Context, page, pageDetails.u.complex.cSections, ptr, out num)); } ErrorHandler.Assert(pageDetails.u.complex.cSections == num, ErrorHandler.PTSObjectsCountMismatch); }
private void UpdateViewportSection(ref PTS.FSSECTIONDESCRIPTION sectionDesc, ref PTS.FSRECT viewport) { PTS.FSSECTIONDETAILS fssectiondetails; PTS.Validate(PTS.FsQuerySectionDetails(this.PtsContext.Context, sectionDesc.pfssection, out fssectiondetails)); if (PTS.ToBoolean(fssectiondetails.fFootnotesAsPagenotes)) { ErrorHandler.Assert(fssectiondetails.u.withpagenotes.cEndnoteColumns == 0, ErrorHandler.NotSupportedFootnotes); if (fssectiondetails.u.withpagenotes.cBasicColumns != 0) { PTS.FSTRACKDESCRIPTION[] array; PtsHelper.TrackListFromSection(this.PtsContext, sectionDesc.pfssection, ref fssectiondetails, out array); for (int i = 0; i < array.Length; i++) { PtsHelper.UpdateViewportTrack(this.PtsContext, ref array[i], ref viewport); } return; } } else { ErrorHandler.Assert(false, ErrorHandler.NotSupportedCompositeColumns); } }
private List <Rect> GetRectanglesInSection(ContentElement e, int start, int length, ref PTS.FSSECTIONDESCRIPTION sectionDesc) { PTS.FSSECTIONDETAILS fssectiondetails; PTS.Validate(PTS.FsQuerySectionDetails(this.PtsContext.Context, sectionDesc.pfssection, out fssectiondetails)); List <Rect> list = new List <Rect>(); if (PTS.ToBoolean(fssectiondetails.fFootnotesAsPagenotes)) { ErrorHandler.Assert(fssectiondetails.u.withpagenotes.cEndnoteColumns == 0, ErrorHandler.NotSupportedFootnotes); if (fssectiondetails.u.withpagenotes.cBasicColumns != 0) { PTS.FSTRACKDESCRIPTION[] array; PtsHelper.TrackListFromSection(this.PtsContext, sectionDesc.pfssection, ref fssectiondetails, out array); for (int i = 0; i < array.Length; i++) { List <Rect> rectanglesInTrack = PtsHelper.GetRectanglesInTrack(this.PtsContext, e, start, length, ref array[i]); Invariant.Assert(rectanglesInTrack != null); if (rectanglesInTrack.Count != 0) { list.AddRange(rectanglesInTrack); } } } } else { ErrorHandler.Assert(false, ErrorHandler.NotSupportedCompositeColumns); } return(list); }
private void UpdateSectionVisuals(SectionVisual visual, PTS.FSKUPDATE fskupdInherited, ref PTS.FSSECTIONDESCRIPTION sectionDesc) { PTS.FSKUPDATE fskupdate = sectionDesc.fsupdinf.fskupd; if (fskupdate == PTS.FSKUPDATE.fskupdInherited) { fskupdate = fskupdInherited; } ErrorHandler.Assert(fskupdate != PTS.FSKUPDATE.fskupdShifted, ErrorHandler.UpdateShiftedNotValid); if (fskupdate == PTS.FSKUPDATE.fskupdNoChange) { return; } PTS.FSSECTIONDETAILS fssectiondetails; PTS.Validate(PTS.FsQuerySectionDetails(this.PtsContext.Context, sectionDesc.pfssection, out fssectiondetails)); bool flag; if (PTS.ToBoolean(fssectiondetails.fFootnotesAsPagenotes)) { ErrorHandler.Assert(fssectiondetails.u.withpagenotes.cEndnoteColumns == 0, ErrorHandler.NotSupportedFootnotes); flag = (fssectiondetails.u.withpagenotes.cBasicColumns == 0); if (!flag) { PTS.FSTRACKDESCRIPTION[] array; PtsHelper.TrackListFromSection(this.PtsContext, sectionDesc.pfssection, ref fssectiondetails, out array); flag = (array.Length == 0); if (!flag) { ColumnPropertiesGroup columnProperties = new ColumnPropertiesGroup(this._section.Element); visual.DrawColumnRules(ref array, TextDpi.FromTextDpi(sectionDesc.fsrc.v), TextDpi.FromTextDpi(sectionDesc.fsrc.dv), columnProperties); VisualCollection children = visual.Children; if (fskupdate == PTS.FSKUPDATE.fskupdNew) { children.Clear(); for (int i = 0; i < array.Length; i++) { children.Add(new ContainerVisual()); } } ErrorHandler.Assert(children.Count == array.Length, ErrorHandler.ColumnVisualCountMismatch); for (int j = 0; j < array.Length; j++) { ContainerVisual containerVisual = (ContainerVisual)children[j]; PtsHelper.UpdateTrackVisuals(this.PtsContext, containerVisual.Children, fskupdate, ref array[j]); } } } } else { ErrorHandler.Assert(false, ErrorHandler.NotSupportedCompositeColumns); flag = true; } if (flag) { visual.Children.Clear(); } }