Create a tree view inside parent.
Add a node captioned text as the last child of parent.
Add a top-level node captioned text.
Remove every node (and release any retained item data; see setItemData).
Expand item to reveal its children.
Get the first top-level node (a null TreeItem if the tree is empty).
Retrieve the opaque pointer previously stored with setItemData.
Get the caption text of item.
Tree views prefer a generously sized box.
Get the currently selected node (a null TreeItem if none).
Translate tree-view selection-change notifications into events.
Turn WM_CONTEXTMENU into onContextMenu. The message is raised by a right-click and by the keyboard (Apps key / Shift+F10); the latter arrives with a position of (-1, -1), in which case the menu is anchored at the selected node so a keyboard user gets the menu where focus is.
Associate an opaque data pointer with item.
Select item.
Fired when a context menu is requested, carrying the relevant item and the screen position to show the menu at. Raised both by a mouse right-click (item under the cursor) and by the keyboard — the Apps key or Shift+F10 — in which case the item is the selected node and the position is anchored to it. The screen coordinates can be passed straight to showPopupMenu.
Fired when the selected node changes, carrying the newly selected item.
The control's command identifier (the hMenu child id at creation).
Set the control's text.
Get the control's text.
Assign a font to the control and request a repaint.
A reasonable default preferred size; override per control type.
Handle a WM_COMMAND notification routed from the parent.
Handle a WM_NOTIFY notification routed from the parent. Return true if it was handled. The default does nothing.
Install a subclass window procedure so the control can intercept its own messages (for example, swallowing the Enter key in a text field). Idempotent. Subclasses override processSubclassed to do the work.
Intercept a message while subclassed. Set result and return true to consume the message; return false to let default processing continue.
A hierarchical tree of selectable, expandable nodes.