What is a CaseNodeControl object?

O
ften (meaning almost always) you will want the node_output function to do something based on the level at which the current node is. E.g. all level 1 nodes display their long_num info, level 2 nodes display short_num info and level 3 display desc_text or something like that. So instead of having a complicated node_output function which has to handle all situations, we have this CaseNodeControl object which is a NodeControl object, but masquerades as a different NodeControl object depending on the level of the current node. So a declaration such as

class MyNodeControl(CaseNodeControl,
                    faqcontrols.TextOnlyNodeControl,
                    faqcontrols.TextULNodeControl):
  """This is the node control which masquerades as a
  TextULNodeControl at level 1, and as a TextOnlyNodeControl at level 2.
  All the masquerading code is in CaseNodeControl. You have to inherit
  from the other controls for typecorrectness."""

DictClasses = { 1 : faqcontrols.TextULNodeControl, 2 : faqcontrols.TextOnlyNodeControl }

creates a NodeControl object which when displaying nodes at level 1, does what TextULNodeControl does, at level 2 does what TextOnlyNodeControl does and at all other levels does not display anything.