On Mon Oct 24 21:21:44 2022 +0000, Esme Povirk wrote:
I'd like to know a little bit more about how "tree structure" return will be implemented for scopes other then TreeScope_Element. I am not sure it makes sense to hard-code specific values.
AFAICT, most things don't make use of cache requests with anything other than `TreeScope_Element`, which is why I've chosen to implement it this way. I intend to eventually use this in `UiaFind()`, and even there, when it's used from the managed API [here,](https://github.com/madewokherd/wpf/blob/06d2867166ba990f8ab8725d1c1081034270...) the TreeScope arguments get converted into depth values for `UiaFind()`.
If we wanted to actually implement TreeScopes other than `TreeScope_Element`, the behavior would be similar to how `UiaFind()` ends up functioning. We would just have the depth increment/decrements make changes to the returned tree structure string. But, like I said, I don't believe anything really uses the TreeScope variable inside of the cache request, and I had no intention of implementing anything other than `TreeScope_Element`.