Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5053 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
31 changed files with 1743 additions and 558 deletions
@ -0,0 +1,33 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<topic id="5d1af8a2-fc1b-4a1b-b6c1-f33fb14bec1f" revisionNumber="1"> |
||||||
|
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> |
||||||
|
<!-- |
||||||
|
<summary> |
||||||
|
<para>Optional summary abstract</para> |
||||||
|
</summary> |
||||||
|
--> |
||||||
|
<introduction> |
||||||
|
<!-- Uncomment this to generate an outline of the section and sub-section |
||||||
|
titles. Specify a numeric value as the inner text to limit it to |
||||||
|
a specific number of sub-topics when creating the outline. Specify |
||||||
|
zero (0) to limit it to top-level sections only. --> |
||||||
|
<!-- <autoOutline /> --> |
||||||
|
<mediaLink><image xlink:href="NamespaceDependencies" placement="center"/></mediaLink> |
||||||
|
<para>As you can see in this dependency graph, AvalonEdit consists of a few |
||||||
|
sub-namespaces that have cleanly separated jobs. |
||||||
|
Most of the namespaces have a kind of 'main' class.</para> |
||||||
|
<para>Here is the visual tree of the TextEditor control:</para> |
||||||
|
<mediaLink><image xlink:href="VisualTree" placement="center"/></mediaLink> |
||||||
|
<para>It's important to understand that AvalonEdit is a composite control |
||||||
|
with the three layers: |
||||||
|
<codeEntityReference>T:ICSharpCode.AvalonEdit.TextEditor</codeEntityReference> (main control), |
||||||
|
<codeEntityReference>T:ICSharpCode.AvalonEdit.Editing.TextArea</codeEntityReference> (editing), |
||||||
|
<codeEntityReference>T:ICSharpCode.AvalonEdit.Rendering.TextView</codeEntityReference> (rendering). |
||||||
|
</para><para> |
||||||
|
While the main control provides some convenience methods for common tasks, |
||||||
|
for most advanced features you have to work directly with the inner controls. |
||||||
|
You can access them using <codeInline>textEditor.TextArea</codeInline> or |
||||||
|
<codeInline>textEditor.TextArea.TextView</codeInline>.</para> |
||||||
|
</introduction> |
||||||
|
</developerConceptualDocument> |
||||||
|
</topic> |
@ -0,0 +1,133 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<topic id="47c58b63-f30c-4290-a2f2-881d21227446" revisionNumber="1"> |
||||||
|
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> |
||||||
|
<introduction> |
||||||
|
<para> |
||||||
|
AvalonEdit comes with a code completion drop down window. |
||||||
|
You only have to handle the text entering events to determine |
||||||
|
when you want to show the window; all the UI is already done for you. |
||||||
|
</para> |
||||||
|
</introduction> |
||||||
|
<section> |
||||||
|
<title>Usage of the Code Completion Window</title> |
||||||
|
<content> |
||||||
|
<code language="cs"> |
||||||
|
// in the constructor: |
||||||
|
textEditor.TextArea.TextEntering += textEditor_TextArea_TextEntering; |
||||||
|
textEditor.TextArea.TextEntered += textEditor_TextArea_TextEntered; |
||||||
|
} |
||||||
|
|
||||||
|
CompletionWindow completionWindow; |
||||||
|
|
||||||
|
void textEditor_TextArea_TextEntered(object sender, TextCompositionEventArgs e) |
||||||
|
{ |
||||||
|
if (e.Text == ".") { |
||||||
|
// Open code completion after the user has pressed dot: |
||||||
|
completionWindow = new CompletionWindow(textEditor.TextArea); |
||||||
|
IList<ICompletionData> data = completionWindow.CompletionList.CompletionData; |
||||||
|
data.Add(new MyCompletionData("Item1")); |
||||||
|
data.Add(new MyCompletionData("Item2")); |
||||||
|
data.Add(new MyCompletionData("Item3")); |
||||||
|
completionWindow.Show(); |
||||||
|
completionWindow.Closed += delegate { |
||||||
|
completionWindow = null; |
||||||
|
}; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void textEditor_TextArea_TextEntering(object sender, TextCompositionEventArgs e) |
||||||
|
{ |
||||||
|
if (e.Text.Length > 0 && completionWindow != null) { |
||||||
|
if (!char.IsLetterOrDigit(e.Text[0])) { |
||||||
|
// Whenever a non-letter is typed while the completion window is open, |
||||||
|
// insert the currently selected element. |
||||||
|
completionWindow.CompletionList.RequestInsertion(e); |
||||||
|
} |
||||||
|
} |
||||||
|
// Do not set e.Handled=true. |
||||||
|
// We still want to insert the character that was typed. |
||||||
|
} |
||||||
|
</code> |
||||||
|
<para> |
||||||
|
This code will open the code completion window whenever '.' is pressed. |
||||||
|
By default, the |
||||||
|
<codeEntityReference>T:ICSharpCode.AvalonEdit.CodeCompletion.CompletionWindow</codeEntityReference> |
||||||
|
only handles key presses like Tab and Enter to insert the currently |
||||||
|
selected item. To also make it complete when keys like '.' or ';' are pressed, |
||||||
|
we attach another handler to the <codeInline>TextEntering</codeInline> event |
||||||
|
and tell the completion window to insert the selected item. |
||||||
|
</para> |
||||||
|
<para> |
||||||
|
The <codeInline>CompletionWindow</codeInline> will actually never have |
||||||
|
focus - instead, it hijacks |
||||||
|
the WPF keyboard input events on the text area and passes them through its |
||||||
|
<codeInline>ListBox</codeInline>. |
||||||
|
This allows selecting entries in the completion list using the |
||||||
|
keyboard and normal typing in the editor at the same time. |
||||||
|
</para> |
||||||
|
<para> |
||||||
|
Here is the implementation of the MyCompletionData class used in the code above: |
||||||
|
<code language="cs"> |
||||||
|
/// Implements AvalonEdit ICompletionData interface to provide the entries in the |
||||||
|
/// completion drop down. |
||||||
|
public class MyCompletionData : ICompletionData |
||||||
|
{ |
||||||
|
public MyCompletionData(string text) |
||||||
|
{ |
||||||
|
this.Text = text; |
||||||
|
} |
||||||
|
|
||||||
|
public System.Windows.Media.ImageSource Image { |
||||||
|
get { return null; } |
||||||
|
} |
||||||
|
|
||||||
|
public string Text { get; private set; } |
||||||
|
|
||||||
|
// Use this property if you want to show a fancy UIElement in the list. |
||||||
|
public object Content { |
||||||
|
get { return this.Text; } |
||||||
|
} |
||||||
|
|
||||||
|
public object Description { |
||||||
|
get { return "Description for " + this.Text; } |
||||||
|
} |
||||||
|
|
||||||
|
public void Complete(TextArea textArea, ISegment completionSegment, |
||||||
|
EventArgs insertionRequestEventArgs) |
||||||
|
{ |
||||||
|
textArea.Document.Replace(completionSegment, this.Text); |
||||||
|
} |
||||||
|
} |
||||||
|
</code> |
||||||
|
Both the content and the description shown may be any content acceptable in WPF, |
||||||
|
including custom UIElements. |
||||||
|
You may also implement custom logic in the <codeInline>Complete</codeInline> |
||||||
|
method if you want to do more than simply inserting the text. |
||||||
|
The <codeInline>insertionRequestEventArgs</codeInline> can help decide which |
||||||
|
kind of insertion the user wants - depending on how the insertion was triggered, |
||||||
|
it is an instance of <codeInline>TextCompositionEventArgs</codeInline>, |
||||||
|
<codeInline>KeyEventArgs</codeInline> or <codeInline>MouseEventArgs</codeInline>. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>Code Completion for C#</title> |
||||||
|
<content> |
||||||
|
<para> |
||||||
|
Full C# code completion is not in the scope of AvalonEdit. |
||||||
|
You will need a C# parser, a C# type system, and the ability |
||||||
|
to resolve C# expressions in your type system. |
||||||
|
</para> |
||||||
|
<para> |
||||||
|
If you want to learn how this is handled in SharpDevelop, please |
||||||
|
see: |
||||||
|
<externalLink> |
||||||
|
<linkText>Code Completion in SharpDevelop</linkText> |
||||||
|
<linkUri>http://wiki.sharpdevelop.net/CodeCompletion.ashx</linkUri> |
||||||
|
<linkTarget>_blank</linkTarget> |
||||||
|
</externalLink> |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
</developerConceptualDocument> |
||||||
|
</topic> |
@ -0,0 +1,175 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<topic id="5b1854b4-884c-4713-b921-b28e96a1b43e" revisionNumber="1"> |
||||||
|
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> |
||||||
|
<!-- |
||||||
|
<summary> |
||||||
|
<para>Optional summary abstract</para> |
||||||
|
</summary> |
||||||
|
--> |
||||||
|
<introduction> |
||||||
|
<!-- Uncomment this to generate an outline of the section and sub-section |
||||||
|
titles. Specify a numeric value as the inner text to limit it to |
||||||
|
a specific number of sub-topics when creating the outline. Specify |
||||||
|
zero (0) to limit it to top-level sections only. --> |
||||||
|
<!-- <autoOutline /> --> |
||||||
|
<para>The text editor makes use of several different coordinate systems. |
||||||
|
Here's an explanation of them.</para> |
||||||
|
</introduction> |
||||||
|
<!-- Add one or more top-level section elements. These are collapsible. |
||||||
|
If using <autoOutline /> tag, add an address attribute to identify |
||||||
|
it so that it can be jumped to with a hyperlink. --> |
||||||
|
<section> |
||||||
|
<title>Offset</title> |
||||||
|
<content> |
||||||
|
<para>In AvalonEdit, an index into the document is called an <newTerm>offset</newTerm>.</para> |
||||||
|
<para> |
||||||
|
Offsets usually represent the position between two characters. |
||||||
|
The first offset at the start of the document is 0; |
||||||
|
the offset after the first char in the document is 1. |
||||||
|
The last valid offset is <codeInline>document.TextLength</codeInline>, |
||||||
|
representing the end of the document. |
||||||
|
This is exactly the same as the <codeInline>index</codeInline> parameter |
||||||
|
used by methods in the .NET String or StringBuilder classes. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>TextLocation</title> |
||||||
|
<content> |
||||||
|
<para>The |
||||||
|
<codeEntityReference qualifyHint="true">T:ICSharpCode.AvalonEdit.Document.TextLocation</codeEntityReference> |
||||||
|
struct represents a Line/Column pair. Line and column are counted from 1.</para> |
||||||
|
<para>The document provides the methods |
||||||
|
<codeEntityReference qualifyHint="true">M:ICSharpCode.AvalonEdit.Document.TextDocument.GetLocation(System.Int32)</codeEntityReference> |
||||||
|
and |
||||||
|
<codeEntityReference qualifyHint="true">M:ICSharpCode.AvalonEdit.Document.TextDocument.GetOffset(ICSharpCode.AvalonEdit.Document.TextLocation)</codeEntityReference> |
||||||
|
to convert between offsets and <codeInline>TextLocation</codeInline>s.</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>TextAnchor</title> |
||||||
|
<content> |
||||||
|
<para>If you are working with the text editor, you will likely run into the problem |
||||||
|
that you need to store an offset, but want it to adjust automatically whenever |
||||||
|
text is inserted prior to that offset. </para> |
||||||
|
<para>Sure, you could listen to the TextDocument.Changed event and call |
||||||
|
GetNewOffset on the DocumentChangeEventArgs to translate the offset, |
||||||
|
but that gets tedious; especially when your object is short-lived and you |
||||||
|
have to deal with deregistering the event handler at the correct point of time.</para> |
||||||
|
<para>A text anchor object stores an Offset, but automatically |
||||||
|
updates the offset when text is inserted/removed before the offset. |
||||||
|
</para> |
||||||
|
<para> |
||||||
|
A much simpler solution is to use the |
||||||
|
<codeEntityReference qualifyHint="true">T:ICSharpCode.AvalonEdit.Document.TextAnchor</codeEntityReference> |
||||||
|
class. |
||||||
|
Please take a look at the documentation for that class for more details. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>RelativeTextOffset</title> |
||||||
|
<content> |
||||||
|
<para>An offset in the document, but relative to the start offset of a <codeEntityReference>T:ICSharpCode.AvalonEdit.Rendering.VisualLine</codeEntityReference>.</para> |
||||||
|
<para>Relative text offsets are used to store document offsets in visual lines.</para> |
||||||
|
<para>You can convert between relative text offsets and document offsets |
||||||
|
by adding/subtracting |
||||||
|
<codeEntityReference qualifyHint="true">P:ICSharpCode.AvalonEdit.Rendering.VisualLine.FirstDocumentLine</codeEntityReference>.<codeEntityReference>P:ICSharpCode.AvalonEdit.Document.DocumentLine.Offset</codeEntityReference>. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>VisualColumn</title> |
||||||
|
<content> |
||||||
|
<para>An integer value that specifies a position inside a VisualLine.</para> |
||||||
|
<para> |
||||||
|
Not only text has a length in the visual line, but also other VisualLineElements. |
||||||
|
VisualColumn is counting from 0 for each visual line. |
||||||
|
</para> |
||||||
|
<para>For example, tab markers take 2 visual columns (the marker and the tab space), |
||||||
|
newline markers take 1 visual column; folding markers take just 1 visual column |
||||||
|
even though they are longer in the document text.</para> |
||||||
|
<para>Use the |
||||||
|
<codeEntityReference qualifyHint="true">M:ICSharpCode.AvalonEdit.Rendering.VisualLine.GetVisualColumn(System.Int32)</codeEntityReference> |
||||||
|
and |
||||||
|
<codeEntityReference qualifyHint="true">M:ICSharpCode.AvalonEdit.Rendering.VisualLine.GetRelativeOffset(System.Int32)</codeEntityReference> |
||||||
|
methods to convert between |
||||||
|
visual columns and relative text offsets.</para> |
||||||
|
<alert class="note"> |
||||||
|
<para>Do not confuse VisualColumn with text columns. |
||||||
|
VisualColumn starts at 0, text column at 1. Text may have different length |
||||||
|
in the two coordinate systems (e.g. tab markers, foldings).</para> |
||||||
|
</alert> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>TextViewPosition</title> |
||||||
|
<content> |
||||||
|
<para>A Line,Column,VisualColumn triple.</para> |
||||||
|
<para>The <codeEntityReference qualifyHint="true">T:ICSharpCode.AvalonEdit.TextViewPosition</codeEntityReference> |
||||||
|
struct can be implicitly converted |
||||||
|
to <codeEntityReference qualifyHint="false">T:ICSharpCode.AvalonEdit.Document.TextLocation</codeEntityReference>, |
||||||
|
but has the additional VisualColumn information |
||||||
|
that is necessary to accurately hold the caret position when |
||||||
|
VisualLineElements with DocumentLength 0 are in use.</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>VisualTop</title> |
||||||
|
<content> |
||||||
|
<para>A double value that specifies the distance from the top of |
||||||
|
the document to the top of a line measured in device-independent pixels.</para> |
||||||
|
<para>VisualTop is equivalent to the Y component of a VisualPosition.</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>VisualPosition</title> |
||||||
|
<content> |
||||||
|
<para>A Point value (double X,Y) that specifies the position of an |
||||||
|
element from the top left document corner measured in device-independent pixels.</para> |
||||||
|
<para>To convert a VisualPosition to or from a (mouse) position inside |
||||||
|
the TextView, simply subtract or add |
||||||
|
<codeEntityReference qualifyHint="true">P:ICSharpCode.AvalonEdit.Rendering.TextView.ScrollOffset</codeEntityReference> |
||||||
|
to it. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<relatedTopics> |
||||||
|
<!-- One or more of the following: |
||||||
|
- A local link |
||||||
|
- An external link |
||||||
|
- A code entity reference |
||||||
|
|
||||||
|
<link xlink:href="Other Topic's ID"/> |
||||||
|
<link xlink:href="Other Topic's ID">Link inner text</link> |
||||||
|
|
||||||
|
<externalLink> |
||||||
|
<linkText>Link text</linkText> |
||||||
|
<linkAlternateText>Optional alternate link text</linkAlternateText> |
||||||
|
<linkUri>URI</linkUri> |
||||||
|
</externalLink> |
||||||
|
|
||||||
|
<codeEntityReference>API member ID</codeEntityReference> |
||||||
|
|
||||||
|
Examples: |
||||||
|
|
||||||
|
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8270" /> |
||||||
|
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link> |
||||||
|
|
||||||
|
<externalLink> |
||||||
|
<linkText>SHFB on CodePlex</linkText> |
||||||
|
<linkAlternateText>Go to CodePlex</linkAlternateText> |
||||||
|
<linkUri>http://www.codeplex.com/SHFB</linkUri> |
||||||
|
</externalLink> |
||||||
|
|
||||||
|
<codeEntityReference>T:TestDoc.TestClass</codeEntityReference> |
||||||
|
<codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference> |
||||||
|
--> |
||||||
|
</relatedTopics> |
||||||
|
</developerConceptualDocument> |
||||||
|
</topic> |
@ -0,0 +1,58 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<topic id="440df648-413e-4f42-a28b-6b2b0e9b1084" revisionNumber="1"> |
||||||
|
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> |
||||||
|
<introduction> |
||||||
|
<para> |
||||||
|
Introduction for 'Folding'. |
||||||
|
</para> |
||||||
|
</introduction> |
||||||
|
<section> |
||||||
|
<title>How to use Folding in your application</title> |
||||||
|
<content> |
||||||
|
<para> |
||||||
|
Folding (code collapsing) is implemented as an extension to the editor. |
||||||
|
It could have been implemented in a separate assembly without having to |
||||||
|
modify the AvalonEdit code. |
||||||
|
A <codeEntityReference>T:ICSharpCode.AvalonEdit.Rendering.VisualLineElementGenerator</codeEntityReference> |
||||||
|
takes care of the collapsed sections in the text document; and a custom |
||||||
|
margin draws the plus and minus buttons. |
||||||
|
</para> |
||||||
|
<para>You could use the relevant classes separately; |
||||||
|
but, to make it a bit easier to use, the static |
||||||
|
<codeEntityReference qualifyHint="true">M:ICSharpCode.AvalonEdit.Folding.FoldingManager.Install</codeEntityReference> |
||||||
|
method will create and register the necessary parts automatically.</para> |
||||||
|
<para>All that's left for you is to regularly call |
||||||
|
<codeEntityReference qualifyHint="true">M:ICSharpCode.AvalonEdit.Folding.FoldingManager.UpdateFoldings</codeEntityReference> |
||||||
|
with the list of foldings you want to provide. |
||||||
|
You could calculate that list yourself, or you could use a built-in |
||||||
|
folding strategy to do it for you.</para> |
||||||
|
<para>Here is the full code required to enable folding: |
||||||
|
<code language="cs">foldingManager = FoldingManager.Install(textEditor.TextArea); |
||||||
|
foldingStrategy = new XmlFoldingStrategy(); |
||||||
|
foldingStrategy.UpdateFoldings(foldingManager, textEditor.Document);</code> |
||||||
|
If you want the folding markers to update when the text is changed, |
||||||
|
you have to repeat the <codeInline>foldingStrategy.UpdateFoldings</codeInline> call regularly. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>How the FoldingManager works</title> |
||||||
|
<content> |
||||||
|
<para> |
||||||
|
The FoldingManager maintains a list of foldings. The FoldMargin displays those foldings and provides |
||||||
|
the UI for collapsing/expanding. |
||||||
|
Folded foldings cause the FoldingElementGenerator to produce a line element that spans the whole folded |
||||||
|
text section, causing the text generation for the visual line that contains the folding start to |
||||||
|
continue after the folding end in another line. |
||||||
|
To ensure scrolling works correctly in the presence of foldings, lines inside folded regions must not |
||||||
|
be used as start lines for the visual line generation. This is done by setting the line height of all |
||||||
|
such lines to 0. To efficiently set the height on a large number of lines and support reverting to the |
||||||
|
old height when the folding is uncollapsed, a CollapsedLineSection is used. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<relatedTopics> |
||||||
|
<codeEntityReference>T:ICSharpCode.AvalonEdit.Folding.FoldingManager</codeEntityReference> |
||||||
|
</relatedTopics> |
||||||
|
</developerConceptualDocument> |
||||||
|
</topic> |
@ -0,0 +1,12 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<Topics defaultTopic="c52241ea-3eba-4ddf-b463-6349cbff38fd"> |
||||||
|
<Topic id="c52241ea-3eba-4ddf-b463-6349cbff38fd" visible="True" /> |
||||||
|
<Topic id="e41769b2-38f7-4605-b1d8-9cd22a50a685" visible="True" /> |
||||||
|
<Topic id="70c4df51-5ecb-4e24-a574-8c5a84306bd1" visible="True" /> |
||||||
|
<Topic id="5d1af8a2-fc1b-4a1b-b6c1-f33fb14bec1f" visible="True" /> |
||||||
|
<Topic id="5b1854b4-884c-4713-b921-b28e96a1b43e" visible="True" /> |
||||||
|
<Topic id="c06e9832-9ef0-4d65-ac2e-11f7ce9c7774" visible="True" /> |
||||||
|
<Topic id="4d4ceb51-154d-43f0-b876-ad9640c5d2d8" visible="True" /> |
||||||
|
<Topic id="440df648-413e-4f42-a28b-6b2b0e9b1084" visible="True" /> |
||||||
|
<Topic id="47c58b63-f30c-4290-a2f2-881d21227446" visible="True" /> |
||||||
|
</Topics> |
@ -0,0 +1,165 @@ |
|||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> |
||||||
|
<PropertyGroup> |
||||||
|
<!-- The configuration and platform will be used to determine which |
||||||
|
assemblies to include from solution and project documentation |
||||||
|
sources --> |
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||||
|
<SchemaVersion>2.0</SchemaVersion> |
||||||
|
<ProjectGuid>{850b6602-0a7f-413a-864a-e816b98d7407}</ProjectGuid> |
||||||
|
<SHFBSchemaVersion>1.8.0.0</SHFBSchemaVersion> |
||||||
|
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual |
||||||
|
Studio adds them anyway --> |
||||||
|
<AssemblyName>Documentation</AssemblyName> |
||||||
|
<RootNamespace>Documentation</RootNamespace> |
||||||
|
<Name>Documentation</Name> |
||||||
|
<!-- SHFB properties --> |
||||||
|
<OutputPath>.\Help\</OutputPath> |
||||||
|
<HtmlHelpName>AvalonEdit Documentation</HtmlHelpName> |
||||||
|
<ProjectSummary> |
||||||
|
</ProjectSummary> |
||||||
|
<MissingTags>Summary, AutoDocumentCtors, Namespace</MissingTags> |
||||||
|
<VisibleItems>InheritedMembers, InheritedFrameworkMembers, Protected, ProtectedInternalAsProtected</VisibleItems> |
||||||
|
<HtmlHelp1xCompilerPath> |
||||||
|
</HtmlHelp1xCompilerPath> |
||||||
|
<HtmlHelp2xCompilerPath> |
||||||
|
</HtmlHelp2xCompilerPath> |
||||||
|
<SandcastlePath> |
||||||
|
</SandcastlePath> |
||||||
|
<WorkingPath> |
||||||
|
</WorkingPath> |
||||||
|
<BuildLogFile> |
||||||
|
</BuildLogFile> |
||||||
|
<FrameworkVersion>3.5</FrameworkVersion> |
||||||
|
<HelpTitle>AvalonEdit</HelpTitle> |
||||||
|
<CopyrightText>Copyright 2008-2009, Daniel Grunwald</CopyrightText> |
||||||
|
<PresentationStyle>Prototype</PresentationStyle> |
||||||
|
<HelpFileVersion>4.0.0.0</HelpFileVersion> |
||||||
|
<ComponentConfigurations> |
||||||
|
<ComponentConfig id="Cached Reflection Index Data" enabled="True"> |
||||||
|
<component id="Cached Reflection Index Data" type="SandcastleBuilder.Components.CachedCopyFromIndexComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll"> |
||||||
|
<index name="reflection" value="/reflection/apis/api" key="@id" cache="10"> |
||||||
|
<cache base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" cacheFile="{@AppDataFolder}Cache\Reflection.cache" /> |
||||||
|
<data files="reflection.xml" /> |
||||||
|
</index> |
||||||
|
<copy name="reflection" source="*" target="/document/reference" /> |
||||||
|
</component> |
||||||
|
</ComponentConfig> |
||||||
|
<ComponentConfig id="Cached MSDN URL References" enabled="True"><component id="Cached MSDN URL References" type="SandcastleBuilder.Components.CachedResolveReferenceLinksComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll"><cache filename="{@AppDataFolder}Cache\MsdnUrl.cache" /><targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" type="{@SDKLinks}" /><targets files="reflection.xml" type="{@ProjectLinks}" /></component></ComponentConfig> |
||||||
|
<ComponentConfig id="IntelliSense Component" enabled="True"><component id="IntelliSense Component" type="SandcastleBuilder.Components.IntelliSenseComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll"><!-- Output options (optional) |
||||||
|
Attributes: |
||||||
|
Include Namespaces (false by default) |
||||||
|
Namespaces filename ("Namespaces" if not specified or empty) |
||||||
|
Directory (current folder if not specified or empty) --><output includeNamespaces="false" namespacesFile="Namespaces" folder="{@OutputFolder}" /></component></ComponentConfig> |
||||||
|
<ComponentConfig id="Cached Framework Comments Index Data" enabled="True"><component id="Cached Framework Comments Index Data" type="SandcastleBuilder.Components.CachedCopyFromIndexComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll"><index name="comments" value="/doc/members/member" key="@name" cache="100"> |
||||||
|
{@CachedFrameworkCommentList} |
||||||
|
{@CommentFileList} |
||||||
|
</index><copy name="comments" source="*" target="/document/comments" /></component></ComponentConfig> |
||||||
|
<ComponentConfig id="Code Block Component" enabled="True"><component id="Code Block Component" type="SandcastleBuilder.Components.CodeBlockComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll"> |
||||||
|
<!-- Base path for relative filenames in source attributes |
||||||
|
(optional) --> |
||||||
|
<basePath value="{@HtmlEncProjectFolder}" /> |
||||||
|
<!-- Connect to language filter (optional). If omitted, |
||||||
|
language filtering is enabled by default. --> |
||||||
|
<languageFilter value="true" /> |
||||||
|
<!-- Allow missing source files (Optional). If omitted, |
||||||
|
it will generate errors if referenced source files |
||||||
|
are missing. --> |
||||||
|
<allowMissingSource value="false" /> |
||||||
|
<!-- Remove region markers from imported code blocks. If omitted, |
||||||
|
region markers in imported code blocks are left alone. --> |
||||||
|
<removeRegionMarkers value="false" /> |
||||||
|
<!-- Code colorizer options (required). |
||||||
|
Attributes: |
||||||
|
Language syntax configuration file (required) |
||||||
|
XSLT style file (required) |
||||||
|
"Copy" image file URL (required) |
||||||
|
Default language (optional) |
||||||
|
Enable line numbering (optional) |
||||||
|
Enable outlining (optional) |
||||||
|
Keep XML comment "see" tags within the code (optional) |
||||||
|
Tab size override (optional, 0 = Use syntax file setting) |
||||||
|
Use language name as default title (optional) --> |
||||||
|
<colorizer syntaxFile="{@SHFBFolder}Colorizer\highlight.xml" styleFile="{@SHFBFolder}Colorizer\highlight.xsl" copyImageUrl="../icons/CopyCode.gif" language="cs" numberLines="false" outlining="false" keepSeeTags="false" tabSize="0" defaultTitle="true" /> |
||||||
|
</component></ComponentConfig> |
||||||
|
<ComponentConfig id="Post-transform Component" enabled="True"><component id="Post-transform Component" type="SandcastleBuilder.Components.PostTransformComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll"> |
||||||
|
<!-- Code colorizer files (required). |
||||||
|
Attributes: |
||||||
|
Stylesheet file (required) |
||||||
|
Script file (required) |
||||||
|
"Copy" image file (required) --> |
||||||
|
<colorizer stylesheet="{@SHFBFolder}Colorizer\highlight.css" scriptFile="{@SHFBFolder}Colorizer\highlight.js" copyImage="{@SHFBFolder}Colorizer\CopyCode.gif" /> |
||||||
|
<!-- Base output path for the files (required). This should match |
||||||
|
the parent folder of the output path of the HTML files (see |
||||||
|
SaveComponent). --> |
||||||
|
<outputPath value="Output\" /> |
||||||
|
<!-- Logo image file (optional). Filename is required. The height, |
||||||
|
width, altText, placement, and alignment attributes are |
||||||
|
optional. --> |
||||||
|
<logoFile filename="" height="0" width="0" altText="" placement="left" alignment="left" /> |
||||||
|
</component></ComponentConfig></ComponentConfigurations> |
||||||
|
<DocumentationSources> |
||||||
|
<DocumentationSource sourceFile="..\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj" /> |
||||||
|
</DocumentationSources> |
||||||
|
<NamespaceSummaries> |
||||||
|
<NamespaceSummaryItem name="(global)" isDocumented="False" /> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit" isDocumented="True">This is the main AvalonEdit namespace.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.CodeCompletion" isDocumented="True">This namespace contains classes to show the code completion window.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Document" isDocumented="True">This namespace contains the document model. |
||||||
|
The most important class here is TextDocument, which represents document that can be displayed and edited in the text editor.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Editing" isDocumented="True">This namespace is the home of the TextArea class. It manages user input and handles the caret and the selection.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Folding" isDocumented="True">This namespace contains the folding (code collapsing) implementation.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Highlighting" isDocumented="True">This namespace contains the engine for highlighting text documents (DocumentHighlighter). |
||||||
|
Additionally, the class HighlightingColorizer provides integration of the highlighting engine into the text editor GUI.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Highlighting.Xshd" isDocumented="True">This namespace contains a document model for syntax highlighting definitions (.xshd files).</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Indentation" isDocumented="True">This namespace contains the logic for automatic indentation.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Rendering" isDocumented="True">This namespace contains the text rendering infrastructure.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Utils" isDocumented="True">This namespace contains various utility classes.</NamespaceSummaryItem> |
||||||
|
<NamespaceSummaryItem name="XamlGeneratedNamespace" isDocumented="False" /> |
||||||
|
<NamespaceSummaryItem name="ICSharpCode.AvalonEdit.Xml" isDocumented="True">This namespace contains an error-tolerant XML parser with support for incremental parsing, only reparsing the changed regions of a TextDocument.</NamespaceSummaryItem> |
||||||
|
</NamespaceSummaries> |
||||||
|
<CleanIntermediates>True</CleanIntermediates> |
||||||
|
<SyntaxFilters>Standard</SyntaxFilters> |
||||||
|
</PropertyGroup> |
||||||
|
<!-- There are no properties for these two groups but they need to appear in |
||||||
|
order for Visual Studio to perform the build. --> |
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
||||||
|
</PropertyGroup> |
||||||
|
<ItemGroup> |
||||||
|
<None Include="Coordinate Systems.aml" /> |
||||||
|
<None Include="Architecture.aml" /> |
||||||
|
<None Include="Code Completion.aml" /> |
||||||
|
<None Include="Sample Application.aml" /> |
||||||
|
<None Include="Folding.aml" /> |
||||||
|
<None Include="Syntax Highlighting.aml" /> |
||||||
|
<None Include="Text Rendering.aml" /> |
||||||
|
<None Include="Welcome.aml" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ContentLayout Include="ICSharpCode.AvalonEdit.content" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Image Include="Media\WelcomeScreenshot.png"> |
||||||
|
<ImageId>WelcomeScreenshot</ImageId> |
||||||
|
</Image> |
||||||
|
<Image Include="Media\VisualTree.png"> |
||||||
|
<ImageId>VisualTree</ImageId> |
||||||
|
<AlternateText>Visual Tree</AlternateText> |
||||||
|
</Image> |
||||||
|
<Image Include="Media\RenderingPipeline.png"> |
||||||
|
<ImageId>RenderingPipeline</ImageId> |
||||||
|
</Image> |
||||||
|
<Image Include="Media\NamespaceDependencies.png"> |
||||||
|
<ImageId>NamespaceDependencies</ImageId> |
||||||
|
<AlternateText>Namespace Dependency Graph</AlternateText> |
||||||
|
</Image> |
||||||
|
<Content Include="License.html" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Folder Include="Media\" /> |
||||||
|
</ItemGroup> |
||||||
|
<!-- Import the SHFB build targets --> |
||||||
|
<Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets" /> |
||||||
|
</Project> |
@ -0,0 +1,566 @@ |
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||||
|
<head> |
||||||
|
<title>License</title> |
||||||
|
<meta name="id" content="e41769b2-38f7-4605-b1d8-9cd22a50a685"> |
||||||
|
<meta name="revisionNumber" content="1"></meta> |
||||||
|
<link rel="stylesheet" type="text/css" href="../styles/presentation.css" /> |
||||||
|
</head> |
||||||
|
|
||||||
|
<body> |
||||||
|
|
||||||
|
<h3>GNU LESSER GENERAL PUBLIC LICENSE</h3> |
||||||
|
<p> |
||||||
|
Version 2.1, February 1999 |
||||||
|
</p> |
||||||
|
|
||||||
|
<pre>Copyright (C) 1991, 1999 Free Software Foundation, Inc. |
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||||
|
Everyone is permitted to copy and distribute verbatim copies |
||||||
|
of this license document, but changing it is not allowed. |
||||||
|
|
||||||
|
[This is the first released version of the Lesser GPL. It also counts |
||||||
|
as the successor of the GNU Library Public License, version 2, hence |
||||||
|
the version number 2.1.] |
||||||
|
</pre> |
||||||
|
|
||||||
|
|
||||||
|
<h3>Preamble</h3> |
||||||
|
|
||||||
|
<p> |
||||||
|
The licenses for most software are designed to take away your |
||||||
|
freedom to share and change it. By contrast, the GNU General Public |
||||||
|
Licenses are intended to guarantee your freedom to share and change |
||||||
|
free software--to make sure the software is free for all its users. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
This license, the Lesser General Public License, applies to some |
||||||
|
specially designated software packages--typically libraries--of the |
||||||
|
Free Software Foundation and other authors who decide to use it. You |
||||||
|
can use it too, but we suggest you first think carefully about whether |
||||||
|
this license or the ordinary General Public License is the better |
||||||
|
strategy to use in any particular case, based on the explanations below. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
When we speak of free software, we are referring to freedom of use, |
||||||
|
not price. Our General Public Licenses are designed to make sure that |
||||||
|
you have the freedom to distribute copies of free software (and charge |
||||||
|
for this service if you wish); that you receive source code or can get |
||||||
|
it if you want it; that you can change the software and use pieces of |
||||||
|
it in new free programs; and that you are informed that you can do |
||||||
|
these things. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
To protect your rights, we need to make restrictions that forbid |
||||||
|
distributors to deny you these rights or to ask you to surrender these |
||||||
|
rights. These restrictions translate to certain responsibilities for |
||||||
|
you if you distribute copies of the library or if you modify it. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
For example, if you distribute copies of the library, whether gratis |
||||||
|
or for a fee, you must give the recipients all the rights that we gave |
||||||
|
you. You must make sure that they, too, receive or can get the source |
||||||
|
code. If you link other code with the library, you must provide |
||||||
|
complete object files to the recipients, so that they can relink them |
||||||
|
with the library after making changes to the library and recompiling |
||||||
|
it. And you must show them these terms so they know their rights. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
We protect your rights with a two-step method: (1) we copyright the |
||||||
|
library, and (2) we offer you this license, which gives you legal |
||||||
|
permission to copy, distribute and/or modify the library. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
To protect each distributor, we want to make it very clear that |
||||||
|
there is no warranty for the free library. Also, if the library is |
||||||
|
modified by someone else and passed on, the recipients should know |
||||||
|
that what they have is not the original version, so that the original |
||||||
|
author's reputation will not be affected by problems that might be |
||||||
|
introduced by others. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
Finally, software patents pose a constant threat to the existence of |
||||||
|
any free program. We wish to make sure that a company cannot |
||||||
|
effectively restrict the users of a free program by obtaining a |
||||||
|
restrictive license from a patent holder. Therefore, we insist that |
||||||
|
any patent license obtained for a version of the library must be |
||||||
|
consistent with the full freedom of use specified in this license. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
Most GNU software, including some libraries, is covered by the |
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser |
||||||
|
General Public License, applies to certain designated libraries, and |
||||||
|
is quite different from the ordinary General Public License. We use |
||||||
|
this license for certain libraries in order to permit linking those |
||||||
|
libraries into non-free programs. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
When a program is linked with a library, whether statically or using |
||||||
|
a shared library, the combination of the two is legally speaking a |
||||||
|
combined work, a derivative of the original library. The ordinary |
||||||
|
General Public License therefore permits such linking only if the |
||||||
|
entire combination fits its criteria of freedom. The Lesser General |
||||||
|
Public License permits more lax criteria for linking other code with |
||||||
|
the library. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
We call this license the "Lesser" General Public License because it |
||||||
|
does Less to protect the user's freedom than the ordinary General |
||||||
|
Public License. It also provides other free software developers Less |
||||||
|
of an advantage over competing non-free programs. These disadvantages |
||||||
|
are the reason we use the ordinary General Public License for many |
||||||
|
libraries. However, the Lesser license provides advantages in certain |
||||||
|
special circumstances. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
For example, on rare occasions, there may be a special need to |
||||||
|
encourage the widest possible use of a certain library, so that it becomes |
||||||
|
a de-facto standard. To achieve this, non-free programs must be |
||||||
|
allowed to use the library. A more frequent case is that a free |
||||||
|
library does the same job as widely used non-free libraries. In this |
||||||
|
case, there is little to gain by limiting the free library to free |
||||||
|
software only, so we use the Lesser General Public License. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
In other cases, permission to use a particular library in non-free |
||||||
|
programs enables a greater number of people to use a large body of |
||||||
|
free software. For example, permission to use the GNU C Library in |
||||||
|
non-free programs enables many more people to use the whole GNU |
||||||
|
operating system, as well as its variant, the GNU/Linux operating |
||||||
|
system. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
Although the Lesser General Public License is Less protective of the |
||||||
|
users' freedom, it does ensure that the user of a program that is |
||||||
|
linked with the Library has the freedom and the wherewithal to run |
||||||
|
that program using a modified version of the Library. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
The precise terms and conditions for copying, distribution and |
||||||
|
modification follow. Pay close attention to the difference between a |
||||||
|
"work based on the library" and a "work that uses the library". The |
||||||
|
former contains code derived from the library, whereas the latter must |
||||||
|
be combined with the library in order to run. |
||||||
|
</p> |
||||||
|
|
||||||
|
<h3>TERMS AND CONDITIONS FOR COPYING, |
||||||
|
DISTRIBUTION AND MODIFICATION</h3> |
||||||
|
|
||||||
|
|
||||||
|
<p> |
||||||
|
<strong>0.</strong> |
||||||
|
This License Agreement applies to any software library or other |
||||||
|
program which contains a notice placed by the copyright holder or |
||||||
|
other authorized party saying it may be distributed under the terms of |
||||||
|
this Lesser General Public License (also called "this License"). |
||||||
|
Each licensee is addressed as "you". |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
A "library" means a collection of software functions and/or data |
||||||
|
prepared so as to be conveniently linked with application programs |
||||||
|
(which use some of those functions and data) to form executables. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
The "Library", below, refers to any such software library or work |
||||||
|
which has been distributed under these terms. A "work based on the |
||||||
|
Library" means either the Library or any derivative work under |
||||||
|
copyright law: that is to say, a work containing the Library or a |
||||||
|
portion of it, either verbatim or with modifications and/or translated |
||||||
|
straightforwardly into another language. (Hereinafter, translation is |
||||||
|
included without limitation in the term "modification".) |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
"Source code" for a work means the preferred form of the work for |
||||||
|
making modifications to it. For a library, complete source code means |
||||||
|
all the source code for all modules it contains, plus any associated |
||||||
|
interface definition files, plus the scripts used to control compilation |
||||||
|
and installation of the library. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
Activities other than copying, distribution and modification are not |
||||||
|
covered by this License; they are outside its scope. The act of |
||||||
|
running a program using the Library is not restricted, and output from |
||||||
|
such a program is covered only if its contents constitute a work based |
||||||
|
on the Library (independent of the use of the Library in a tool for |
||||||
|
writing it). Whether that is true depends on what the Library does |
||||||
|
and what the program that uses the Library does. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>1.</strong> |
||||||
|
You may copy and distribute verbatim copies of the Library's |
||||||
|
complete source code as you receive it, in any medium, provided that |
||||||
|
you conspicuously and appropriately publish on each copy an |
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact |
||||||
|
all the notices that refer to this License and to the absence of any |
||||||
|
warranty; and distribute a copy of this License along with the |
||||||
|
Library. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
You may charge a fee for the physical act of transferring a copy, |
||||||
|
and you may at your option offer warranty protection in exchange for a |
||||||
|
fee. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>2.</strong> |
||||||
|
You may modify your copy or copies of the Library or any portion |
||||||
|
of it, thus forming a work based on the Library, and copy and |
||||||
|
distribute such modifications or work under the terms of Section 1 |
||||||
|
above, provided that you also meet all of these conditions: |
||||||
|
</p> |
||||||
|
|
||||||
|
<ul> |
||||||
|
<li><strong>a)</strong> |
||||||
|
The modified work must itself be a software library.</li> |
||||||
|
<li><strong>b)</strong> |
||||||
|
You must cause the files modified to carry prominent notices |
||||||
|
stating that you changed the files and the date of any change.</li> |
||||||
|
|
||||||
|
<li><strong>c)</strong> |
||||||
|
You must cause the whole of the work to be licensed at no |
||||||
|
charge to all third parties under the terms of this License.</li> |
||||||
|
|
||||||
|
<li><strong>d)</strong> |
||||||
|
If a facility in the modified Library refers to a function or a |
||||||
|
table of data to be supplied by an application program that uses |
||||||
|
the facility, other than as an argument passed when the facility |
||||||
|
is invoked, then you must make a good faith effort to ensure that, |
||||||
|
in the event an application does not supply such function or |
||||||
|
table, the facility still operates, and performs whatever part of |
||||||
|
its purpose remains meaningful. |
||||||
|
<p> |
||||||
|
(For example, a function in a library to compute square roots has |
||||||
|
a purpose that is entirely well-defined independent of the |
||||||
|
application. Therefore, Subsection 2d requires that any |
||||||
|
application-supplied function or table used by this function must |
||||||
|
be optional: if the application does not supply it, the square |
||||||
|
root function must still compute square roots.)</p></li> |
||||||
|
</ul> |
||||||
|
|
||||||
|
<p> |
||||||
|
These requirements apply to the modified work as a whole. If identifiable |
||||||
|
sections of that work are not derived from the Library, and can be |
||||||
|
reasonably considered independent and separate works in themselves, then |
||||||
|
this License, and its terms, do not apply to those sections when you |
||||||
|
distribute them as separate works. But when you distribute the same |
||||||
|
sections as part of a whole which is a work based on the Library, the |
||||||
|
distribution of the whole must be on the terms of this License, whose |
||||||
|
permissions for other licensees extend to the entire whole, and thus to |
||||||
|
each and every part regardless of who wrote it. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
Thus, it is not the intent of this section to claim rights or contest your |
||||||
|
rights to work written entirely by you; rather, the intent is to exercise |
||||||
|
the right to control the distribution of derivative or collective works |
||||||
|
based on the Library. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
In addition, mere aggregation of another work not based on the Library with |
||||||
|
the Library (or with a work based on the Library) on a volume of a storage |
||||||
|
or distribution medium does not bring the other work under the scope of |
||||||
|
this License. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>3.</strong> |
||||||
|
You may opt to apply the terms of the ordinary GNU General Public |
||||||
|
License instead of this License to a given copy of the Library. To do |
||||||
|
this, you must alter all the notices that refer to this License, so |
||||||
|
that they refer to the ordinary GNU General Public License, version 2, |
||||||
|
instead of to this License. (If a newer version than version 2 of the |
||||||
|
ordinary GNU General Public License has appeared, then you can specify |
||||||
|
that version instead if you wish.) Do not make any other change in |
||||||
|
these notices. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
Once this change is made in a given copy, it is irreversible for |
||||||
|
that copy, so the ordinary GNU General Public License applies to all |
||||||
|
subsequent copies and derivative works made from that copy. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
This option is useful when you wish to copy part of the code of |
||||||
|
the Library into a program that is not a library. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>4.</strong> |
||||||
|
You may copy and distribute the Library (or a portion or |
||||||
|
derivative of it, under Section 2) in object code or executable form |
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany |
||||||
|
it with the complete corresponding machine-readable source code, which |
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a |
||||||
|
medium customarily used for software interchange. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
If distribution of object code is made by offering access to copy |
||||||
|
from a designated place, then offering equivalent access to copy the |
||||||
|
source code from the same place satisfies the requirement to |
||||||
|
distribute the source code, even though third parties are not |
||||||
|
compelled to copy the source along with the object code. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>5.</strong> |
||||||
|
A program that contains no derivative of any portion of the |
||||||
|
Library, but is designed to work with the Library by being compiled or |
||||||
|
linked with it, is called a "work that uses the Library". Such a |
||||||
|
work, in isolation, is not a derivative work of the Library, and |
||||||
|
therefore falls outside the scope of this License. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
However, linking a "work that uses the Library" with the Library |
||||||
|
creates an executable that is a derivative of the Library (because it |
||||||
|
contains portions of the Library), rather than a "work that uses the |
||||||
|
library". The executable is therefore covered by this License. |
||||||
|
Section 6 states terms for distribution of such executables. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
When a "work that uses the Library" uses material from a header file |
||||||
|
that is part of the Library, the object code for the work may be a |
||||||
|
derivative work of the Library even though the source code is not. |
||||||
|
Whether this is true is especially significant if the work can be |
||||||
|
linked without the Library, or if the work is itself a library. The |
||||||
|
threshold for this to be true is not precisely defined by law. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
If such an object file uses only numerical parameters, data |
||||||
|
structure layouts and accessors, and small macros and small inline |
||||||
|
functions (ten lines or less in length), then the use of the object |
||||||
|
file is unrestricted, regardless of whether it is legally a derivative |
||||||
|
work. (Executables containing this object code plus portions of the |
||||||
|
Library will still fall under Section 6.) |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
Otherwise, if the work is a derivative of the Library, you may |
||||||
|
distribute the object code for the work under the terms of Section 6. |
||||||
|
Any executables containing that work also fall under Section 6, |
||||||
|
whether or not they are linked directly with the Library itself. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>6.</strong> |
||||||
|
As an exception to the Sections above, you may also combine or |
||||||
|
link a "work that uses the Library" with the Library to produce a |
||||||
|
work containing portions of the Library, and distribute that work |
||||||
|
under terms of your choice, provided that the terms permit |
||||||
|
modification of the work for the customer's own use and reverse |
||||||
|
engineering for debugging such modifications. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
You must give prominent notice with each copy of the work that the |
||||||
|
Library is used in it and that the Library and its use are covered by |
||||||
|
this License. You must supply a copy of this License. If the work |
||||||
|
during execution displays copyright notices, you must include the |
||||||
|
copyright notice for the Library among them, as well as a reference |
||||||
|
directing the user to the copy of this License. Also, you must do one |
||||||
|
of these things: |
||||||
|
</p> |
||||||
|
|
||||||
|
<ul> |
||||||
|
<li><strong>a)</strong> Accompany the work with the complete |
||||||
|
corresponding machine-readable source code for the Library |
||||||
|
including whatever changes were used in the work (which must be |
||||||
|
distributed under Sections 1 and 2 above); and, if the work is an |
||||||
|
executable linked with the Library, with the complete |
||||||
|
machine-readable "work that uses the Library", as object code |
||||||
|
and/or source code, so that the user can modify the Library and |
||||||
|
then relink to produce a modified executable containing the |
||||||
|
modified Library. (It is understood that the user who changes the |
||||||
|
contents of definitions files in the Library will not necessarily |
||||||
|
be able to recompile the application to use the modified |
||||||
|
definitions.)</li> |
||||||
|
|
||||||
|
<li><strong>b)</strong> Use a suitable shared library mechanism |
||||||
|
for linking with the Library. A suitable mechanism is one that |
||||||
|
(1) uses at run time a copy of the library already present on the |
||||||
|
user's computer system, rather than copying library functions into |
||||||
|
the executable, and (2) will operate properly with a modified |
||||||
|
version of the library, if the user installs one, as long as the |
||||||
|
modified version is interface-compatible with the version that the |
||||||
|
work was made with.</li> |
||||||
|
|
||||||
|
<li><strong>c)</strong> Accompany the work with a written offer, |
||||||
|
valid for at least three years, to give the same user the |
||||||
|
materials specified in Subsection 6a, above, for a charge no more |
||||||
|
than the cost of performing this distribution.</li> |
||||||
|
|
||||||
|
<li><strong>d)</strong> If distribution of the work is made by |
||||||
|
offering access to copy from a designated place, offer equivalent |
||||||
|
access to copy the above specified materials from the same |
||||||
|
place.</li> |
||||||
|
|
||||||
|
<li><strong>e)</strong> Verify that the user has already received |
||||||
|
a copy of these materials or that you have already sent this user |
||||||
|
a copy.</li> |
||||||
|
</ul> |
||||||
|
|
||||||
|
<p> |
||||||
|
For an executable, the required form of the "work that uses the |
||||||
|
Library" must include any data and utility programs needed for |
||||||
|
reproducing the executable from it. However, as a special exception, |
||||||
|
the materials to be distributed need not include anything that is |
||||||
|
normally distributed (in either source or binary form) with the major |
||||||
|
components (compiler, kernel, and so on) of the operating system on |
||||||
|
which the executable runs, unless that component itself accompanies |
||||||
|
the executable. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
It may happen that this requirement contradicts the license |
||||||
|
restrictions of other proprietary libraries that do not normally |
||||||
|
accompany the operating system. Such a contradiction means you cannot |
||||||
|
use both them and the Library together in an executable that you |
||||||
|
distribute. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>7.</strong> You may place library facilities that are a work |
||||||
|
based on the Library side-by-side in a single library together with |
||||||
|
other library facilities not covered by this License, and distribute |
||||||
|
such a combined library, provided that the separate distribution of |
||||||
|
the work based on the Library and of the other library facilities is |
||||||
|
otherwise permitted, and provided that you do these two things: |
||||||
|
</p> |
||||||
|
|
||||||
|
<ul> |
||||||
|
<li><strong>a)</strong> Accompany the combined library with a copy |
||||||
|
of the same work based on the Library, uncombined with any other |
||||||
|
library facilities. This must be distributed under the terms of |
||||||
|
the Sections above.</li> |
||||||
|
|
||||||
|
<li><strong>b)</strong> Give prominent notice with the combined |
||||||
|
library of the fact that part of it is a work based on the |
||||||
|
Library, and explaining where to find the accompanying uncombined |
||||||
|
form of the same work.</li> |
||||||
|
</ul> |
||||||
|
|
||||||
|
<p> |
||||||
|
<strong>8.</strong> You may not copy, modify, sublicense, link with, |
||||||
|
or distribute the Library except as expressly provided under this |
||||||
|
License. Any attempt otherwise to copy, modify, sublicense, link |
||||||
|
with, or distribute the Library is void, and will automatically |
||||||
|
terminate your rights under this License. However, parties who have |
||||||
|
received copies, or rights, from you under this License will not have |
||||||
|
their licenses terminated so long as such parties remain in full |
||||||
|
compliance. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>9.</strong> |
||||||
|
You are not required to accept this License, since you have not |
||||||
|
signed it. However, nothing else grants you permission to modify or |
||||||
|
distribute the Library or its derivative works. These actions are |
||||||
|
prohibited by law if you do not accept this License. Therefore, by |
||||||
|
modifying or distributing the Library (or any work based on the |
||||||
|
Library), you indicate your acceptance of this License to do so, and |
||||||
|
all its terms and conditions for copying, distributing or modifying |
||||||
|
the Library or works based on it. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>10.</strong> |
||||||
|
Each time you redistribute the Library (or any work based on the |
||||||
|
Library), the recipient automatically receives a license from the |
||||||
|
original licensor to copy, distribute, link with or modify the Library |
||||||
|
subject to these terms and conditions. You may not impose any further |
||||||
|
restrictions on the recipients' exercise of the rights granted herein. |
||||||
|
You are not responsible for enforcing compliance by third parties with |
||||||
|
this License. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>11.</strong> |
||||||
|
If, as a consequence of a court judgment or allegation of patent |
||||||
|
infringement or for any other reason (not limited to patent issues), |
||||||
|
conditions are imposed on you (whether by court order, agreement or |
||||||
|
otherwise) that contradict the conditions of this License, they do not |
||||||
|
excuse you from the conditions of this License. If you cannot |
||||||
|
distribute so as to satisfy simultaneously your obligations under this |
||||||
|
License and any other pertinent obligations, then as a consequence you |
||||||
|
may not distribute the Library at all. For example, if a patent |
||||||
|
license would not permit royalty-free redistribution of the Library by |
||||||
|
all those who receive copies directly or indirectly through you, then |
||||||
|
the only way you could satisfy both it and this License would be to |
||||||
|
refrain entirely from distribution of the Library. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
If any portion of this section is held invalid or unenforceable under any |
||||||
|
particular circumstance, the balance of the section is intended to apply, |
||||||
|
and the section as a whole is intended to apply in other circumstances. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
It is not the purpose of this section to induce you to infringe any |
||||||
|
patents or other property right claims or to contest validity of any |
||||||
|
such claims; this section has the sole purpose of protecting the |
||||||
|
integrity of the free software distribution system which is |
||||||
|
implemented by public license practices. Many people have made |
||||||
|
generous contributions to the wide range of software distributed |
||||||
|
through that system in reliance on consistent application of that |
||||||
|
system; it is up to the author/donor to decide if he or she is willing |
||||||
|
to distribute software through any other system and a licensee cannot |
||||||
|
impose that choice. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
This section is intended to make thoroughly clear what is believed to |
||||||
|
be a consequence of the rest of this License. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>12.</strong> |
||||||
|
If the distribution and/or use of the Library is restricted in |
||||||
|
certain countries either by patents or by copyrighted interfaces, the |
||||||
|
original copyright holder who places the Library under this License may add |
||||||
|
an explicit geographical distribution limitation excluding those countries, |
||||||
|
so that distribution is permitted only in or among countries not thus |
||||||
|
excluded. In such case, this License incorporates the limitation as if |
||||||
|
written in the body of this License. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>13.</strong> |
||||||
|
The Free Software Foundation may publish revised and/or new |
||||||
|
versions of the Lesser General Public License from time to time. |
||||||
|
Such new versions will be similar in spirit to the present version, |
||||||
|
but may differ in detail to address new problems or concerns. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
Each version is given a distinguishing version number. If the Library |
||||||
|
specifies a version number of this License which applies to it and |
||||||
|
"any later version", you have the option of following the terms and |
||||||
|
conditions either of that version or of any later version published by |
||||||
|
the Free Software Foundation. If the Library does not specify a |
||||||
|
license version number, you may choose any version ever published by |
||||||
|
the Free Software Foundation. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>14.</strong> |
||||||
|
If you wish to incorporate parts of the Library into other free |
||||||
|
programs whose distribution conditions are incompatible with these, |
||||||
|
write to the author to ask for permission. For software which is |
||||||
|
copyrighted by the Free Software Foundation, write to the Free |
||||||
|
Software Foundation; we sometimes make exceptions for this. Our |
||||||
|
decision will be guided by the two goals of preserving the free status |
||||||
|
of all derivatives of our free software and of promoting the sharing |
||||||
|
and reuse of software generally. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>NO WARRANTY</strong> |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>15.</strong> |
||||||
|
BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO |
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. |
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR |
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY |
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE |
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE |
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME |
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
<strong>16.</strong> |
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN |
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY |
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU |
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR |
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE |
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING |
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A |
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF |
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
||||||
|
DAMAGES. |
||||||
|
</p> |
||||||
|
|
||||||
|
<h3>END OF TERMS AND CONDITIONS</h3> |
||||||
|
</body> |
||||||
|
|
||||||
|
</html> |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 84 KiB |
@ -0,0 +1,78 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<topic id="70c4df51-5ecb-4e24-a574-8c5a84306bd1" revisionNumber="1"> |
||||||
|
<developerSampleDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> |
||||||
|
<!-- |
||||||
|
<summary> |
||||||
|
<para>Optional summary abstract</para> |
||||||
|
</summary> |
||||||
|
--> |
||||||
|
<introduction> |
||||||
|
<!-- Uncomment this to generate an outline of the section and sub-section |
||||||
|
titles. Specify a numeric value as the inner text to limit it to |
||||||
|
a specific number of sub-topics when creating the outline. Specify |
||||||
|
zero (0) to limit it to top-level sections only. --> |
||||||
|
<!-- <autoOutline /> --> |
||||||
|
<para>In the SharpDevelop source code download, you will find a small sample |
||||||
|
application in SharpDevelop\samples\AvalonEdit.Sample.</para> |
||||||
|
</introduction> |
||||||
|
|
||||||
|
<mediaLink><image xlink:href="WelcomeScreenshot" placement="center"/></mediaLink> |
||||||
|
<!-- <procedure>Optional procedures. See How To document for procedure layout example.</procedure> --> |
||||||
|
<!-- <requirements>Optional requirements section</requirements> --> |
||||||
|
<!-- <demonstrates>Optional info about what is demonstrated</demonstrates> --> |
||||||
|
<!-- <codeExample>Optional code example</codeExample> --> |
||||||
|
<!-- Add one or more top-level section elements. These are collapsible. |
||||||
|
If using <autoOutline />, add an address attribute to identify it |
||||||
|
and specify a title so that it can be jumped to with a hyperlink. --> |
||||||
|
<section> |
||||||
|
<title>The Code Project article</title> |
||||||
|
<content> |
||||||
|
<para> |
||||||
|
There is a Code Project article based on the sample application: |
||||||
|
<externalLink> |
||||||
|
<linkText>http://www.codeproject.com/KB/edit/AvalonEdit.aspx</linkText> |
||||||
|
<linkUri>http://www.codeproject.com/KB/edit/AvalonEdit.aspx</linkUri> |
||||||
|
<linkTarget>_blank</linkTarget> |
||||||
|
</externalLink> |
||||||
|
</para> |
||||||
|
<para> |
||||||
|
However, most of the material from that article has been included in this help file. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
|
||||||
|
<relatedTopics> |
||||||
|
<!-- One or more of the following: |
||||||
|
- A local link |
||||||
|
- An external link |
||||||
|
- A code entity reference |
||||||
|
|
||||||
|
<link xlink:href="Other Topic's ID">Link text</link> |
||||||
|
<externalLink> |
||||||
|
<linkText>Link text</linkText> |
||||||
|
<linkAlternateText>Optional alternate link text</linkAlternateText> |
||||||
|
<linkUri>URI</linkUri> |
||||||
|
</externalLink> |
||||||
|
<codeEntityReference>API member ID</codeEntityReference> |
||||||
|
|
||||||
|
Examples: |
||||||
|
|
||||||
|
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link> |
||||||
|
|
||||||
|
<externalLink> |
||||||
|
<linkText>SHFB on CodePlex</linkText> |
||||||
|
<linkAlternateText>Go to CodePlex</linkAlternateText> |
||||||
|
<linkUri>http://shfb.codeplex.com</linkUri> |
||||||
|
</externalLink> |
||||||
|
|
||||||
|
<codeEntityReference>T:TestDoc.TestClass</codeEntityReference> |
||||||
|
<codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference> |
||||||
|
<codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference> |
||||||
|
--> |
||||||
|
</relatedTopics> |
||||||
|
</developerSampleDocument> |
||||||
|
</topic> |
@ -0,0 +1,187 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<topic id="4d4ceb51-154d-43f0-b876-ad9640c5d2d8" revisionNumber="1"> |
||||||
|
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> |
||||||
|
<introduction> |
||||||
|
<para>Probably the most important feature for any text editor is syntax highlighting.</para> |
||||||
|
<para>AvalonEdit has a flexible text rendering model, see |
||||||
|
<link xlink:href="c06e9832-9ef0-4d65-ac2e-11f7ce9c7774" />. Among the |
||||||
|
text rendering extension points is the support for "visual line transformers" that |
||||||
|
can change the display of a visual line after it has been constructed by the "visual element generators". |
||||||
|
A useful base class implementing IVisualLineTransformer for the purpose of syntax highlighting |
||||||
|
is <codeEntityReference>T:ICSharpCode.AvalonEdit.Rendering.DocumentColorizingTransformer</codeEntityReference>. |
||||||
|
Take a look at that class' documentation to see |
||||||
|
how to write fully custom syntax highlighters. This article only discusses the XML-driven built-in |
||||||
|
highlighting engine. |
||||||
|
</para> |
||||||
|
</introduction> |
||||||
|
<section> |
||||||
|
<title>The highlighting engine</title> |
||||||
|
<content> |
||||||
|
<para> |
||||||
|
The highlighting engine in AvalonEdit is implemented in the class |
||||||
|
<codeEntityReference>T:ICSharpCode.AvalonEdit.Highlighting.DocumentHighlighter</codeEntityReference>. |
||||||
|
Highlighting is the process of taking a DocumentLine and constructing |
||||||
|
a <codeEntityReference>T:ICSharpCode.AvalonEdit.Highlighting.HighlightedLine</codeEntityReference> |
||||||
|
instance for it by assigning colors to different sections of the line. |
||||||
|
A <codeInline>HighlightedLine</codeInline> is simply a list of |
||||||
|
(possibly nested) highlighted text sections. |
||||||
|
</para><para> |
||||||
|
The <codeInline>HighlightingColorizer</codeInline> class is the only |
||||||
|
link between highlighting and rendering. |
||||||
|
It uses a <codeInline>DocumentHighlighter</codeInline> to implement |
||||||
|
a line transformer that applies the |
||||||
|
highlighting to the visual lines in the rendering process. |
||||||
|
</para><para> |
||||||
|
Except for this single call, syntax highlighting is independent from the |
||||||
|
rendering namespace. To help with other potential uses of the highlighting |
||||||
|
engine, the <codeInline>HighlightedLine</codeInline> class has the |
||||||
|
method <codeInline>ToHtml()</codeInline> |
||||||
|
to produce syntax highlighted HTML source code. |
||||||
|
</para> |
||||||
|
<para>The highlighting rules used by the highlighting engine to highlight |
||||||
|
the document are described by the following classes: |
||||||
|
</para> |
||||||
|
|
||||||
|
<definitionTable> |
||||||
|
<definedTerm>HighlightingRuleSet</definedTerm> |
||||||
|
<definition>Describes a set of highlighting spans and rules.</definition> |
||||||
|
<definedTerm>HighlightingSpan</definedTerm> |
||||||
|
<definition>A span consists of two regular expressions (Start and End), a color, |
||||||
|
and a child ruleset. |
||||||
|
The region between Start and End expressions will be assigned the |
||||||
|
given color, and inside that span, the rules of the child |
||||||
|
ruleset apply. |
||||||
|
If the child ruleset also has <codeInline>HighlightingSpan</codeInline>s, |
||||||
|
they can be nested, allowing highlighting constructs like nested comments or one language |
||||||
|
embedded in another.</definition> |
||||||
|
<definedTerm>HighlightingRule</definedTerm> |
||||||
|
<definition>A highlighting rule is regular expression with a color. |
||||||
|
It will matches of the regular expression using that color.</definition> |
||||||
|
<definedTerm>HighlightingColor</definedTerm> |
||||||
|
<definition>A highlighting color isn't just a color: it consists of a foreground |
||||||
|
color, font weight and font style.</definition> |
||||||
|
</definitionTable> |
||||||
|
<para> |
||||||
|
The highlighting engine works by first analyzing the spans: whenever a |
||||||
|
begin RegEx matches some text, that span is pushed onto a stack. |
||||||
|
Whenever the end RegEx of the current span matches some text, |
||||||
|
the span is popped from the stack. |
||||||
|
</para><para> |
||||||
|
Each span has a nested rule set associated with it, which is empty |
||||||
|
by default. This is why keywords won't be highlighted inside comments: |
||||||
|
the span's empty ruleset is active there, so the keyword rule is not applied. |
||||||
|
</para><para> |
||||||
|
This feature is also used in the string span: the nested span will match |
||||||
|
when a backslash is encountered, and the character following the backslash |
||||||
|
will be consumed by the end RegEx of the nested span |
||||||
|
(<codeInline>.</codeInline> matches any character). |
||||||
|
This ensures that <codeInline>\"</codeInline> does not denote the end of the string span; |
||||||
|
but <codeInline>\\"</codeInline> still does. |
||||||
|
</para><para> |
||||||
|
What's great about the highlighting engine is that it highlights only |
||||||
|
on-demand, works incrementally, and yet usually requires only a |
||||||
|
few KB of memory even for large code files. |
||||||
|
</para><para> |
||||||
|
On-demand means that when a document is opened, only the lines initially |
||||||
|
visible will be highlighted. When the user scrolls down, highlighting will continue |
||||||
|
from the point where it stopped the last time. If the user scrolls quickly, |
||||||
|
so that the first visible line is far below the last highlighted line, |
||||||
|
then the highlighting engine still has to process all the lines in between |
||||||
|
– there might be comment starts in them. However, it will only scan that region |
||||||
|
for changes in the span stack; highlighting rules will not be tested. |
||||||
|
</para><para> |
||||||
|
The stack of active spans is stored at the beginning of every line. |
||||||
|
If the user scrolls back up, the lines getting into view can be highlighted |
||||||
|
immediately because the necessary context (the span stack) is still available. |
||||||
|
</para><para> |
||||||
|
Incrementally means that even if the document is changed, the stored span stacks |
||||||
|
will be reused as far as possible. If the user types <codeInline>/*</codeInline>, |
||||||
|
that would theoretically cause the whole remainder of the file to become |
||||||
|
highlighted in the comment color. |
||||||
|
However, because the engine works on-demand, it will only update the span |
||||||
|
stacks within the currently visible region and keep a notice |
||||||
|
'the highlighting state is not consistent between line X and line X+1', |
||||||
|
where X is the last line in the visible region. |
||||||
|
Now, if the user would scroll down, |
||||||
|
the highlighting state would be updated and the 'not consistent' notice |
||||||
|
would be moved down. But usually, the user will continue typing |
||||||
|
and type <codeInline>*/</codeInline> only a few lines later. |
||||||
|
Now the highlighting state in the visible region will revert to the normal |
||||||
|
'only the main ruleset is on the stack of active spans'. |
||||||
|
When the user now scrolls down below the line with the 'not consistent' marker; |
||||||
|
the engine will notice that the old stack and the new stack are identical; |
||||||
|
and will remove the 'not consistent' marker. |
||||||
|
This allows reusing the stored span stacks cached from before the user typed |
||||||
|
<codeInline>/*</codeInline>. |
||||||
|
</para><para> |
||||||
|
While the stack of active spans might change frequently inside the lines, |
||||||
|
it rarely changes from the beginning of one line to the beginning of the next line. |
||||||
|
With most languages, such changes happen only at the start and end of multiline comments. |
||||||
|
The highlighting engine exploits this property by storing the list of |
||||||
|
span stacks in a special data structure |
||||||
|
(<codeEntityReference>T:ICSharpCode.AvalonEdit.Utils.CompressingTreeList{T}</codeEntityReference>). |
||||||
|
The memory usage of the highlighting engine is linear to the number of span stack changes; |
||||||
|
not to the total number of lines. |
||||||
|
This allows the highlighting engine to store the span stacks for big code |
||||||
|
files using only a tiny amount of memory, especially in languages like |
||||||
|
C# where sequences of <codeInline>//</codeInline> or <codeInline>///</codeInline> |
||||||
|
are more popular than <codeInline>/* */</codeInline> comments. |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<section> |
||||||
|
<title>XML highlighting definitions</title> |
||||||
|
<content> |
||||||
|
<para>AvalonEdit supports XML syntax highlighting definitions (.xshd files).</para> |
||||||
|
<para>In the AvalonEdit source code, you can find the file |
||||||
|
<codeInline>ICSharpCode.AvalonEdit\Highlighting\Resources\ModeV2.xsd</codeInline>. |
||||||
|
This is an XML schema for the .xshd file format; you can use it to |
||||||
|
code completion for .xshd files in XML editors. |
||||||
|
</para> |
||||||
|
<para>Here is an example highlighting definition for a sub-set of C#: |
||||||
|
<code language="xml"><![CDATA[ |
||||||
|
<SyntaxDefinition name="C#" |
||||||
|
xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008"> |
||||||
|
<Color name="Comment" foreground="Green" /> |
||||||
|
<Color name="String" foreground="Blue" /> |
||||||
|
|
||||||
|
<!-- This is the main ruleset. --> |
||||||
|
<RuleSet> |
||||||
|
<Span color="Comment" begin="//" /> |
||||||
|
<Span color="Comment" multiline="true" begin="/\*" end="\*/" /> |
||||||
|
|
||||||
|
<Span color="String"> |
||||||
|
<Begin>"</Begin> |
||||||
|
<End>"</End> |
||||||
|
<RuleSet> |
||||||
|
<!-- nested span for escape sequences --> |
||||||
|
<Span begin="\\" end="." /> |
||||||
|
</RuleSet> |
||||||
|
</Span> |
||||||
|
|
||||||
|
<Keywords fontWeight="bold" foreground="Blue"> |
||||||
|
<Word>if</Word> |
||||||
|
<Word>else</Word> |
||||||
|
<!-- ... --> |
||||||
|
</Keywords> |
||||||
|
|
||||||
|
<!-- Digits --> |
||||||
|
<Rule foreground="DarkBlue"> |
||||||
|
\b0[xX][0-9a-fA-F]+ # hex number |
||||||
|
| \b |
||||||
|
( \d+(\.[0-9]+)? #number with optional floating point |
||||||
|
| \.[0-9]+ #or just starting with floating point |
||||||
|
) |
||||||
|
([eE][+-]?[0-9]+)? # optional exponent |
||||||
|
</Rule> |
||||||
|
</RuleSet> |
||||||
|
</SyntaxDefinition> |
||||||
|
]]></code> |
||||||
|
</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
<relatedTopics> |
||||||
|
<codeEntityReference>N:ICSharpCode.AvalonEdit.Highlighting</codeEntityReference> |
||||||
|
</relatedTopics> |
||||||
|
</developerConceptualDocument> |
||||||
|
</topic> |
@ -0,0 +1,50 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<topic id="c52241ea-3eba-4ddf-b463-6349cbff38fd" revisionNumber="1"> |
||||||
|
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> |
||||||
|
<summary> |
||||||
|
<para>AvalonEdit is a WPF-based extensible text editor.</para> |
||||||
|
</summary> |
||||||
|
<introduction> |
||||||
|
<para>While the WPF RichTextBox is quite powerful, you quickly run into its limits |
||||||
|
when trying to use it as a code editor: it's hard to write efficient syntax highlighting for it, |
||||||
|
and you cannot really implement features like code folding with the standard RichTextBox.</para> |
||||||
|
<para>The problem is: the RichTextBox edits a rich document. |
||||||
|
In contrast, AvalonEdit simply edits text.</para> |
||||||
|
<para>However, AvalonEdit offers lots of possibilities on how the text document is |
||||||
|
displayed - so it is much more suitable for a code editor where things like the text color |
||||||
|
are not controlled by the user, but instead depend on the text (syntax highlighting). |
||||||
|
</para> |
||||||
|
</introduction> |
||||||
|
|
||||||
|
<mediaLink><image xlink:href="WelcomeScreenshot" placement="center"/></mediaLink> |
||||||
|
|
||||||
|
<section> |
||||||
|
<title>System requirements</title> |
||||||
|
<content> |
||||||
|
<para>AvalonEdit requires the |
||||||
|
<externalLink> |
||||||
|
<linkText>.NET Framework 3.5 SP1</linkText> |
||||||
|
<linkUri>http://www.microsoft.com/downloads/details.aspx?FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7&DisplayLang=en</linkUri> |
||||||
|
<linkTarget>_blank</linkTarget> |
||||||
|
</externalLink>. |
||||||
|
For compiling AvalonEdit inside Visual Studio 2008, VS08 SP1 is required. |
||||||
|
</para> |
||||||
|
<para>AvalonEdit requires FullTrust and will not run as XBAP.</para> |
||||||
|
</content> |
||||||
|
</section> |
||||||
|
|
||||||
|
<relatedTopics> |
||||||
|
<codeEntityReference qualifyHint="true">T:ICSharpCode.AvalonEdit.TextEditor</codeEntityReference> |
||||||
|
<externalLink> |
||||||
|
<linkText>www.avalonedit.net</linkText> |
||||||
|
<linkUri>http://www.avalonedit.net</linkUri> |
||||||
|
<linkTarget>_blank</linkTarget> |
||||||
|
</externalLink> |
||||||
|
<externalLink> |
||||||
|
<linkText>www.icsharpcode.net</linkText> |
||||||
|
<linkUri>http://www.icsharpcode.net</linkUri> |
||||||
|
<linkTarget>_blank</linkTarget> |
||||||
|
</externalLink> |
||||||
|
</relatedTopics> |
||||||
|
</developerConceptualDocument> |
||||||
|
</topic> |
@ -1,77 +0,0 @@ |
|||||||
<project schemaVersion="1.6.0.7"> |
|
||||||
<assemblies> |
|
||||||
<assembly assemblyPath=".\ICSharpCode.AvalonEdit.dll" xmlCommentsPath=".\ICSharpCode.AvalonEdit.xml" commentsOnly="False" /> |
|
||||||
</assemblies> |
|
||||||
<namespaceSummaries> |
|
||||||
<namespaceSummaryItem name="" isDocumented="False" /> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit" isDocumented="True">This is the main AvalonEdit namespace.</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.CodeCompletion" isDocumented="True">This namespace contains classes to show the code completion window.</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.Document" isDocumented="True">This namespace contains the document model. |
|
||||||
The most important class here is TextDocument, which represents document that can be displayed and edited in the text editor.</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.Editing" isDocumented="True">This namespace is the home of the TextArea class. It manages user input and handles the caret and the selection.</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.Folding" isDocumented="True">This namespace contains the folding implementation.</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.Highlighting" isDocumented="True">This namespace contains the engine for highlighting text documents (DocumentHighlighter). |
|
||||||
Additionally, the class HighlightingColorizer provides integration of the highlighting engine into the text editor GUI.</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.Highlighting.Xshd" isDocumented="True">This namespace contains a document model for syntax highlighting definitions (.xshd files).</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.Indentation" isDocumented="True">This namespace contains the logic for automatic indentation.</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.Rendering" isDocumented="True">This namespace contains the text rendering infrastructure.</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="ICSharpCode.AvalonEdit.Utils" isDocumented="True">This namespace contains various utility classes</namespaceSummaryItem> |
|
||||||
<namespaceSummaryItem name="XamlGeneratedNamespace" isDocumented="False" /> |
|
||||||
</namespaceSummaries> |
|
||||||
<conceptualContent snippetFile=""> |
|
||||||
<topics defaultTopic="c52241ea-3eba-4ddf-b463-6349cbff38fd"> |
|
||||||
<topic id="c52241ea-3eba-4ddf-b463-6349cbff38fd" file="..\src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\documentation\Introduction.xml" revision="1" visible="True" /> |
|
||||||
<topic id="5b1854b4-884c-4713-b921-b28e96a1b43e" file="..\src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\documentation\Coordinate Systems.xml" revision="1" visible="True" /> |
|
||||||
<topic id="c06e9832-9ef0-4d65-ac2e-11f7ce9c7774" file="..\src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\documentation\TextRendering.xml" revision="1" visible="True" /> |
|
||||||
<topic id="4d4ceb51-154d-43f0-b876-ad9640c5d2d8" file="..\src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\documentation\SyntaxHighlighting.xml" revision="1" visible="True" /> |
|
||||||
<topic id="440df648-413e-4f42-a28b-6b2b0e9b1084" file="..\src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\documentation\Folding.xml" revision="1" visible="True" /> |
|
||||||
</topics> |
|
||||||
</conceptualContent> |
|
||||||
<componentConfigurations> |
|
||||||
<component id="Cached Reflection Index Data" enabled="True" configuration="<component id="Cached Reflection Index Data" type="SandcastleBuilder.Components.CachedCopyFromIndexComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<index name="reflection" value="/reflection/apis/api" key="@id" cache="10">
 <cache base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" cacheFile="{@AppDataFolder}Cache\Reflection.cache" />
 <data files="reflection.xml" />
