public CarretLayer(TextView parent) : base(parent) { KeyboardInputEnabled = true; SetTextAnchor(0); }
public void OnLoad(Flood.Remoting.ServiceManager serviceManager) { var paneManager = serviceManager.GetGlobalService<IPaneManager>(); var textDocument = new TextDocument(); var textView = new TextView(null, textDocument); var pane = new Pane { Title = "CodeEdit", Control = textView }; paneManager.AddPane(pane); }
public TextLayer(TextView parent, TextDocument textDocument) : base(parent) { Document = textDocument; elementGenerators = new ObserveAddRemoveCollection<VisualLineElementGenerator>(ElementGenerator_Added, ElementGenerator_Removed); lineTransformers = new ObserveAddRemoveCollection<IVisualLineTransformer>(LineTransformer_Added, LineTransformer_Removed); heightTree = new HeightTree(textDocument, 16); //TODO Skin.DefaultFont.Size lines = new Dictionary<DocumentLine, VisualLine>(); GlobalTextRunProperties = new TextRunProperties { Foreground = Color.Black}; lineTransformers = new ObserveAddRemoveCollection<IVisualLineTransformer>(LineTransformer_Added,LineTransformer_Removed); HighlightingDefinition = HighlightingManager.DefaultHighlightingManager.Instance.GetDefinition("C#"); var colorizer = new HighlightingColorizer(highlightingDefinition.MainRuleSet); lineTransformers.Add(colorizer); weakLineTracker = WeakLineTracker.Register(textDocument, this); RebuildDocument(); }
protected Layer(TextView parent) : base(parent) { Dock = Pos.Fill; }