Пример #1
0
 public virtual void Read(ISyntaxEdit Owner, TextReader Reader)
 {
     this.owner  = Owner;
     this.reader = Reader;
     this.ReadHeader();
     this.ReadContent();
 }
Пример #2
0
 // Methods
 public Braces(ISyntaxEdit Owner)
 {
     this.bracesColor  = EditConsts.DefaultBracesForeColor;
     this.useRoundRect = false;
     this.bracesStyle  = EditConsts.DefaultBracesFontStyle;
     this.owner        = Owner;
 }
Пример #3
0
 public void Write(ISyntaxEdit Owner, TextWriter Writer)
 {
     this.owner = Owner;
     this.StartDocument(Writer);
     this.WriteContent();
     this.EndDocument();
 }
Пример #4
0
 public void Init(ISyntaxEdit SyntaxEdit)
 {
     base.PrinterSettings.MinimumPage = 1;
     base.PrinterSettings.FromPage    = Math.Max(base.PrinterSettings.FromPage, 1);
     base.PrinterSettings.ToPage      = Math.Max(base.PrinterSettings.ToPage, 1);
     this.syntaxEdit      = ((Printing)this.printing).OnCreatePrintEdit();
     this.syntaxEdit.Font = SyntaxEdit.Font;
     if (((this.printing.Options & PrintOptions.PrintSelection) != PrintOptions.None) && !SyntaxEdit.Selection.IsEmpty())
     {
         this.syntaxEdit.Lines.Text = SyntaxEdit.Selection.SelectedText;
     }
     else
     {
         this.syntaxEdit.Source = SyntaxEdit.Source;
     }
     this.syntaxEdit.WordWrap = (this.printing.Options & PrintOptions.WordWrap) != PrintOptions.None;
     this.syntaxEdit.Gutter.Assign(SyntaxEdit.Gutter);
     this.syntaxEdit.Gutter.Visible = false;
     this.syntaxEdit.Gutter.Options = ((this.printing.Options & PrintOptions.LineNumbers) != PrintOptions.None) ? GutterOptions.PaintLineNumbers : GutterOptions.None;
     this.syntaxEdit.Gutter.LineNumbersBackColor = this.syntaxEdit.BackColor;
     this.syntaxEdit.Margin.Visible       = false;
     this.syntaxEdit.Braces.BracesOptions = BracesOptions.None;
     if ((this.printing.Options & PrintOptions.UseSyntax) == PrintOptions.None)
     {
         this.syntaxEdit.DisableSyntaxPaint = true;
     }
     if ((this.printing.Options & PrintOptions.UseColors) == PrintOptions.None)
     {
         this.syntaxEdit.DisableColorPaint = true;
     }
     this.syntaxEdit.Scrolling.WindowOriginX = 0;
     this.syntaxEdit.Scrolling.WindowOriginY = 0;
     ((Printing)this.printing).OnInitialized();
 }
Пример #5
0
 private ILexStyle[] GetLexStyles(ISyntaxEdit SyntaxEdit)
 {
     if (SyntaxEdit.Source.Lexer == null)
     {
         return(null);
     }
     return(SyntaxEdit.Source.Lexer.Scheme.Styles);
 }
Пример #6
0
 // Methods
 public Scrolling(ISyntaxEdit Owner)
 {
     this.scrollBars            = RichTextBoxScrollBars.Both;
     this.defaultHorzScrollSize = EditConsts.DefaultHorzScrollSize;
     this.smoothScroll          = true;
     this.showScrollHint        = false;
     this.owner = Owner;
 }
Пример #7
0
 // Methods
 public Outlining(ISyntaxEdit Owner)
 {
     this.outlineColor = EditConsts.DefaultOutlineForeColor;
     this.owner        = Owner;
     if (this.owner != null)
     {
         this.displayLines = (DisplayStrings)this.owner.DisplayLines;
     }
 }
Пример #8
0
 // Methods
 public Printing(ISyntaxEdit Owner)
 {
     this.hookHandle      = IntPtr.Zero;
     this.lastWnd         = IntPtr.Zero;
     this.owner           = Owner;
     this.header          = new PageHeader(this.owner.Pages[0]);
     this.footer          = new PageHeader(this.owner.Pages[0]);
     this.printerSettings = new System.Drawing.Printing.PrinterSettings();
     this.printDocument   = new EditorPrintDocument(this, this.printerSettings);
     this.printDocument.PrinterSettings = this.printerSettings;
     this.options        = EditConsts.DefaultPrintOptions;
     this.allowedOptions = EditConsts.DefaultPrintOptions;
 }
Пример #9
0
 private void ScrollRect(ref Rectangle Rect)
 {
     if (this.pages != null)
     {
         ISyntaxEdit edit1 = this.pages.Owner;
         if (this.pages.PageType == PageType.PageLayout)
         {
             Rect.Offset(-edit1.Scrolling.WindowOriginX, -edit1.Scrolling.WindowOriginY);
         }
         else
         {
             Rect.Offset(-edit1.Scrolling.WindowOriginX * edit1.Painter.FontWidth, -edit1.Scrolling.WindowOriginY * edit1.Painter.FontHeight);
         }
     }
 }
Пример #10
0
 // Methods
 public FmtFiler(ISyntaxEdit Owner, ExportFormat Format)
 {
     this.format = ExportFormat.Text;
     this.owner  = Owner;
     this.format = Format;
 }
Пример #11
0
 public HyperTextEx(ISyntaxEdit Owner) : this()
 {
     this.owner = Owner;
 }
Пример #12
0
 public EditPages(ISyntaxEdit Owner) : this()
 {
     this.owner = Owner;
 }
Пример #13
0
 public WhiteSpace(ISyntaxEdit Owner) : this()
 {
     this.owner = Owner;
 }
Пример #14
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);
        }
Пример #15
0
 public LineSeparator(ISyntaxEdit Owner) : this()
 {
     this.owner = Owner;
 }
Пример #16
0
 public Margin(ISyntaxEdit Owner) : this()
 {
     this.owner = Owner;
 }
Пример #17
0
 // Methods
 public Spelling(ISyntaxEdit Owner)
 {
     this.spellColor = EditConsts.DefaultSpellForeColor;
     this.owner      = Owner;
 }
Пример #18
0
 public Gutter(ISyntaxEdit Owner) : this()
 {
     this.owner = Owner;
 }