</index>
<copy name="reflection" source="*" target="/document/reference" />
</component>" /> |
|
||||||
<component id="Cached MSDN URL References" enabled="True" configuration="<component id="Cached MSDN URL References" type="SandcastleBuilder.Components.CachedResolveReferenceLinksComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<cache filename="{@AppDataFolder}Cache\MsdnUrl.cache" />
<targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" type="{@SDKLinks}" />
<targets files="reflection.xml" type="{@ProjectLinks}" />
</component>" /> |
|
||||||
<component id="IntelliSense Component" enabled="True" configuration="<component id="IntelliSense Component" type="SandcastleBuilder.Components.IntelliSenseComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<!-- Output options (optional)
 Attributes:
 Include Namespaces (false by default)
 Namespaces filename ("Namespaces" if not specified or empty)
 Directory (current folder if not specified or empty) -->
<output includeNamespaces="false" namespacesFile="Namespaces" folder="{@OutputFolder}" />
</component>" /> |
|
||||||
<component id="Cached Framework Comments Index Data" enabled="True" configuration="<component id="Cached Framework Comments Index Data" type="SandcastleBuilder.Components.CachedCopyFromIndexComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<index name="comments" value="/doc/members/member" key="@name" cache="100">
{@CachedFrameworkCommentList}
{@CommentFileList}
 </index>
