コード例 #1
0
ファイル: CarretLayer.cs プロジェクト: FloodProject/flood
        public CarretLayer(TextView parent)
            : base(parent)
        {
            KeyboardInputEnabled = true;

            SetTextAnchor(0);
        }
コード例 #2
0
ファイル: Module.cs プロジェクト: FloodProject/flood
        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);
        }
コード例 #3
0
ファイル: TextLayer.cs プロジェクト: FloodProject/flood
        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();
        }
コード例 #4
0
ファイル: Layer.cs プロジェクト: chartly/flood
 protected Layer(TextView parent)
     : base(parent)
 {
     Dock = Pos.Fill;
 }