4
4
namespace Unity . Samples . ScreenReader
5
5
{
6
6
/// <summary>
7
- /// This represents a sub hierarchy of an AccessibilityHierarchy created from a specific node that is used
8
- /// as root for the sub hierarchy.
7
+ /// This represents a sub- hierarchy of an AccessibilityHierarchy created from a specific node that is used
8
+ /// as root for the sub- hierarchy.
9
9
/// </summary>
10
10
public struct AccessibilitySubHierarchy
11
11
{
12
12
/// <summary>
13
- /// The main accessibility hierarchy that this sub hierarchy belongs to.
13
+ /// The main accessibility hierarchy that this sub- hierarchy belongs to.
14
14
/// </summary>
15
15
public AccessibilityHierarchy mainHierarchy { get ; private set ; }
16
16
17
17
/// <summary>
18
- /// Returns the node used as root for this sub hierarchy.
18
+ /// Returns the node used as root for this sub- hierarchy.
19
19
/// </summary>
20
20
public AccessibilityNode rootNode { get ; private set ; }
21
21
22
22
/// <summary>
23
- /// Returns true if this sub hierarchy is valid.
23
+ /// Returns true if this sub- hierarchy is valid.
24
24
/// </summary>
25
25
public bool isValid => mainHierarchy != null ;
26
26
27
27
/// <summary>
28
- /// Constructs a sub hierarchy from the specified hierarchy and root node.
28
+ /// Constructs a sub- hierarchy from the specified hierarchy and root node.
29
29
/// </summary>
30
30
/// <param name="mainHierarchy"></param>
31
31
/// <param name="rootNode"></param>
@@ -43,13 +43,13 @@ public AccessibilitySubHierarchy(AccessibilityHierarchy mainHierarchy, Accessibi
43
43
throw new System . ArgumentException ( "The root node must belong to the main hierarchy." , nameof ( rootNode ) ) ;
44
44
}
45
45
46
- // Note: if the root element is null then the sub hierarchy represents the whole hierarchy.
46
+ // Note: if the root element is null then the sub- hierarchy represents the whole hierarchy.
47
47
this . mainHierarchy = mainHierarchy ;
48
48
this . rootNode = rootNode ;
49
49
}
50
50
51
51
/// <summary>
52
- /// Disposes the sub hierarchy removing the root node from the main hierarchy.
52
+ /// Disposes the sub- hierarchy removing the root node from the main hierarchy.
53
53
/// </summary>
54
54
public void Dispose ( )
55
55
{
@@ -63,7 +63,7 @@ public void Dispose()
63
63
}
64
64
65
65
/// <summary>
66
- /// Returns true if the specified node belongs to this sub hierarchy.
66
+ /// Returns true if the specified node belongs to this sub- hierarchy.
67
67
/// </summary>
68
68
/// <param name="node"></param>
69
69
/// <returns></returns>
@@ -79,7 +79,7 @@ public bool ContainsNode(AccessibilityNode node)
79
79
return false ;
80
80
}
81
81
82
- // We know the node is in the main hierarchy, now we need to check if it's part of this sub hierarchy.
82
+ // We know the node is in the main hierarchy, now we need to check if it's part of this sub- hierarchy.
83
83
var parentNode = node . parent ;
84
84
85
85
while ( parentNode != null )
@@ -96,7 +96,7 @@ public bool ContainsNode(AccessibilityNode node)
96
96
}
97
97
98
98
/// <summary>
99
- /// Tries to get the node with the specified id if it belongs to this sub hierarchy.
99
+ /// Tries to get the node with the specified id if it belongs to this sub- hierarchy.
100
100
/// </summary>
101
101
/// <param name="id">The id of the node to seek</param>
102
102
/// <param name="node">The node found</param>
@@ -114,7 +114,7 @@ public bool TryGetNode(int id, out AccessibilityNode node)
114
114
}
115
115
116
116
/// <summary>
117
- /// Tries to get the node at the specified position if it belongs to this sub hierarchy.
117
+ /// Tries to get the node at the specified position if it belongs to this sub- hierarchy.
118
118
/// </summary>
119
119
/// <param name="horizontalPosition">The x position</param>
120
120
/// <param name="verticalPosition">The y position</param>
@@ -155,7 +155,7 @@ public AccessibilityNode InsertNode(int childIndex, string label = null, Accessi
155
155
{
156
156
if ( parent != null && ! ContainsNode ( parent ) )
157
157
{
158
- Debug . LogError ( "The specified parent node does not belong to this sub hierarchy." ) ;
158
+ Debug . LogError ( "The specified parent node does not belong to this sub- hierarchy." ) ;
159
159
return null ;
160
160
}
161
161
@@ -184,7 +184,7 @@ public bool MoveNode(AccessibilityNode node, AccessibilityNode newParent, int ne
184
184
}
185
185
186
186
/// <summary>
187
- /// Removes the specified node from this sub hierarchy.
187
+ /// Removes the specified node from this sub- hierarchy.
188
188
/// </summary>
189
189
/// <param name="node">The node to remove</param>
190
190
/// <param name="removeChildren"></param>
@@ -199,7 +199,7 @@ public void RemoveNode(AccessibilityNode node, bool removeChildren = true)
199
199
}
200
200
201
201
/// <summary>
202
- /// Removes all nodes from this sub hierarchy.
202
+ /// Removes all nodes from this sub- hierarchy.
203
203
/// </summary>
204
204
public void Clear ( )
205
205
{
@@ -213,22 +213,22 @@ public void Clear()
213
213
}
214
214
else
215
215
{
216
- // If the sub hierarchy has no root node, we clear the whole hierarchy.
216
+ // If the sub- hierarchy has no root node, we clear the whole hierarchy.
217
217
mainHierarchy . Clear ( ) ;
218
218
}
219
219
}
220
220
221
221
/// <summary>
222
- /// Refreshes the frames of all nodes in this sub hierarchy.
222
+ /// Refreshes the frames of all nodes in this sub- hierarchy.
223
223
/// </summary>
224
224
public void RefreshNodeFrames ( )
225
225
{
226
- // TODO: Optimize to only refresh nodes in this sub hierarchy.
226
+ // TODO: Optimize to only refresh nodes in this sub- hierarchy.
227
227
mainHierarchy . RefreshNodeFrames ( ) ;
228
228
}
229
229
230
230
/// <summary>
231
- /// Returns the lowest common ancestor of the two specified nodes if they both belong to this sub hierarchy.
231
+ /// Returns the lowest common ancestor of the two specified nodes if they both belong to this sub- hierarchy.
232
232
/// </summary>
233
233
/// <param name="firstNode">The first node</param>
234
234
/// <param name="secondNode">The second node</param>
0 commit comments