protected TextView(ITextNode node, IStyle style) { Node = node; Style = style; TextStyles = Style.StyleSystem.StylesFor <TextStyleDefinition>(); }
public void SetUp() { // This test uses a 11x16 font. styleSystem = LayoutTestStyle.CreateStyleSystem(); textStyleDefinition = styleSystem.StylesFor <TextStyleDefinition>(); textStyle = LayoutTestStyle.CreateTextStyle(styleSystem); }
public Highlight(ITextPosition offset, ITextPosition endOffset, IStyle style) { this.style = style; widgetStyles = style.StyleSystem.StylesFor <TextStyleDefinition>(); Offset = offset; EndOffset = endOffset; }
protected TextWidgetBase(IUIStyle style, IDocumentEditor <TView, TDocument> editor) : base(style) { textStyles = StyleSystem.StylesFor <TextStyleDefinition>(); ChildrenChanged += HandleOnChildrenChanged; DocumentEditor = editor; Content = DocumentEditor.CreateDocumentView(AnchoredRect.CreateTopAnchored()); WrapText = WrapText.Auto; }
public Caret(IUIStyle style, TView textInformation) : base(style) { if (textInformation == null) { throw new ArgumentNullException(nameof(textInformation)); } styleDefinition = StyleSystem.StylesFor <TextStyleDefinition>(); TextInformation = textInformation; TextInformation.Document.DocumentModified += UpdatePositions; startPosition = null; endPosition = TextInformation.Document.CreatePosition(0, Bias.Backward); selectionHighlight = new Highlight <TDocument>(startPosition, endPosition, Style); textInformation.Highlighter.AddHighlight(selectionHighlight); blinkAnimation = new StepValue(0, 1) { Duration = 1, Loop = AnimationLoop.Loop }; Style.ValueChanged += OnStyleChanged; }
public LineNumberWidget(IUIStyle style) : base(style) { textStyle = StyleSystem.StylesFor <TextStyleDefinition>(); cachedTextPositions = new List <Tuple <int, string> >(); }