PegPresentationManager
PegWindow1
PegPrompt1
PegPrompt2
PegButton
PegWindow2
PegCheckBox
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:
Next()
PegWindow2
PegWindow1
Previous()
First()
Parent()
PegButton
Next()
PegPrompt1
Previous()
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
9