libui/parentplan

57 lines
783 B
Plaintext
Raw Normal View History

current situation
let's say the control hierarchy is
w window
p parent
c stack
d stack
e button
f button
g button
h button
i entry
w = NewWindow()
p = NewParent(w.Handle)
w.SetChild(c)
p.SetMainControl(c)
c.SetParent(p)
d.SetParent(p)
e.SetParent(p)
f.SetParent(p)
g.SetParent(p)
2015-04-13 21:31:22 -05:00
p.Update()
c.Resize()
c.Add(h)
h.SetParent(p)
p.Update()
c.Resize()
d.Remove(1)
f.SetParent(NULL)
p.Update()
c.Resize()
g.Hide()
p.Update()
c.Resize()
w.SetChild(i)
p.SetMainControl(i)
c.SetParent(NULL)
d.SetParent(NULL)
...
i.SetParent(p)
...
p.Update()
i.Resize()
w.SetChild(NULL)
p.SetMainControl(NULL)
i.SetParent(NULL)
p.Update()
w.SetChild(i)
(again)
w.Destroy()
p.Destroy()
i.Destroy()
2015-04-14 08:43:18 -05:00
TODO
- p.DeferUpdate()/p.EndDeferUpdate()