PegWindow1
PegPrompt1
PegPrompt2
PegButton
PegWindow2
PEG provides the following functions to access and traverse this tree structure:
PegThing* PegThing::Parent(void);
PegThing* PegThing::First(void);
PegThing* PegThing::Next(void);
PegThing* PegThing::Previous(void);
Their use can best be explained using a close up view of a portion of the previous tree
diagram:
PegWindow1
First()
PegPrompt1
Again, let's take the role of PegWindow1. First() would return the first child in our
linked list of children, PegPrompt1. Parent(), although not drawn, would return the
PegPresentationManager
PegCheckBox
Next()
Previous()
Parent()
Next()
Previous()
PegWindow2
PegButton
9