\slide{class-widget}{The widget class}{
  interface widget : handler { 
\c{\fbox{widget}}
widget(char* p); widget(widget& w, char* p); char* type();
\c{returns type of the widget}
char* path();
\c{returns path of the widget}
int eval(char* cmd);
\c{invokes "thepath() cmd"}
char* result();
\c{returns the result of eval}
char* evaluate(char* cmd)
\c{combines eval and result()}
virtual configure(char* cmd);
\c{uses 'path()' }
virtual geometry(int xs, int ys);
\c{width x height}
widget* pack(char* opts = "" ); widget* pack(widget* w, char* = "" ); bind(char *b, handler* h, char* = "" ); bind(char *b, action& ac, char* = "" ); handler(class handler* h, char* = "" ); handler(action& ac, char* = "" ); ... void destroy();
\c{removes widget from the screen}
void* tkwin();
\c{gives access to Tk window}
widget* self();
\c{for constructing} mega widgets

void redirect(widget* w); protected: char* thepath();
\c{delivers the} virtual path

virtual install(action&,char* =""); };
}{
  interface widget : handler { 
\fbox{widget}
widget(char* p); widget(widget& w, char* p); char* type();
\c{// returns type of the widget}
char* path();
\c{// returns path of the widget}
int eval(char* cmd);
\c{// invokes "thepath() cmd"}
char* result();
\c{// returns the result of eval}
char* evaluate(char* cmd)
\c{// combines eval and result()}
virtual void configure(char* cmd);
\c{// uses 'path()' }
virtual void geometry(int xs, int ys);
\c{// width x height}
widget* pack(char* options = "" ); widget* pack(widget* w, char* options = "" ); bind(char *b, handler* h, char* args = "" ); bind(char *b, action& ac, char* args = "" ); handler(class handler* h, char* args = "" ); handler(action& ac, char* args = "" ); void xscroll(scrollbar* s);
\c{// to attach scrollbars}
void yscroll(scrollbar* s); void focus(char* options=""); void grab(char* options=""); void destroy();
\c{// removes widget from the screen}
void* tkwin();
\c{// gives access to Tk window}
widget* self();
\c{// for constructing} mega widgets
void redirect(widget* w); protected: char* thepath();
\c{// delivers} the virtual path
virtual install(action&,char* args=""); };
} }