Skip to content

Commit d3fd21b

Browse files
author
Brad Robinson
committed
Updated documentation
1 parent 0301698 commit d3fd21b

7 files changed

Lines changed: 237 additions & 10 deletions

doc/.common.page

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,9 @@ navTree:
529529
- text: MarginLeft|./ref/Topten.RichTextKit.Editor.TextDocument.MarginLeft
530530
- text: MarginRight|./ref/Topten.RichTextKit.Editor.TextDocument.MarginRight
531531
- text: MarginTop|./ref/Topten.RichTextKit.Editor.TextDocument.MarginTop
532+
- text: MeasuredContentWidth|./ref/Topten.RichTextKit.Editor.TextDocument.MeasuredContentWidth
532533
- text: MeasuredHeight|./ref/Topten.RichTextKit.Editor.TextDocument.MeasuredHeight
534+
- text: MeasuredOverhang|./ref/Topten.RichTextKit.Editor.TextDocument.MeasuredOverhang
533535
- text: MeasuredWidth|./ref/Topten.RichTextKit.Editor.TextDocument.MeasuredWidth
534536
- text: PageWidth|./ref/Topten.RichTextKit.Editor.TextDocument.PageWidth
535537
- text: PlainTextMode|./ref/Topten.RichTextKit.Editor.TextDocument.PlainTextMode
@@ -538,6 +540,7 @@ navTree:
538540
- text: UndoManager|./ref/Topten.RichTextKit.Editor.TextDocument.UndoManager
539541
- text: Methods
540542
subItems:
543+
- text: Extract|./ref/Topten.RichTextKit.Editor.TextDocument.Extract
541544
- text: FinishImeComposition|./ref/Topten.RichTextKit.Editor.TextDocument.FinishImeComposition
542545
- text: GetCaretInfo|./ref/Topten.RichTextKit.Editor.TextDocument.GetCaretInfo
543546
- text: GetOvertypeRange|./ref/Topten.RichTextKit.Editor.TextDocument.GetOvertypeRange
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: "TextDocument.Extract"
3+
isMarkdown: false
4+
import: "../.common.page"
5+
---
6+
7+
<h1 data-nav-secondary-text="Definition" id="definition">TextDocument.Extract Method</h1>
8+
9+
10+
<p>
11+
<small>
12+
Assembly: Topten.RichTextKit.dll<br />
13+
Namespace: <a href="./../ref/Topten.RichTextKit.Editor">Topten.RichTextKit.Editor</a><br />
14+
15+
Declaring Type: <a href="./../ref/Topten.RichTextKit.Editor.TextDocument">TextDocument</a><br />
16+
</small>
17+
</p>
18+
19+
20+
21+
22+
23+
24+
25+
26+
<p>Get the text for a part of the document</p>
27+
28+
29+
<pre class="language-csharp"><code class="language-csharp">public Topten.RichTextKit.StyledText Extract(Topten.RichTextKit.TextRange range);</code></pre>
30+
31+
32+
<h2 id="parameters">Parameters</h2> <table class="name-description">
33+
<tr>
34+
<td>
35+
36+
<a href="./../ref/Topten.RichTextKit.TextRange">Topten.RichTextKit.TextRange</a> range
37+
</td>
38+
<td><p>The text to retrieve</p>
39+
</td>
40+
</tr>
41+
</table>
42+
<h2 id="returns">Returns</h2> <table class="name-description">
43+
<tr>
44+
<td><a href="./../ref/Topten.RichTextKit.StyledText">Topten.RichTextKit.StyledText</a></td>
45+
<td><p>The styled text</p>
46+
</td>
47+
</tr>
48+
</table>
49+
50+
51+
52+
53+
54+
55+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: "TextDocument.MeasuredContentWidth"
3+
isMarkdown: false
4+
import: "../.common.page"
5+
---
6+
7+
<h1 data-nav-secondary-text="Definition" id="definition">TextDocument.MeasuredContentWidth Property</h1>
8+
9+
10+
<p>
11+
<small>
12+
Assembly: Topten.RichTextKit.dll<br />
13+
Namespace: <a href="./../ref/Topten.RichTextKit.Editor">Topten.RichTextKit.Editor</a><br />
14+
15+
Declaring Type: <a href="./../ref/Topten.RichTextKit.Editor.TextDocument">TextDocument</a><br />
16+
</small>
17+
</p>
18+
19+
20+
21+
22+
<p>The total width of the content of the document</p>
23+
24+
25+
<pre class="language-csharp"><code class="language-csharp">public float MeasuredContentWidth { get; }</code></pre>
26+
27+
<h2 id="remarks">Remarks</h2><p>For line-wrap or non-line-wrap documents this is
28+
the width of the widest paragraph.</p>
29+
30+
<h2 id="property-type">Property Type</h2> <table class="name-description">
31+
<tr>
32+
<td><a href="https://docs.microsoft.com/dotnet/api/System.Single">float</a></td>
33+
<td></td>
34+
</tr>
35+
</table>
36+
37+
38+
39+
40+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: "TextDocument.MeasuredOverhang"
3+
isMarkdown: false
4+
import: "../.common.page"
5+
---
6+
7+
<h1 data-nav-secondary-text="Definition" id="definition">TextDocument.MeasuredOverhang Property</h1>
8+
9+
10+
<p>
11+
<small>
12+
Assembly: Topten.RichTextKit.dll<br />
13+
Namespace: <a href="./../ref/Topten.RichTextKit.Editor">Topten.RichTextKit.Editor</a><br />
14+
15+
Declaring Type: <a href="./../ref/Topten.RichTextKit.Editor.TextDocument">TextDocument</a><br />
16+
</small>
17+
</p>
18+
19+
20+
21+
22+
<p>Gets the actual measured overhang in each direction based on the
23+
fonts used, and the supplied text.</p>
24+
25+
26+
<pre class="language-csharp"><code class="language-csharp">public SkiaSharp.SKRect MeasuredOverhang { get; }</code></pre>
27+
28+
<h2 id="remarks">Remarks</h2><p>The return rectangle describes overhang amounts for each edge - not
29+
rectangle co-ordinates.</p>
30+
31+
<h2 id="property-type">Property Type</h2> <table class="name-description">
32+
<tr>
33+
<td>SkiaSharp.SKRect</td>
34+
<td></td>
35+
</tr>
36+
</table>
37+
38+
39+
40+
41+

