Ejemplo n.º 1
0
        public CharacterDocumentViewer() {
            _enableAutoScrollBarAdjustment = true;
            _transientLines = new List<GLine>();
            InitializeComponent();
            //SetStyle(ControlStyles.UserPaint|ControlStyles.AllPaintingInWmPaint|ControlStyles.DoubleBuffer, true);
            this.DoubleBuffered = true;
            _caret = new Caret();

            _splitMark = new SplitMarkSupport(this, this);
            Pen p = new Pen(SystemColors.ControlDark);
            p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
            _splitMark.Pen = p;

            _textSelection = new TextSelection(this);
            _textSelection.AddSelectionListener(this);

            _mouseHandlerManager = new MouseHandlerManager();
            _mouseHandlerManager.AddLastHandler(new TextSelectionUIHandler(this));
            _mouseHandlerManager.AddLastHandler(new SplitMarkUIHandler(_splitMark));
            _mouseHandlerManager.AttachControl(this);

            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
        }
Ejemplo n.º 2
0
 //キャレットの座標設定、表示の可否を設定
 protected virtual void AdjustCaret(Caret caret)
 {
 }
        protected override void AdjustCaret(Caret caret)
        {
            if (_session == null)
                return;

            if (IsConnectionClosed() || !this.Focused || _inIMEComposition)
                caret.Enabled = false;
            else {
                TerminalDocument d = GetDocument();
                caret.X = d.CaretColumn;
                caret.Y = d.CurrentLineNumber - d.TopLineNumber;
                caret.Enabled = caret.Y >= 0 && caret.Y < d.TerminalHeight;
            }
        }
Ejemplo n.º 4
0
 //キャレットの座標設定、表示の可否を設定
 protected virtual void AdjustCaret(Caret caret) {
 }