More GLOSSARY stuff.
This commit is contained in:
parent
50e7ef6f52
commit
61ed97092a
48
GLOSSARY
48
GLOSSARY
|
@ -5,47 +5,83 @@ Instead of a traditional glossary, let's look at things the way ui does them:
|
||||||
We have
|
We have
|
||||||
a uiWindow w
|
a uiWindow w
|
||||||
which has a T t
|
which has a T t
|
||||||
|
which has a uiControl
|
||||||
|
and an H h, which is an OS resource
|
||||||
a uiControl c
|
a uiControl c
|
||||||
We call
|
We call
|
||||||
uiWindowSetChild(w, c)
|
uiWindowSetChild(w, c)
|
||||||
What happens:
|
What happens:
|
||||||
w instructs t that c should be the child it keeps track of
|
w instructs t that c should be the child it keeps track of
|
||||||
|
t.SetControl(c)
|
||||||
t instructs c that it should add its children to the OS object h backing t
|
t instructs c that it should add its children to the OS object h backing t
|
||||||
|
c.SetTHING(t)
|
||||||
t instructs c to lay itself out
|
t instructs c to lay itself out
|
||||||
|
c.Resize()
|
||||||
We now say
|
We now say
|
||||||
c is really a uiStack
|
c is really a uiStack
|
||||||
We call
|
We call
|
||||||
uiStackAppend(c, d, 2)
|
uiStackAppend(c, d, 2)
|
||||||
What happens:
|
What happens:
|
||||||
c adds d to h
|
c asks t to add d to h
|
||||||
|
t.Host(d)
|
||||||
|
t gives d h to add itself too
|
||||||
|
d.SetHost(h)
|
||||||
c asks t to let it lay itself out
|
c asks t to let it lay itself out
|
||||||
|
t.Update()
|
||||||
t tells c to lay itself out
|
t tells c to lay itself out
|
||||||
|
c.Resize()
|
||||||
We call
|
We call
|
||||||
uiStackDelete(c, 4)
|
uiStackDelete(c, 4)
|
||||||
What happens:
|
What happens:
|
||||||
c removes its fifth child from h
|
c asks t to remove its fifth child from h
|
||||||
|
t.Unhost(c.children[4])
|
||||||
|
t tells c's fifth child to unhost itself
|
||||||
|
c.children[4].UnsetHost()
|
||||||
c instructs t to tell it to lay itself out
|
c instructs t to tell it to lay itself out
|
||||||
|
t.Update()
|
||||||
t tells c to lay itself out
|
t tells c to lay itself out
|
||||||
|
c.Resize()
|
||||||
We do
|
We do
|
||||||
resize the window
|
resize the window
|
||||||
What happens:
|
What happens:
|
||||||
w resizes h
|
w resizes t, which resizes h
|
||||||
the resize of h causes t to trigger a relayout of c
|
t.Resize()
|
||||||
|
resizing h triggers a relayout of c
|
||||||
|
c.Resize()
|
||||||
We do
|
We do
|
||||||
uiWindowSetChild(w, e)
|
uiWindowSetChild(w, e)
|
||||||
What happens:
|
What happens:
|
||||||
w instructs t to stop tracking c and start tracking e
|
w instructs t to stop tracking c
|
||||||
|
t.UnsetControl(c)
|
||||||
t instructs c to remove its children from h
|
t instructs c to remove its children from h
|
||||||
|
c.UnsetTHING()
|
||||||
|
t.Unhost(d)
|
||||||
|
d.Unhost()
|
||||||
|
w instrcuts t to start tracking e
|
||||||
|
t.SetControl(e)
|
||||||
t instructs e to add its children to h
|
t instructs e to add its children to h
|
||||||
|
e.SetTHING(t)
|
||||||
t instructs e to be laid out
|
t instructs e to be laid out
|
||||||
|
e.Resize()
|
||||||
We do
|
We do
|
||||||
uiWindowDestroy(w)
|
uiWindowDestroy(w)
|
||||||
What happens
|
What happens
|
||||||
w instructs t to tell e to destroy itself
|
w instructs t to tell e to destroy itself
|
||||||
e removes its children from h and destroys them, then destroys itself
|
t.Destroy()
|
||||||
|
t tells e to unhook itself
|
||||||
|
e.UnsetTHING()
|
||||||
|
t tells e to destroy itself
|
||||||
|
e.Destroy()
|
||||||
t destroys h, then itself
|
t destroys h, then itself
|
||||||
w destroys itself
|
w destroys itself
|
||||||
|
|
||||||
Therefore, we need a name for T and H
|
Therefore, we need a name for T and H
|
||||||
We also need a term for uiStack and uiGrid
|
We also need a term for uiStack and uiGrid
|
||||||
The above uses 'children' for their children
|
The above uses 'children' for their children
|
||||||
|
|
||||||
|
CURRENT PLAN
|
||||||
|
T/THING will be called a 'parent'
|
||||||
|
H will be called a 'host'
|
||||||
|
a parent has a host, but it will NOT be accessed directly by children
|
||||||
|
instead it will use the named methods
|
||||||
|
uiStack and uiGrid, etc. will be called 'containers'
|
||||||
|
|
Loading…
Reference in New Issue