doc/ref/Topten.RichTextKit.Editor.TextDocument.ReplaceText.page

Lines changed: 73 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,75 @@ import: "../.common.page"
2323
<h2 id="overloads">Overloads</h2>
2424
<table class="name-description">
2525
<tr>
26-
<td><a href="#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-System-String-Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, string, EditSemantics)</a></td>
26+
<td><a href="#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit-StyledText-Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.StyledText, EditSemantics)</a></td>
2727
<td><p>Replaces a range of text with the specified text</p>
2828
</td>
2929
</tr>
3030
<tr>
31-
<td><a href="#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit.Utils-Slice-System-Int32--Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.Utils.Slice&lt;int&gt;, EditSemantics)</a></td>
31+
<td><a href="#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-System-String-Topten.RichTextKit.Editor-EditSemantics-Topten.RichTextKit-IStyle">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, string, EditSemantics, Topten.RichTextKit.IStyle)</a></td>
32+
<td><p>Replaces a range of text with the specified text</p>
33+
</td>
34+
</tr>
35+
<tr>
36+
<td><a href="#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit.Utils-Slice-System-Int32--Topten.RichTextKit.Editor-EditSemantics-Topten.RichTextKit-IStyle">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.Utils.Slice&lt;int&gt;, EditSemantics, Topten.RichTextKit.IStyle)</a></td>
3237
<td><p>Replaces a range of text with the specified text</p>
3338
</td>
3439
</tr>
3540
</table>
3641

3742

38-
<h2 id="Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-System-String-Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, string, EditSemantics)</h2>
43+
<h2 id="Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit-StyledText-Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.StyledText, EditSemantics)</h2>
3944

4045
<p>Replaces a range of text with the specified text</p>
4146

4247

43-
<pre class="language-csharp"><code class="language-csharp">public void ReplaceText(ITextDocumentView view, Topten.RichTextKit.TextRange range, string text, EditSemantics semantics);</code></pre>
48+
<pre class="language-csharp"><code class="language-csharp">public void ReplaceText(ITextDocumentView view, Topten.RichTextKit.TextRange range, Topten.RichTextKit.StyledText styledText, EditSemantics semantics);</code></pre>
49+
50+
51+
<h3>Parameters</h3> <table class="name-description">
52+
<tr>
53+
<td>
54+
55+
<a href="./../ref/Topten.RichTextKit.Editor.ITextDocumentView">ITextDocumentView</a> view
56+
</td>
57+
<td><p>The view initiating the operation</p>
58+
</td>
59+
</tr>
60+
<tr>
61+
<td>
62+
63+
<a href="./../ref/Topten.RichTextKit.TextRange">Topten.RichTextKit.TextRange</a> range
64+
</td>
65+
<td><p>The range to be replaced</p>
66+
</td>
67+
</tr>
68+
<tr>
69+
<td>
70+
71+
<a href="./../ref/Topten.RichTextKit.StyledText">Topten.RichTextKit.StyledText</a> styledText
72+
</td>
73+
<td><p>The text to replace with</p>
74+
</td>
75+
</tr>
76+
<tr>
77+
<td>
78+
79+
<a href="./../ref/Topten.RichTextKit.Editor.EditSemantics">EditSemantics</a> semantics
80+
</td>
81+
<td><p>Controls how undo operations are coalesced and view selections updated</p>
82+
</td>
83+
</tr>
84+
</table>
85+
86+
87+
88+
89+
<h2 id="Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-System-String-Topten.RichTextKit.Editor-EditSemantics-Topten.RichTextKit-IStyle">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, string, EditSemantics, Topten.RichTextKit.IStyle)</h2>
90+
91+
<p>Replaces a range of text with the specified text</p>
92+
93+
94+
<pre class="language-csharp"><code class="language-csharp">public void ReplaceText(ITextDocumentView view, Topten.RichTextKit.TextRange range, string text, EditSemantics semantics, Topten.RichTextKit.IStyle styleToUse = null);</code></pre>
4495

