Option Explicit
Private parentElem As Collection
Private childElem As Collection
Public Function GetParentElem(ByVal key As String) As Variant
GetParentElem = parentElem(key)
End Function
Public Function GetChildElem(ByVal key As String) As Variant
GetChildElem = childElem(key)
End Function
Private Sub Class_Terminate()
Set parentElem = Nothing
Set childElem = Nothing
End Sub
Private Sub Class_Initialize()
Set parentElem = New Collection
Set childElem = New Collection
parentElem.Add Array("ribbon"), "tabs"
parentElem.Add Array("tabs"), "tab"
parentElem.Add Array("tab"), "group"
parentElem.Add Array("group", "box"), "box"
parentElem.Add Array("group", "box"), "buttonGroup"
parentElem.Add Array("group", "box", "buttonGroup", "menu", "splitButton"), "menu"
parentElem.Add Array("buttonGroup", "menu"), "dynamicMenu"
'parentElem.Add Array("group", "box", "buttonGroup", "dropDown", "gallery", "menu", "splitButton"), "button"
parentElem.Add Array("group", "box", "buttonGroup", "dropDown", "gallery", "menu"), "button"
parentElem.Add Array("group", "box", "buttongroup", "menu"), "splitButton"
parentElem.Add Array("group", "box", "menu"), "checkBox"
parentElem.Add Array("group", "box"), "comboBox"
parentElem.Add Array("group", "box"), "dropDown"
parentElem.Add Array("group", "box", "buttonGroup", "menu"), "gallery"
parentElem.Add Array("comboBox", "dropDown", "gallery"), "item"
parentElem.Add Array("group", "box"), "labelControl"
parentElem.Add Array("group"), "separator"
parentElem.Add Array("menu"), "menuSeparator"
childElem.Add Array("tabs"), "ribbon"
childElem.Add Array("tab"), "tabs"
childElem.Add Array("group"), "tab"
childElem.Add Array("box", "button", "buttonGroup", "checkBox", "comboBox", "control", "dialogBoxLauncher", "dropDown", "dynamicMenu", "editBox", "gallery", "labelControl", "menu", "separator", "splitButton", "toggleButton"), "group"
childElem.Add Array("box", "button", "buttonGroup", "checkBox", "comboBox", "control", "dropDown", "dynamicMenu", "editBox", "gallery", "labelControl", "menu", "splitButton", "toggleButton"), "box"
childElem.Add Array("button", "control", "dynamicMenu", "gallery", "menu", "splitButton", "toggleButton"), "buttonGroup"
childElem.Add Array("menu"), "splitButton"
'childElem.Add Array("button", "menu", "toggleButton"), "splitButton"
childElem.Add Array("button", "checkBox", "control", "dynamicMenu", "gallery", "menu", "menuSeparator", "splitButton", "toggleButton"), "menu"
childElem.Add Array("button", "checkBox", "control", "dynamicMenu", "gallery", "menu", "menuSeparator", "splitButton", "toggleButton"), "dynamicMenu"
childElem.Add Array("item"), "comboBox"
childElem.Add Array("button ", "item"), "dropDown"
childElem.Add Array("button ", "item"), "gallery"
End Sub