code: def focus_cb(self, viewer, channel):
          
          chname = channel.name
  
          if self.active != chname:
              # focus has shifted to a different channel than our idea
              # of the active one
              self.active = chname
              self.set_info("Focus is now in channel '%s'" % (
                  self.active))
          return True
docs: Callback from the reference viewer shell when the focus changes
          between channels.