public JustifiedTextChunkView(ITextProcessingRules rules, ITextNode node, IStyle style, IList <ITextChunkView <TDocument> > chunks) : base(node, style) { this.rules = rules; if (chunks.Count == 0) { throw new ArgumentException(); } Offset = chunks[0].Offset; EndOffset = chunks[chunks.Count - 1].EndOffset; EndOffsetWithoutLineBreaks = chunks[chunks.Count - 1].EndOffsetWithoutLineBreaks; for (int i = 0; i < chunks.Count; i += 1) { ChopText(chunks[i]); } }
public TextChunkView(ITextProcessingRules rules, ITextNode node, IStyle style, ITextPosition offset, ITextPosition endOffset) : base(node, style) { this.rules = rules; OffsetPosition = offset; EndOffsetPosition = endOffset; }
public PlainTextDocument() : base(new StringDocumentContent()) { rootNode = new ImmutableBranchNode(this); rules = new TextProcessingRules(); }
public PasswordChunkView(ITextProcessingRules rules, ITextNode node, IStyle style, ITextPosition offset, ITextPosition endOffset, string passwordCharacter) : base(rules, node, style, offset, endOffset) { PasswordCharacter = passwordCharacter; }
public LineBreakFilter(ITextProcessingRules rules) { this.rules = rules; this.bufferContent = new StringDocumentContent(); this.buffer = new StringBuilder(); }
public static bool IsWordBreakPosition(this ITextProcessingRules rules, char prev, char curr) { return(rules.IsWordBreak(prev, curr) != WordBreakType.None); }
public static bool IsValidCursorPosition(this ITextProcessingRules rules, char prev, char curr) { return(rules.IsLineBreak(prev, curr) == LineBreakType.None); }
public static bool IsInvalidCursorPosition(this ITextProcessingRules rules, char prev, char curr) { return(!rules.IsValidCursorPosition(prev, curr)); }
ExposingTestChunk(ITextProcessingRules rules, ITextNode node, IStyle style, ITextPosition offset, ITextPosition endOffset) : base(rules, node, style, offset, endOffset) { }