4596

4697
<h3>Parameters</h3> <table class="name-description">
@@ -74,19 +125,27 @@ import: "../.common.page"
74125
<a href="./../ref/Topten.RichTextKit.Editor.EditSemantics">EditSemantics</a> semantics
75126
</td>
76127
<td><p>Controls how undo operations are coalesced and view selections updated</p>
128+
</td>
129+
</tr>
130+
<tr>
131+
<td>
132+
133+
<a href="./../ref/Topten.RichTextKit.IStyle">Topten.RichTextKit.IStyle</a> styleToUse
134+
= null </td>
135+
<td><p>The style to use for the added text (optional)</p>
77136
</td>
78137
</tr>
79138
</table>
80139

81140

82141

83142

84-
<h2 id="Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit.Utils-Slice-System-Int32--Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.Utils.Slice&lt;int&gt;, EditSemantics)</h2>
143+
<h2 id="Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit.Utils-Slice-System-Int32--Topten.RichTextKit.Editor-EditSemantics-Topten.RichTextKit-IStyle">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.Utils.Slice&lt;int&gt;, EditSemantics, Topten.RichTextKit.IStyle)</h2>
85144

86145
<p>Replaces a range of text with the specified text</p>
87146

88147

89-
<pre class="language-csharp"><code class="language-csharp">public void ReplaceText(ITextDocumentView view, Topten.RichTextKit.TextRange range, Topten.RichTextKit.Utils.Slice&lt;int&gt; codePoints, EditSemantics semantics);</code></pre>
148+
<pre class="language-csharp"><code class="language-csharp">public void ReplaceText(ITextDocumentView view, Topten.RichTextKit.TextRange range, Topten.RichTextKit.Utils.Slice&lt;int&gt; codePoints, EditSemantics semantics, Topten.RichTextKit.IStyle styleToUse = null);</code></pre>
90149

91150

92151
<h3>Parameters</h3> <table class="name-description">
@@ -120,6 +179,14 @@ import: "../.common.page"
120179
<a href="./../ref/Topten.RichTextKit.Editor.EditSemantics">EditSemantics</a> semantics
121180
</td>
122181
<td><p>Controls how undo operations are coalesced and view selections updated</p>
182+
</td>
183+
</tr>
184+
<tr>
185+
<td>
186+
187+
<a href="./../ref/Topten.RichTextKit.IStyle">Topten.RichTextKit.IStyle</a> styleToUse
188+
= null </td>
189+
<td><p>The style to use for the added text (optional)</p>
123190
</td>
124191
</tr>
125192
</table>

doc/ref/Topten.RichTextKit.Editor.TextDocument.page

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,22 @@ import: "../.common.page"
9191
<tr>
9292
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.MarginTop">MarginTop</a></td>
9393
<td><p>The document's top margin</p>
94+
</td>
95+
</tr>
96+
<tr>
97+
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.MeasuredContentWidth">MeasuredContentWidth</a></td>
98+
<td><p>The total width of the content of the document</p>
9499
</td>
95100
</tr>
96101
<tr>
97102
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.MeasuredHeight">MeasuredHeight</a></td>
98103
<td><p>The total height of the document</p>
104+
</td>
105+
</tr>
106+
<tr>
107+
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.MeasuredOverhang">MeasuredOverhang</a></td>
108+
<td><p>Gets the actual measured overhang in each direction based on the
109+
fonts used, and the supplied text.</p>
99110
</td>
100111
</tr>
101112
<tr>
@@ -132,6 +143,11 @@ import: "../.common.page"
132143

