interface widget : handler { 
      
      widget(char* p); 
      widget(widget& w, char* p); 
      
      char* type();                // returns type of the widget
      char* path();                // returns path of the widget
      
      int eval(char* cmd);         // invokes "thepath() cmd"
      char* result();              // returns the result of eval
      char* evaluate(char* cmd);   // combines eval and result()
      
      virtual void configure(char* cmd);  // invokes Tk configure 
      virtual void geometry(int w, int h); // determines w x h
      
      widget* pack(char* options = "" ); // maps it to the screen
      
      bind(char *b, handler* h, char* args = "" );  // binding
  
      bind(handler* h, char* args = "" );           // implicit
      
      void xscroll(scrollbar* s);        // to attach scrollbars
      void yscroll(scrollbar* s);
      
      void focus(char* options="");
      void grab(char* options="");
      
      void destroy();             // to remove it from the screen
      
      void* tkwin();  // gives access to Tk_Window implementation
      
      widget* self();            // for constructing mega widgets
      void redirect(widget* w);
  
    protected:
      char* thepath();                // delivers the virtual path
      void alias( widget* );          // to create widget command
      virtual install(binding*,char* args="");  // default bindings
      virtual direct(char* bnd, binding*, char* args=""); // effect
    };
  

slide: The widget interface