C# (CSharp) SIL.FieldWorks.SharpViews.Paragraphs Namespace

Classes

Name Description
GroupRenderRun
MapRun A map run represents a section of a paragraph: either a sequence of characters not including an ORC and having uniform properties and belonging to a single TextClientRun, or a non-text ClientRun, or the expansion of an ORC. It's main responsibility is to represent the relationship between a run of logical characters on the client side, and a run of rendering characters.
MlsClientRun Implementation of TextClientRun based on ITsString.
OrcMapRun MapRun for the special run we make when we encounter an ORC. It always corresponds to exactly one logical character, the orc.
ParaBox
ParaBuilder This class is responsible for laying out the components of a paragraph. It may do a complete layout, or redo the layout of a previously laid out paragraph that is being adjusted, typically because its contents have changed. Its primary organization is a process of assembling lines by adding stuff to them until they are full or there is nothing more to add. Initially, and after each line has been successfully added, its state may be thought of as follows: 1. We are trying to build a box sequence which will be stored in m_para.FirstBox. A chain of boxes built so far begins at m_firstBox (which may initially be null) and continues to m_lastBox. These boxes are organized into lines, stored in m_lines. They correspond to the text from the RenderRuns before m_renderRunIndex, plus the text from RenderRuns[m_renderRunIndex] == m_currentRenderRun, up to m_ichRendered. 2. There may also be a group of lines at the end of the paragraph which we hope to be able to reuse (though they will currently be relative to another, old, TextSource). These lines are stored in m_oldLines, and we have deduced that they correspond to the text in our current source from m_ichStartReusing onwards. If, after completing a line, we find that m_ichRendered == m_ichStartReusing, then we have resynchronized and can reuse the old lines, after adjusting their source and source offset. 3. Otherwise, we have to build a new line, starting with the material at m_ichRendered. Before doing this, if m_ichStartReusing > m_ichRendered, we must discard one (or more) lines of m_oldLines, since we are already past its position. The process of constructing a line is basically to add boxes and text runs (which become string boxes) to the line until it is full. At that point, it may be determined that the current end of the line is not a valid place to break the line. This typically comes about because the last thing on the line is a text box which terminated at a writing system change rather than at a point where the RenderEngine said we could break. When this happens we must backtrack, replacing the last (string) box with a shortened version ending at a good break, or removing it altogether if it is not the first box on the line. (We must always put something on a line, or we get an infinite loop.)
ParaLine This class represents one line in a paragraph. It is not itself a box, but merely a way of organizing the boxes of the paragraph.
SimpleRenderRun
StringBox This class is used for a run of text with the same writing system on a single line. String boxes are created and destroyed quite frequently as (for example) the paragraph layout width changes. Accordingly references to string boxes should not be held. To discourage this, for now StringBox is not a public class. A StringBox wraps an ILgRenderSegment, which does much of the actual rendering etc.
StringClientRun An implementation of TextClientRun allowing us to use ordinary strings in paragraph layout. The AssembledStyles must specify a valid writing system.
SubstituteMapRun A subclass used to display a substitute for an empty string. The clientRun is always empty.
SubstituteMlsClientRun
SubstituteStringClientRun The special StringClientRun we use to support displaying a substitute string when the run is empty.
SubstituteTssClientRun The special TssClientRun we use to support displaying a substitute string when the run is empty.
TextClientRun Used for things in a paragraph that contain text. Abstracts the behavior of TsString and ordinary strings that is important for paragraph layout.
TssClientRun Implementation of TextClientRun based on ITsString.