class drawmode {\fbox{drawmode}
public: enum { move, box, circle, arrow, lastmode }; }; class tablet : public canvas {\fbox{tablet}
public: tablet(widget* w, char* options=""); int operator()() {\fbox{}
return handlers[ mode] ->dispatch(tk,argc,argv); } void mode(char* m); protected: void init(char* options); int _mode; class handler* handlers[drawmode::lastmode]; canvas* c; };