Is a text box with a reply button a widget? What about just a text box? What about just a button?
Assuming all three, it sounds like you have one widget composed of two other widgets, which naturally ends up creating tree structures.
It is, in some ways, but this is not the best model to reason about code, IMHO.
Sound theoretical underpinnings are usually necessary for a coherent system that allows for good abstractions.
Note that in code while I don't say the word "tree" while writing it. I create a tree with my braces (C) or indentation levels (python) and file structure. The language designers created a syntax using a tree. And so on.
I guess what I'm saying is that while the tutorial should not say tree, and I should not be thinking about tree nodes and edges while writing it, I should be writing a tree (and in code I am).
I am familiar with the structure, but I've never found it practical as an abstract tool.
Any hierarchy (group boxes holding widgets) is purely visual, and the rectangle doesn't "own" its child widgets in a programmatic sense.
Text widgets have a fixed size. If your font gets wider (from DPI scaling or translations), text can become cut off or overflow onto the next line and disappear.
You can say that all nodes on this leaf of the tree are contained within that node... It's an elegant way to describe a UI in my opinion.
Eg: You want to move a button and you need to move its text and background shape. How do you keep track that these two elements are grouped together?
How do things change if we were to use a list instead? What becomes easier/harder?
Layout calculations might become slightly more expensive, though it seems that that may be acceptable since most time is spent rendering; and perhaps there are other ways to accelerate these calculations if needed.
The fact that most UIs are happy to provide a single linear tab order (and not something more involved that allows users to navigate the tree structure) makes me think that there might be something there.