aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/TextEditorAutomationPeer.cs
blob: 79920ff9bb8efe84bf5edb6170335eb169d0f3be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)

using System;
using System.Diagnostics;
using System.Windows.Automation;
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
using System.Windows.Controls;

using ICSharpCode.AvalonEdit.Utils;

namespace ICSharpCode.AvalonEdit
{
	/// <summary>
	/// Exposes <see cref="TextEditor"/> to automation.
	/// </summary>
	public class TextEditorAutomationPeer : FrameworkElementAutomationPeer, IValueProvider
	{
		/// <summary>
		/// Creates a new TextEditorAutomationPeer instance.
		/// </summary>
		public TextEditorAutomationPeer(TextEditor owner) : base(owner)
		{
			Debug.WriteLine("TextEditorAutomationPeer was created");
		}
		
		private TextEditor TextEditor {
			get { return (TextEditor)base.Owner; }
		}
		
		void IValueProvider.SetValue(string value)
		{
			this.TextEditor.Text = value;
		}
		
		string IValueProvider.Value {
			get { return this.TextEditor.Text; }
		}
		
		bool IValueProvider.IsReadOnly {
			get { return this.TextEditor.IsReadOnly; }
		}
		
		/// <inheritdoc/>
		public override object GetPattern(PatternInterface patternInterface)
		{
			if (patternInterface == PatternInterface.Value)
				return this;
			
			if (patternInterface == PatternInterface.Scroll) {
				ScrollViewer scrollViewer = this.TextEditor.ScrollViewer;
				if (scrollViewer != null)
					return UIElementAutomationPeer.CreatePeerForElement(scrollViewer);
			}
			
			return base.GetPattern(patternInterface);
		}
		
		internal void RaiseIsReadOnlyChanged(bool oldValue, bool newValue)
		{
			RaisePropertyChangedEvent(ValuePatternIdentifiers.IsReadOnlyProperty, Boxes.Box(oldValue), Boxes.Box(newValue));
		}
	}
}
lass="w"> --output_file=m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj: family/arm/m3/IntrinsicsSupport_asm.sv7M makefile @-$(call RM, $@) $(ASSEMBLE) --output_file=m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj: family/arm/m3/TaskSupport_asm.sv7M makefile @-$(call RM, $@) $(ASSEMBLE) --output_file=m3_TaskSupport_asm.obj BIOS.obj: BIOS.c family/arm/m3/Hwi.c family/arm/m3/TaskSupport.c knl/Clock.c knl/Idle.c knl/Intrinsics.c knl/Event.c knl/Mailbox.c knl/Queue.c knl/Semaphore.c knl/Swi.c knl/Swi_andn.c knl/Task.c hal/Hwi.c hal/Hwi_stack.c hal/Hwi_startup.c hal/Seconds.c family/arm/lm4/Seconds.c family/arm/lm4/TimestampProvider.c family/arm/lm4/Timer.c io/DEV.c io/GIO.c io/IOM_stub.c gates/GateHwi.c gates/GateMutex.c xdcruntime/SemThreadSupport.c heaps/HeapMem.c makefile @-$(call RM, $@) @echo clem4f $< ... @$(CC) $(BIOS_DEFS) $(XOPTS) $(INCS) \ $(BIOS_ROOT)BIOS.c \ $(BIOS_ROOT)family/arm/m3/Hwi.c \ $(BIOS_ROOT)family/arm/m3/TaskSupport.c \ $(BIOS_ROOT)knl/Clock.c \ $(BIOS_ROOT)knl/Idle.c \ $(BIOS_ROOT)knl/Intrinsics.c \ $(BIOS_ROOT)knl/Event.c \ $(BIOS_ROOT)knl/Mailbox.c \ $(BIOS_ROOT)knl/Queue.c \ $(BIOS_ROOT)knl/Semaphore.c \ $(BIOS_ROOT)knl/Swi.c \ $(BIOS_ROOT)knl/Swi_andn.c \ $(BIOS_ROOT)knl/Task.c \ $(BIOS_ROOT)hal/Hwi.c \ $(BIOS_ROOT)hal/Hwi_stack.c \ $(BIOS_ROOT)hal/Hwi_startup.c \ $(BIOS_ROOT)hal/Seconds.c \ $(BIOS_ROOT)family/arm/lm4/Seconds.c \ $(BIOS_ROOT)family/arm/lm4/TimestampProvider.c \ $(BIOS_ROOT)family/arm/lm4/Timer.c \ $(BIOS_ROOT)io/DEV.c \ $(BIOS_ROOT)io/GIO.c \ $(BIOS_ROOT)io/IOM_stub.c \ $(BIOS_ROOT)gates/GateHwi.c \ $(BIOS_ROOT)gates/GateMutex.c \ $(BIOS_ROOT)xdcruntime/SemThreadSupport.c \ $(BIOS_ROOT)heaps/HeapMem.c \ sysbios.aem4f: BIOS.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj @-$(call RM, $@) @echo arem4f $^ ... @$(AR) $@ $^ clean: @$(DEL) ..\makefile.libs @-$(call RM, *)