コード例 #1
0
ファイル: TextView.cs プロジェクト: Lukas-Dresel/reko
        /// <summary>
        /// Computes the layout of all visible text spans and stores them the
        /// member variable 'visibleLines'. This includes a final partial item on the end.
        /// </summary>
        /// <param name="g"></param>
        protected void ComputeLayout(Graphics g)
        {
            var m      = model ?? new EmptyEditorModel();
            var oldPos = m.CurrentPosition;

            GetStyleStack().PushStyle(StyleClass);
            this.layout = TextViewLayout.VisibleLines(m, ClientSize, g, Font, GetStyleStack());
            GetStyleStack().PopStyle();
            m.MoveToLine(oldPos, 0);
        }
コード例 #2
0
 public TextViewPainter(TextViewLayout outer, Graphics g, Color fgColor, Color bgColor, Font defaultFont, StyleStack styleStack)
 {
     this.outer          = outer;
     this.graphics       = g;
     this.defaultFgColor = fgColor;
     this.defaultBgColor = bgColor;
     this.defaultFont    = defaultFont;
     this.styleStack     = styleStack;
     this.useGdiPlus     = false;
 }
コード例 #3
0
ファイル: TextViewPainter.cs プロジェクト: relaxar/reko
 public TextViewPainter(TextViewLayout outer, Graphics g, Color fgColor, Color bgColor, Font defaultFont, StyleStack styleStack)
 {
     this.outer = outer;
     this.graphics = g;
     this.defaultFgColor = fgColor;
     this.defaultBgColor = bgColor;
     this.defaultFont = defaultFont;
     this.styleStack = styleStack;
     this.useGdiPlus = false;
 }
コード例 #4
0
ファイル: TextView.cs プロジェクト: Lukas-Dresel/reko
        private LayoutSpan spanHover;       // The span over which the mouse is hovering.

        public TextView()
        {
            InitializeComponent();

            base.DoubleBuffered        = true;
            this.Selection             = new TextSelection(this);
            this.model                 = new EmptyEditorModel();
            this.stringFormat          = StringFormat.GenericTypographic;
            this.layout                = new TextViewLayout(model, this.Font);
            this.vScroll.ValueChanged += vScroll_ValueChanged;
        }
コード例 #5
0
ファイル: TextView.cs プロジェクト: relaxar/reko
        public TextView()
        {
            InitializeComponent();

            base.DoubleBuffered = true;
            this.Selection = new TextSelection(this);
            this.model = new EmptyEditorModel();
            this.stringFormat = StringFormat.GenericTypographic;
            this.layout = new TextViewLayout(model, this.Font);
            this.vScroll.ValueChanged += vScroll_ValueChanged;
        }
コード例 #6
0
ファイル: TextView.cs プロジェクト: relaxar/reko
 /// <summary>
 /// Computes the layout of all visible text spans and stores them the 
 /// member variable 'visibleLines'. This includes a final partial item on the end.
 /// </summary>
 /// <param name="g"></param>
 protected void ComputeLayout(Graphics g)
 {
     var m = model ?? new EmptyEditorModel();
     var oldPos = m.CurrentPosition;
     GetStyleStack().PushStyle(StyleClass);
     this.layout = TextViewLayout.VisibleLines(m, ClientSize, g, Font, GetStyleStack());
     GetStyleStack().PopStyle();
     m.MoveToLine(oldPos, 0);
 }