diff --git a/doc/controls.md b/doc/controls.md index bf79fad1..00aae2fe 100644 --- a/doc/controls.md +++ b/doc/controls.md @@ -127,6 +127,8 @@ The child will receive a call to its `ParentChanging()` method before the actual TODO do things this way to avoid needing to check if reparenting from a container implementation, or do that manually each time? we used to have uiControlVerifySetParent()... TODO I forgot what this meant +Container implementations are free to un-parent and then immediately re-parent a child should some platform-specific need to recreate any existing OS-level relations arise. For example, on Windows, this would be how to signal that a new parent handle is available, and the child would respond by destroying its current window handles and creating new ones. Refer to each individual platform documentation for details. In particular, this means that implemenations of `ParentChanging()` and `ParentChanged()` should not make any assumptions as to why the parent is changing. + ## `uiControlImplData()` ```c diff --git a/doc/windows-controls.md b/doc/windows-controls.md index 7e28131c..4b3e7b79 100644 --- a/doc/windows-controls.md +++ b/doc/windows-controls.md @@ -58,7 +58,7 @@ uiprivExtern HWND uiWindowsControlParentHandle(uiControl *c); This is the parent from the point of view of the Windows API. When creating the window handle for a uiControl, this is the handle to use as the `hwndParent`. -The value returned by this function TODO should not be stored TODO refer to the top of this page for the control model +The value returned by this function is valid until the control's parent changes for any reason. TODO should not be stored anyway TODO use `ParentChanging()`/`ParentChanged()` to destroy/create (respectively) window handles TODO refer to the top of this page for the control model It is a programmer error to pass `NULL` for `c`. TODO a non-`uiControl`?