\sli{
  class canvashandler : public handler {
  public:
  
  canvashandler( canvas* cv ) { c = cv; moving = 0; }
  
  void press( event& e) {
  	x = e.x(); y = e.y();
  	id = c->overlapping(x, y);
  	if (id) moving = 1;
  }
  
  void motion( event& e ) {
  	if (moving) {
  		id.move( e.x() - x, e.y() - y );
  		x = e.x(); y = e.y();
  		}
  }
  
  void release( event& ) { moving = 0; }
  
  protected:
  canvas* c;
  int x,y;
  int moving;
  item id;
  };
  
}