14.19. Photon: the DeadbandType class and .constructor method

This way of creating a window by bringing a Phab file into Gamma is discussed in the Photon: the History Window section of this chapter.

   /*--------------------------------------------------------------------
    * Class:       DeadbandType
    * Description: Creates the Deadband Type window using PhabAttachWidgets.
    *------------------------------------------------------------------*/
   class DeadbandType
   {
     window;
   }
   
   PhabAttachWidgets (DeadbandType, anyos_assign("deadband_widgetfile"));
   
   /*--------------------------------------------------------------------
    * Method:      DeadbandType.constructor
    * Returns:     the root widget of a widget hierarchy
    * Description: Instantiates a DeadbandType window.
    *------------------------------------------------------------------*/
   method DeadbandType.constructor ()
   {
     .window = PhabRoot(.PhabInstantiate (t));
   }