public void Attach(TextArea textArea)
		{
			this.textArea = textArea;
			textArea.AllowDrop = true;
			
			textArea.DragEnter += new DragEventHandler(OnDragEnter);
			textArea.DragDrop  += new DragEventHandler(OnDragDrop);
			textArea.DragOver  += new DragEventHandler(OnDragOver);
		}
		public TextAreaMouseHandler(TextArea textArea)
		{
			this.textArea = textArea;
		}
		public TextAreaClipboardHandler(TextArea textArea)
		{
			this.textArea = textArea;
			textArea.SelectionManager.SelectionChanged += new EventHandler(DocumentSelectionChanged);
		}
Example #4
0
		public HRuler(TextArea textArea)
		{
			this.textArea = textArea;
		}
Example #5
0
		public GutterMargin(TextArea textArea) : base(textArea)
		{
			numberStringFormat.LineAlignment = StringAlignment.Far;
			numberStringFormat.FormatFlags   = StringFormatFlags.MeasureTrailingSpaces | StringFormatFlags.FitBlackBox |
			                                    StringFormatFlags.NoWrap | StringFormatFlags.NoClip;
		}
		public TextAreaControl(TextEditorControl motherTextEditorControl)
		{
			this.motherTextEditorControl = motherTextEditorControl;
			this.textArea                = new TextArea(motherTextEditorControl, this);
			
			this.Controls.Add(textArea);//将TextArea用户控件加到Panel中.
			
			vScrollBar.ValueChanged += new EventHandler(VScrollBarValueChanged);
			this.Controls.Add(this.vScrollBar);
			hScrollBar.ValueChanged += new EventHandler(HScrollBarValueChanged);
			this.Controls.Add(this.hScrollBar);

			ResizeRedraw = true;//调整大小时重会自己.
			
			Document.DocumentChanged += new DocumentEventHandler(AdjustScrollBars);
			
			SetStyle(ControlStyles.Selectable, true);//可以获得焦点.
		}
Example #7
0
		public FoldMargin(TextArea textArea) : base(textArea)
		{
		}
Example #8
0
		public Caret(TextArea textArea)
		{
			this.textArea = textArea;
			textArea.GotFocus  += new EventHandler(GotFocus);
			textArea.LostFocus += new EventHandler(LostFocus);
		}
		public TextViewMargin(TextArea textArea) : base(textArea)
		{
			measureStringFormat.LineAlignment = StringAlignment.Near;
			measureStringFormat.FormatFlags   = StringFormatFlags.MeasureTrailingSpaces | 
			                                    StringFormatFlags.FitBlackBox | 
			                                    StringFormatFlags.NoWrap | 
			                                    StringFormatFlags.NoClip;
			
			OptionsChanged();
		}
		protected AbstractMargin(TextArea textArea)
		{
			this.textArea = textArea;
		}
Example #11
0
		public IconBarMargin(TextArea textArea) : base(textArea)
		{
		}
		public ButtonItem[] BuildSubmenu(object owner)
		{
			control = (TextArea)owner;
			
			ArrayList menuItems = new ArrayList();
			
			foreach (DictionaryEntry entry in HighlightingManager.Manager.HighlightingDefinitions) 
			{
				ButtonItem item = new ButtonItem();
				item.Text = entry.Key.ToString();
				item.Click +=new EventHandler(ChangeSyntax);
				item.Checked = control.Document.HighlightingStrategy.Name == entry.Key.ToString();
				menuItems.Add(item);
			}
			
			menuCommands = (ButtonItem[])menuItems.ToArray(typeof(ButtonItem));

			return menuCommands;
		}
Example #13
0
 public HRuler(TextArea textArea)
 {
     this.textArea = textArea;
 }
Example #14
0
 public Caret(TextArea textArea)
 {
     this.textArea       = textArea;
     textArea.GotFocus  += new EventHandler(GotFocus);
     textArea.LostFocus += new EventHandler(LostFocus);
 }