示例#1
0
文件: Gutter.cs 项目: stevencohn/Orqa
        private void DrawOutlineButton(ITextPainter Painter, int Line, int L, int T, int W, bool DrawLines, bool AVisible, bool ABefore, bool AAfter)
        {
            int num1 = EditConsts.DefaultCollasedImageWidth;
            int num2 = T;

            this.CenterOutlineRect(ref L, ref T, W);
            Rectangle rectangle1 = new Rectangle(L, T, num1, num1);

            this.drawInfo.Init();
            this.drawInfo.Line = Line;
            IOutlining outlining1 = this.owner.Outlining;
            Color      color1     = Painter.BkColor;
            Color      color2     = Painter.PenColor;

            try
            {
                Painter.BkColor  = outlining1.OutlineColor;
                Painter.PenColor = outlining1.OutlineColor;
                if (!this.owner.OnCustomDraw(Painter, rectangle1, DrawStage.Before, DrawState.OutlineButton | DrawState.Gutter, this.drawInfo))
                {
                    this.DrawRectangle(Painter, rectangle1, !AVisible);
                    if (DrawLines)
                    {
                        if (ABefore)
                        {
                            this.DrawLine(Painter, L + (num1 >> 1), num2, L + (num1 >> 1), T + 1);
                        }
                        if (AAfter)
                        {
                            this.DrawLine(Painter, L + (num1 >> 1), T + num1, L + (num1 >> 1), (num2 + W) + 1);
                        }
                    }
                }
                this.owner.OnCustomDraw(Painter, rectangle1, DrawStage.After, DrawState.OutlineButton | DrawState.Gutter, this.drawInfo);
            }
            finally
            {
                Painter.BkColor  = color1;
                Painter.PenColor = color2;
            }
        }
示例#2
0
 public void Assign(IOutlining Source)
 {
     this.AllowOutlining = Source.AllowOutlining;
     this.OutlineOptions = Source.OutlineOptions;
     this.OutlineColor   = Source.OutlineColor;
 }
