// // MouseMeter program // // Display location of mouse // // @author Kim Bruce // dialect "objectdraw" def MouseMeter: GraphicApplication = object { inherits graphicApplication.size(400,400) // Instructions def display:Text = text.at (150 @ 200) with ("Move the mouse") on (canvas) // display mouse location as mouse moves method onMouseMove (point: Point) -> Done { display.contents:= "({point.x},{point.y})" } // required to pop up window and start graphics startGraphics }