<copy name="comments" source="*" target="/document/comments" />
</component>" /> |
|
||||||
</componentConfigurations> |
|
||||||
<ProjectSummary /> |
|
||||||
<MissingTags>Summary, AutoDocumentCtors, Namespace</MissingTags> |
|
||||||
<VisibleItems>InheritedMembers, InheritedFrameworkMembers, Protected, ProtectedInternalAsProtected</VisibleItems> |
|
||||||
<HtmlHelp1xCompilerPath path="" /> |
|
||||||
<HtmlHelp2xCompilerPath path="" /> |
|
||||||
<OutputPath>.\Help\</OutputPath> |
|
||||||
<SandcastlePath path="" /> |
|
||||||
<WorkingPath path="" /> |
|
||||||
<CleanIntermediates>True</CleanIntermediates> |
|
||||||
<KeepLogFile>True</KeepLogFile> |
|
||||||
<BuildLogFile path="" /> |
|
||||||
<HelpFileFormat>HtmlHelp1x</HelpFileFormat> |
|
||||||
<CppCommentsFixup>False</CppCommentsFixup> |
|
||||||
<FrameworkVersion>3.5</FrameworkVersion> |
|
||||||
<IndentHtml>False</IndentHtml> |
|
||||||
<Preliminary>False</Preliminary> |
|
||||||
<RootNamespaceContainer>False</RootNamespaceContainer> |
|
||||||
<RootNamespaceTitle /> |
|
||||||
<HelpTitle>AvalonEdit</HelpTitle> |
|
||||||
<HtmlHelpName>AvalonEdit Documentation</HtmlHelpName> |
|
||||||
<Language>en-US</Language> |
|
||||||
<CopyrightHref /> |
|
||||||
<CopyrightText>Copyright 2008-2009, Daniel Grunwald</CopyrightText> |
|
||||||
<FeedbackEMailAddress /> |
|
||||||
<FeedbackEMailLinkText /> |
|
||||||
<HeaderText /> |
|
||||||
<FooterText /> |
|
||||||
<ProjectLinkType>Local</ProjectLinkType> |
|
||||||
<SdkLinkType>Msdn</SdkLinkType> |
|
||||||
<SdkLinkTarget>Blank</SdkLinkTarget> |
|
||||||
<PresentationStyle>Prototype</PresentationStyle> |
|
||||||
<NamingMethod>Guid</NamingMethod> |
|
||||||
<SyntaxFilters>Standard</SyntaxFilters> |
|
||||||
<ShowFeedbackControl>False</ShowFeedbackControl> |
|
||||||
<BinaryTOC>True</BinaryTOC> |
|
||||||
<IncludeFavorites>False</IncludeFavorites> |
|
||||||
<CollectionTocStyle>Hierarchical</CollectionTocStyle> |
|
||||||
<IncludeStopWordList>True</IncludeStopWordList> |
|
||||||
<PlugInNamespaces>ms.vsipcc+, ms.vsexpresscc+</PlugInNamespaces> |
|
||||||
<HelpFileVersion>4.0.0.5048</HelpFileVersion> |
|
||||||
<ContentPlacement>AboveNamespaces</ContentPlacement> |
|
||||||
</project> |
|
@ -1,167 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<developerConceptualDocument |
|
||||||
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" |
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"> |
|
||||||
|
|
||||||
<!-- |
|
||||||
<summary> |
|
||||||
<para>Optional summary abstract</para> |
|
||||||
</summary> |
|
||||||
--> |
|
||||||
|
|
||||||
<introduction> |
|
||||||
<!-- Uncomment this to generate an outline of the section and sub-section |
|
||||||
titles. Specify a numeric value as the inner text to limit it to |
|
||||||
a specific number of sub-topics when creating the outline. Specify |
|
||||||
zero (0) to limit it to top-level sections only. --> |
|
||||||
<!-- <autoOutline /> --> |
|
||||||
|
|
||||||
<para>The text editor makes use of several different coordinate systems. |
|
||||||
Here's an explanation of them.</para> |
|
||||||
</introduction> |
|
||||||
|
|
||||||
<!-- Add one or more top-level section elements. These are collapsible. |
|
||||||
If using <autoOutline /> tag, add an address attribute to identify |
|
||||||
it so that it can be jumped to with a hyperlink. --> |
|
||||||
<section> |
|
||||||
<title>Offset</title> |
|
||||||
<content> |
|
||||||
<para>The number of characters from the start of the text, counting from 0.</para> |
|
||||||
<para>Same as used by String.IndexOf() etc.</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
<section> |
|
||||||
<title>TextLocation</title> |
|
||||||
<content> |
|
||||||
<para>A Line,Column pair. Line and column count from 1.</para> |
|
||||||
<para>Use the |
|
||||||
TextDocument.<codeEntityReference>M:ICSharpCode.AvalonEdit.Document.TextDocument.GetLocation(System.Int32)</codeEntityReference> |
|
||||||
and |
|
||||||
TextDocument.<codeEntityReference>M:ICSharpCode.AvalonEdit.Document.TextDocument.GetOffset(ICSharpCode.AvalonEdit.Document.TextLocation)</codeEntityReference> |
|
||||||
methods to convert between TextLocation and Offset.</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
<section> |
|
||||||
<title>TextAnchor</title> |
|
||||||
<content> |
|
||||||
<para>A text anchor object stores an Offset, but automatically |
|
||||||
updates the offset when text is inserted/removed before the offset. |
|
||||||
</para> |
|
||||||
<para> |
|
||||||
The document keeps weak references to anchors for updating them, |
|
||||||
so you don't have to worry about memory leaks using text anchors. |
|
||||||
</para> |
|
||||||
<para>Use the |
|
||||||
<codeEntityReference>P:ICSharpCode.AvalonEdit.Document.TextAnchor.Offset</codeEntityReference> |
|
||||||
property to get the offset from a text anchor. |
|
||||||
Use the |
|
||||||
<codeEntityReference>M:ICSharpCode.AvalonEdit.Document.TextDocument.CreateAnchor(System.Int32)</codeEntityReference> |
|
||||||
method to create an anchor from an offset. |
|
||||||
</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
<section> |
|
||||||
<title>RelativeTextOffset</title> |
|
||||||
<content> |
|
||||||
<para>An offset in the document, but relative to the start offset of a VisualLine.</para> |
|
||||||
<para>Relative text offsets are used to store document offsets in visual lines.</para> |
|
||||||
<para>You can convert between relative text offsets and document offsets |
|
||||||
by adding/subtracting |
|
||||||
<codeEntityReference>T:ICSharpCode.AvalonEdit.Rendering.VisualLine</codeEntityReference>.<codeEntityReference>P:ICSharpCode.AvalonEdit.Rendering.VisualLine.FirstDocumentLine</codeEntityReference>.<codeEntityReference>P:ICSharpCode.AvalonEdit.Document.DocumentLine.Offset</codeEntityReference>. |
|
||||||
</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
<section> |
|
||||||
<title>VisualColumn</title> |
|
||||||
<content> |
|
||||||
<para>An integer value that specifies a position inside a VisualLine.</para> |
|
||||||
<para> |
|
||||||
Not only text has a length in the visual line, but also other VisualLineElements. |
|
||||||
VisualColumn is counting from 0 for each visual line. |
|
||||||
</para> |
|
||||||
<para>For example, tab markers take 2 visual columns (the marker and the tab space), |
|
||||||
newline markers take 1 visual column; folding markers take just 1 visual column |
|
||||||
even though they are longer in the document text.</para> |
|
||||||
<para>Use the |
|
||||||
<codeEntityReference>M:ICSharpCode.AvalonEdit.Rendering.VisualLine.GetVisualColumn(System.Int32)</codeEntityReference> |
|
||||||
and |
|
||||||
<codeEntityReference>M:ICSharpCode.AvalonEdit.Rendering.VisualLine.GetRelativeOffset(System.Int32)</codeEntityReference> |
|
||||||
methods to convert between |
|
||||||
visual columns and relative text offsets.</para> |
|
||||||
|
|
||||||
<alert class="note"> |
|
||||||
<para>Do not confuse VisualColumn with text columns. |
|
||||||
VisualColumn starts at 0, text column at 1. Text may have different length |
|
||||||
in the two coordinate systems (e.g. tab markers, foldings).</para> |
|
||||||
</alert> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
<section> |
|
||||||
<title>TextViewPosition</title> |
|
||||||
<content> |
|
||||||
<para>A Line,Column,VisualColumn triple.</para> |
|
||||||
<para>Can be implicitly converted |
|
||||||
to TextLocation, but has the additional VisualColumn information |
|
||||||
that is necessary to accurately hold the caret position when |
|
||||||
VisualLineElements with DocumentLength 0 are in use.</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
<section> |
|
||||||
<title>VisualTop</title> |
|
||||||
<content> |
|
||||||
<para>A double value that specifies the distance from the top of |
|
||||||
the document to the top of a line measured in device-independent pixels.</para> |
|
||||||
<para>VisualTop is equivalent to the Y component of a VisualPosition.</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
<section> |
|
||||||
<title>VisualPosition</title> |
|
||||||
<content> |
|
||||||
<para>A Point value (double X,Y) that specifies the position of an |
|
||||||
element from the top left document corner measured in device-independent pixels.</para> |
|
||||||
<para>To convert a VisualPosition to or from a (mouse) position inside |
|
||||||
the TextView, simply subtract or add |
|
||||||
TextView.<codeEntityReference>P:ICSharpCode.AvalonEdit.Rendering.TextView.ScrollOffset</codeEntityReference> |
|
||||||
to it. |
|
||||||
</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
|
|
||||||
<relatedTopics> |
|
||||||
<!-- One or more of the following: |
|
||||||
- A local link |
|
||||||
- An external link |
|
||||||
- A code entity reference |
|
||||||
|
|
||||||
<link xlink:href="Other Topic's ID"/> |
|
||||||
<link xlink:href="Other Topic's ID">Link inner text</link> |
|
||||||
|
|
||||||
<externalLink> |
|
||||||
<linkText>Link text</linkText> |
|
||||||
<linkAlternateText>Optional alternate link text</linkAlternateText> |
|
||||||
<linkUri>URI</linkUri> |
|
||||||
</externalLink> |
|
||||||
|
|
||||||
<codeEntityReference>API member ID</codeEntityReference> |
|
||||||
|
|
||||||
Examples: |
|
||||||
|
|
||||||
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8270" /> |
|
||||||
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link> |
|
||||||
|
|
||||||
<externalLink> |
|
||||||
<linkText>SHFB on CodePlex</linkText> |
|
||||||
<linkAlternateText>Go to CodePlex</linkAlternateText> |
|
||||||
<linkUri>http://www.codeplex.com/SHFB</linkUri> |
|
||||||
</externalLink> |
|
||||||
|
|
||||||
<codeEntityReference>T:TestDoc.TestClass</codeEntityReference> |
|
||||||
<codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference> |
|
||||||
--> |
|
||||||
</relatedTopics> |
|
||||||
</developerConceptualDocument> |
|
@ -1,32 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<developerConceptualDocument |
|
||||||
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" |
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"> |
|
||||||
|
|
||||||
<introduction> |
|
||||||
<para> |
|
||||||
Introduction for 'Folding'. |
|
||||||
</para> |
|
||||||
</introduction> |
|
||||||
|
|
||||||
<section> |
|
||||||
<title>How the FoldingManager works</title> |
|
||||||
<content> |
|
||||||
<para> |
|
||||||
The FoldingManager maintains a list of foldings. The FoldMargin displays those foldings and provides |
|
||||||
the UI for collapsing/expanding. |
|
||||||
Folded foldings cause the FoldingElementGenerator to produce a line element that spans the whole folded |
|
||||||
text section, causing the text generation for the visual line that contains the folding start to |
|
||||||
continue after the folding end in another line. |
|
||||||
To ensure scrolling works correctly in the presence of foldings, lines inside folded regions must not |
|
||||||
be used as start lines for the visual line generation. This is done by setting the line height of all |
|
||||||
such lines to 0. To efficiently set the height on a large number of lines and support reverting to the |
|
||||||
old height when the folding is uncollapsed, a CollapsedLineSection is used. |
|
||||||
</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
|
|
||||||
<relatedTopics> |
|
||||||
<codeEntityReference>T:ICSharpCode.AvalonEdit.Folding.FoldingManager</codeEntityReference> |
|
||||||
</relatedTopics> |
|
||||||
</developerConceptualDocument> |
|
@ -1,72 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<developerConceptualDocument |
|
||||||
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" |
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"> |
|
||||||
|
|
||||||
<summary> |
|
||||||
<para>AvalonEdit is a WPF-based extensible text editor.</para> |
|
||||||
</summary> |
|
||||||
|
|
||||||
<introduction> |
|
||||||
<para>While the WPF RichTextBox is quite powerful, you quickly run into its limits |
|
||||||
when trying to use it as a code editor: it's hard to write efficient syntax highlighting for it, |
|
||||||
and you cannot really implement features like code folding with the standard RichTextBox.</para> |
|
||||||
<para>The problem is: the RichTextBox edits a rich document. |
|
||||||
In contrast, AvalonEdit simply edits text.</para> |
|
||||||
<para>However, AvalonEdit offers lots of possibilities on how the text document is |
|
||||||
displayed - so it is much more suitable for a code editor where things like the text color |
|
||||||
are not controlled by the user, but instead depend on the text (syntax highlighting).</para> |
|
||||||
</introduction> |
|
||||||
|
|
||||||
<!-- TODO: screenshot--> |
|
||||||
|
|
||||||
<relatedTopics> |
|
||||||
<codeEntityReference>T:ICSharpCode.AvalonEdit.TextEditor</codeEntityReference> |
|
||||||
|
|
||||||
<externalLink> |
|
||||||
<linkText>www.avalonedit.net</linkText> |
|
||||||
<linkUri>http://www.avalonedit.net</linkUri> |
|
||||||
</externalLink> |
|
||||||
|
|
||||||
<externalLink> |
|
||||||
<linkText>www.icsharpcode.net</linkText> |
|
||||||
<linkUri>http://www.icsharpcode.net</linkUri> |
|
||||||
</externalLink> |
|
||||||
|
|
||||||
<!-- One or more of the following: |
|
||||||
- A local link |
|
||||||
- An external link |
|
||||||
- A code entity reference |
|
||||||
|
|
||||||
<link xlink:href="Other Topic's ID"/> |
|
||||||
<link xlink:href="Other Topic's ID">Link inner text</link> |
|
||||||
|
|
||||||
<externalLink> |
|
||||||
<linkText>Link text</linkText> |
|
||||||
<linkAlternateText>Optional alternate link text</linkAlternateText> |
|
||||||
<linkUri>URI</linkUri> |
|
||||||
</externalLink> |
|
||||||
|
|
||||||
<codeEntityReference>API member ID</codeEntityReference> |
|
||||||
|
|
||||||
Examples: |
|
||||||
|
|
||||||
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8270" /> |
|
||||||
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link> |
|
||||||
|
|
||||||
<externalLink> |
|
||||||
<linkText>SHFB on CodePlex</linkText> |
|
||||||
<linkAlternateText>Go to CodePlex</linkAlternateText> |
|
||||||
<linkUri>http://www.codeplex.com/SHFB</linkUri> |
|
||||||
</externalLink> |
|
||||||
|
|
||||||
<codeEntityReference>T:TestDoc.TestClass</codeEntityReference> |
|
||||||
<codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference> |
|
||||||
<codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference> |
|
||||||
--> |
|
||||||
</relatedTopics> |
|
||||||
</developerConceptualDocument> |
|
@ -1,55 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<developerConceptualDocument |
|
||||||
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" |
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"> |
|
||||||
|
|
||||||
<introduction> |
|
||||||
<para>Probably the most important feature for any text editor is syntax highlighting.</para> |
|
||||||
<para>AvalonEdit has a flexible text rendering model, see "Text Rendering". Among the |
|
||||||
Text Rendering extension points is the support for "visual line transformers" that |
|
||||||
can change the display of a visual line after it has been constructed by the "visual element generators". |
|
||||||
A useful base class implementing IVisualLineTransformer for the purpose of syntax highlighting |
|
||||||
is DocumentColorizingTransformer. Take a look at that class' documentation to see |
|
||||||
how to write fully custom syntax highlighters. This article only discusses the XML-driven built-in |
|
||||||
highlighting engine. |
|
||||||
</para> |
|
||||||
</introduction> |
|
||||||
|
|
||||||
<section> |
|
||||||
<title>The highlighting engine</title> |
|
||||||
<content> |
|
||||||
<para> |
|
||||||
The core engine of the higlighting is the class DocumentHighlighter. It tracks changes |
|
||||||
to a TextDocument and can produce HighlightedLines from DocumentLines. |
|
||||||
A HighlightedLine is simply a list of (possibly nested) highlighted text sections. |
|
||||||
</para> |
|
||||||
<para>The highlighting rules used by the highlighting engine to highlight |
|
||||||
the document are described by the following classes: |
|
||||||
- HighlightingRuleSet: describes a set of highlighting spans and rules |
|
||||||
- HighlightingSpan: consists of Start and End regular expressions, a color, and a |
|
||||||
child ruleset. The region between Start and End expressions will be |
|
||||||
assigned the given color, and inside that span, the rules of the child |
|
||||||
ruleset apply (instead of the default rules). |
|
||||||
If the child ruleset also has HighlightingSpans, they can be nested, |
|
||||||
allowing highlighting constructs like nested comments or one language |
|
||||||
embedded in another. |
|
||||||
- HighlightingRule: A regular expression with a color. Highlights matches of the |
|
||||||
regular expression using that color. |
|
||||||
- HighlightingColor: |
|
||||||
A highlighting color isn't just a color: it consists of a foreground |
|
||||||
color, font weight and font style. |
|
||||||
</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
|
|
||||||
<section> |
|
||||||
<title>XML highlighting definitions</title> |
|
||||||
<content> |
|
||||||
<para>AvalonEdit supports XML syntax highlighting definitions (.xshd files).</para> |
|
||||||
</content> |
|
||||||
</section> |
|
||||||
|
|
||||||
<relatedTopics> |
|
||||||
<codeEntityReference>N:ICSharpCode.AvalonEdit.Highlighting</codeEntityReference> |
|
||||||
</relatedTopics> |
|
||||||
</developerConceptualDocument> |
|
Loading…
Reference in new issue