示例#3
0
        // Methods
        public EventHandlers(ISyntaxEdit Owner)
        {
            this.owner = Owner;
            ISelection selection1 = this.owner.Selection;

            this.tabifyEvent             = new KeyEvent(selection1.Tabify);
            this.unTabifyEvent           = new KeyEvent(selection1.UnTabify);
            this.lowerCaseEvent          = new KeyEvent(selection1.LowerCase);
            this.upperCaseEvent          = new KeyEvent(selection1.UpperCase);
            this.capitalizeEvent         = new KeyEvent(selection1.Capitalize);
            this.deleteWhiteSpaceEvent   = new KeyEvent(selection1.DeleteWhiteSpace);
            this.moveCharLeftEvent       = new KeyEvent(this.owner.MoveCharLeft);
            this.moveCharRightEvent      = new KeyEvent(this.owner.MoveCharRight);
            this.moveLineUpEvent         = new KeyEvent(this.owner.MoveLineUp);
            this.moveLineDownEvent       = new KeyEvent(this.owner.MoveLineDown);
            this.moveWordLeftEvent       = new KeyEvent(this.owner.MoveWordLeft);
            this.moveWordRightEvent      = new KeyEvent(this.owner.MoveWordRight);
            this.movePageUpEvent         = new KeyEvent(this.owner.MovePageUp);
            this.movePageDownEvent       = new KeyEvent(this.owner.MovePageDown);
            this.moveScreenTopEvent      = new KeyEvent(this.owner.MoveScreenTop);
            this.moveScreenBottomEvent   = new KeyEvent(this.owner.MoveScreenBottom);
            this.moveLineBeginEvent      = new KeyEvent(this.MoveLineBegin);
            this.moveLineEndEvent        = new KeyEvent(this.owner.MoveLineEnd);
            this.moveFileBeginEvent      = new KeyEvent(this.owner.MoveFileBegin);
            this.moveFileEndEvent        = new KeyEvent(this.owner.MoveFileEnd);
            this.selectCharLeftEvent     = new KeyEventEx(this.SelectCharLeft);
            this.selectCharRightEvent    = new KeyEventEx(this.SelectCharRight);
            this.selectLineUpEvent       = new KeyEventEx(this.SelectLineUp);
            this.selectLineDownEvent     = new KeyEventEx(this.SelectLineDown);
            this.selectWordLeftEvent     = new KeyEventEx(this.SelectWordLeft);
            this.selectWordRightEvent    = new KeyEventEx(this.SelectWordRight);
            this.selectPageUpEvent       = new KeyEventEx(this.SelectPageUp);
            this.selectPageDownEvent     = new KeyEventEx(this.SelectPageDown);
            this.selectScreenTopEvent    = new KeyEventEx(this.SelectScreenTop);
            this.selectScreenBottomEvent = new KeyEventEx(this.SelectScreenBottom);
            this.selectLineBeginEvent    = new KeyEventEx(this.SelectLineBegin);
            this.selectLineEndEvent      = new KeyEventEx(this.SelectLineEnd);
            this.selectFileBeginEvent    = new KeyEventEx(this.SelectFileBegin);
            this.selectFileEndEvent      = new KeyEventEx(this.SelectFileEnd);
            this.selectAllEvent          = new KeyEvent(selection1.SelectAll);
            this.toggleBookMarkEvent     = new KeyEvent(this.ToggleBookMark);
            this.nextBookMarkEvent       = new KeyEvent(this.GotoNextBookMark);
            this.prevBookMarkEvent       = new KeyEvent(this.GotoPrevBookMark);
            this.clearBookMarkEvent      = new KeyEvent(this.ClearAllBookMarks);
            this.toggleBookMarkEventEx   = new KeyEventEx(this.ToggleBookMark);
            this.moveBookMarkEvent       = new KeyEventEx(this.GotoBookMark);
            this.deleteLeftEvent         = new KeyEvent(this.DeleteLeft);
            this.deleteWordLeftEvent     = new KeyEvent(selection1.DeleteWordLeft);
            this.deleteWordRightEvent    = new KeyEvent(selection1.DeleteWordRight);
            this.deleteRightEvent        = new KeyEvent(selection1.DeleteRight);
            this.newLineEvent            = new KeyEvent(selection1.NewLine);
            this.processEscapeEvent      = new KeyEvent(this.ProcessEscape);
            this.processTabEvent         = new KeyEvent(selection1.ProcessTab);
            this.processShiftTabEvent    = new KeyEvent(selection1.ProcessShiftTab);
            this.toggleOverwriteEvent    = new KeyEvent(selection1.ToggleOverWrite);
            IOutlining outlining1 = this.owner.Outlining;

            this.toggleOutliningEvent          = new KeyEvent(outlining1.ToggleOutlining);
            this.toggleOutliningSelectionEvent = new KeyEvent(selection1.ToggleOutlining);
            this.swapAnchorEvent                   = new KeyEvent(selection1.SwapAnchor);
            this.undoEvent                         = new KeyEvent(this.Undo);
            this.redoEvent                         = new KeyEvent(this.Redo);
            this.findEvent                         = new KeyEvent(this.Find);
            this.findNextEvent                     = new KeyEvent(this.FindNext);
            this.findPreviousEvent                 = new KeyEvent(this.FindPrevious);
            this.findNextSelectedEvent             = new KeyEvent(this.FindNextSelected);
            this.findPreviousSelectedEvent         = new KeyEvent(this.FindPreviousSelected);
            this.replaceEvent                      = new KeyEvent(this.Replace);
            this.gotolineEvent                     = new KeyEvent(this.GotoLine);
            this.initIncrementalSearchEvent        = new KeyEvent(this.owner.StartIncrementalSearch);
            this.initReverseIncrementalSearchEvent = new KeyEvent(this.StartReverseIncrementalSearch);
            this.cutEvent                      = new KeyEvent(selection1.Cut);
            this.copyEvent                     = new KeyEvent(selection1.Copy);
            this.pasteEvent                    = new KeyEvent(selection1.Paste);
            this.completeWordEvent             = new KeyEvent(this.owner.CompleteWord);
            this.listMembersEvent              = new KeyEvent(this.owner.ListMembers);
            this.quickInfoEvent                = new KeyEvent(this.owner.QuickInfo);
            this.parameterInfoEvent            = new KeyEvent(this.owner.ParameterInfo);
            this.formatSelectionEvent          = new KeyEvent(selection1.SmartFormat);
            this.formatDocumentEvent           = new KeyEvent(selection1.SmartFormatDocument);
            this.charTransposeEvent            = new KeyEvent(selection1.CharTransponse);
            this.wordTransposeEvent            = new KeyEvent(selection1.WordTransponse);
            this.lineTransposeEvent            = new KeyEvent(selection1.LineTransponse);
            this.toggleHiddenTextEvent         = new KeyEvent(this.ToggleHiddenText);
            this.toggleMatchCaseEvent          = new KeyEvent(this.ToggleMatchCase);
            this.toggleRegularExpressionsEvent = new KeyEvent(this.ToggleRegularExpressions);
            this.toggleSearchUpEvent           = new KeyEvent(this.ToggleSearchUp);
            this.toggleWholeWordEvent          = new KeyEvent(this.ToggleWholeWord);
            this.scrollLineUpEvent             = new KeyEvent(this.owner.ScrollLineUp);
            this.scrollLineDownEvent           = new KeyEvent(this.owner.ScrollLineDown);
            this.moveToOpenBraceEvent          = new KeyEvent(this.owner.MoveToOpenBrace);
            this.moveToOpenBraceExtendEvent    = new KeyEvent(selection1.SelectToOpenBrace);
            this.moveToCloseBraceEvent         = new KeyEvent(this.owner.MoveToCloseBrace);
            this.moveToCloseBraceExtendEvent   = new KeyEvent(selection1.SelectToCloseBrace);
            this.newLineAboveEvent             = new KeyEvent(selection1.NewLineAbove);
            this.newLineBelowEvent             = new KeyEvent(selection1.NewLineBelow);
            this.selectWordEvent               = new KeyEvent(selection1.SelectWord);
            this.lineCutEvent                  = new KeyEvent(selection1.CutLine);
            this.lineDeleteEvent               = new KeyEvent(selection1.DeleteLine);
        }