diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-14 09:41:52 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-14 09:41:52 -0400 |
| commit | eac8341a4ff87882f8bf6375d2c2915510b908a5 (patch) | |
| tree | 45c232810cbeb5c25ba6be7445011e808257152e /new/ui.h | |
| parent | 652ba57a680e39938dd414ddcefac40bd26a28cb (diff) | |
More parent planning and related API changes. I now have a better handle over what I want after last night: p.SetChild() is only called by w.SetChild() and the various uiTab and uiGroup methods; everything else should call Control.SetParent(). Some renaming is needed.
Diffstat (limited to 'new/ui.h')
| -rw-r--r-- | new/ui.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -41,7 +41,6 @@ struct uiControl { void (*destroy)(uiControl *); uintptr_t (*handle)(uiControl *); void (*setParent)(uiControl *, uiParent *); - void (*removeParent)(uiControl *); void (*preferredSize)(uiControl *, uiSizing *, intmax_t *, intmax_t *); void (*resize)(uiControl *, intmax_t, intmax_t, intmax_t, intmax_t, uiSizing *); int (*visible)(uiControl *); @@ -57,7 +56,6 @@ struct uiControl { void uiControlDestroy(uiControl *); uintptr_t uiControlHandle(uiControl *); void uiControlSetParent(uiControl *, uiParent *); -void uiControlRemoveParent(uiControl *); void uiControlPreferredSize(uiControl *, uiSizing *, intmax_t *width, intmax_t *height); void uiControlResize(uiControl *, intmax_t, intmax_t, intmax_t, intmax_t, uiSizing *); int uiControlVisible(uiControl *); @@ -90,7 +88,9 @@ struct uiParent { // The uiParent should already not have a child and the uiControl should already not have a parent. // // child can be NULL, in which case the uiParent has no children. - // This form should be called by uiControl.RemoveParent(). + // This version should also call uiControl.SetParent(), passing NULL. + // + // If this uiParent has a child already, then the current child is replaced with the new one. void (*SetChild)(uiParent *p, uiControl *child); #define uiParentSetChild(p, child) ((*((p)->SetChild))((p), (child))) |