133144
<h2 id="methods">Methods</h2>
134145
<table class="name-description">
146+
<tr>
147+
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.Extract">Extract(Topten.RichTextKit.TextRange)</a></td>
148+
<td><p>Get the text for a part of the document</p>
149+
</td>
150+
</tr>
135151
<tr>
136152
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.FinishImeComposition">FinishImeComposition(ITextDocumentView)</a></td>
137153
<td><p>Complete an IME composition</p>
@@ -190,12 +206,17 @@ current word, line, paragraph or document</p>
190206
</td>
191207
</tr>
192208
<tr>
193-
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.ReplaceText#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-System-String-Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, string, EditSemantics)</a></td>
209+
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.ReplaceText#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit-StyledText-Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.StyledText, EditSemantics)</a></td>
210+
<td><p>Replaces a range of text with the specified text</p>
211+
</td>
212+
</tr>
213+
<tr>
214+
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.ReplaceText#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-System-String-Topten.RichTextKit.Editor-EditSemantics-Topten.RichTextKit-IStyle">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, string, EditSemantics, Topten.RichTextKit.IStyle)</a></td>
194215
<td><p>Replaces a range of text with the specified text</p>
195216
</td>
196217
</tr>
197218
<tr>
198-
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.ReplaceText#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit.Utils-Slice-System-Int32--Topten.RichTextKit.Editor-EditSemantics">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.Utils.Slice&lt;int&gt;, EditSemantics)</a></td>
219+
<td><a href="./../ref/Topten.RichTextKit.Editor.TextDocument.ReplaceText#Topten.RichTextKit.Editor-TextDocument.ReplaceText-Topten.RichTextKit.Editor-ITextDocumentView-Topten.RichTextKit-TextRange-Topten.RichTextKit.Utils-Slice-System-Int32--Topten.RichTextKit.Editor-EditSemantics-Topten.RichTextKit-IStyle">ReplaceText(ITextDocumentView, Topten.RichTextKit.TextRange, Topten.RichTextKit.Utils.Slice&lt;int&gt;, EditSemantics, Topten.RichTextKit.IStyle)</a></td>
199220
<td><p>Replaces a range of text with the specified text</p>
200221
</td>
201222
</tr>

doc/ref/Topten.RichTextKit.StyleManager.Update.page

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import: "../.common.page"
2727
style.</p>
2828

2929

30-
<pre class="language-csharp"><code class="language-csharp">public IStyle Update(string fontFamily = null, Nullable&lt;float&gt; fontSize = null, Nullable&lt;int&gt; fontWeight = null, Nullable&lt;SkiaSharp.SKFontStyleWidth&gt; fontWidth = 0, Nullable&lt;bool&gt; fontItalic = null, Nullable&lt;UnderlineStyle&gt; underline = null, Nullable&lt;StrikeThroughStyle&gt; strikeThrough = null, Nullable&lt;float&gt; lineHeight = null, Nullable&lt;SkiaSharp.SKColor&gt; textColor = null, Nullable&lt;SkiaSharp.SKColor&gt; backgroundColor = null, Nullable&lt;SkiaSharp.SKColor&gt; haloColor = null, Nullable&lt;float&gt; haloWidth = null, Nullable&lt;float&gt; haloBlur = null, Nullable&lt;float&gt; letterSpacing = null, Nullable&lt;FontVariant&gt; fontVariant = null, Nullable&lt;TextDirection&gt; textDirection = null, Nullable&lt;char&gt; replacementCharacter = null);</code></pre>
30+
<pre class="language-csharp"><code class="language-csharp">public IStyle Update(string fontFamily = null, Nullable&lt;float&gt; fontSize = null, Nullable&lt;int&gt; fontWeight = null, Nullable&lt;SkiaSharp.SKFontStyleWidth&gt; fontWidth = null, Nullable&lt;bool&gt; fontItalic = null, Nullable&lt;UnderlineStyle&gt; underline = null, Nullable&lt;StrikeThroughStyle&gt; strikeThrough = null, Nullable&lt;float&gt; lineHeight = null, Nullable&lt;SkiaSharp.SKColor&gt; textColor = null, Nullable&lt;SkiaSharp.SKColor&gt; backgroundColor = null, Nullable&lt;SkiaSharp.SKColor&gt; haloColor = null, Nullable&lt;float&gt; haloWidth = null, Nullable&lt;float&gt; haloBlur = null, Nullable&lt;float&gt; letterSpacing = null, Nullable&lt;FontVariant&gt; fontVariant = null, Nullable&lt;TextDirection&gt; textDirection = null, Nullable&lt;char&gt; replacementCharacter = null);</code></pre>
3131

3232

3333
<h2 id="parameters">Parameters</h2> <table class="name-description">
@@ -59,7 +59,7 @@ style.</p>
5959
<td>
6060

6161
<a href="https://docs.microsoft.com/dotnet/api/System.Nullable-1">Nullable&lt;SkiaSharp.SKFontStyleWidth&gt;</a> fontWidth
62-
= 0 </td>
62+
= null </td>
6363
<td><p>The new font width</p>
6464
</td>
6565
</tr>

0 commit comments

Comments
 (0)