indexing description: "[ command for setting the circle radius ]" date: "$Date$" revision: "$Revision$" class SET_CIRCLE_RADIUS inherit COMMAND create make feature -- Initialization make is -- creation procedure. do end feature {HISTORY} -- Access execute (args: TUPLE) is -- move multiple image panes -- args.item (1) :: circle: CIRCLE -- args.item (2) :: radius before: DOUBLE -- args.item (3) :: radius after: DOUBLE local dr1, dr2: DOUBLE_REF do execute_successful := False if args.count = 3 then circle ?= args.item (1) dr1 ?= args.item (2) dr2 ?= args.item (3) if circle /= Void and dr1 /= Void and dr2 /= Void then rad_before := dr1.item rad_after := dr2.item circle.set_true_radius (rad_after) circle.set_changed circle.recreate_collidable execute_successful := True end end end undo (args: TUPLE) is -- Undo command require else circle_not_void: circle /= Void do circle.set_true_radius (rad_before) circle.set_changed circle.recreate_collidable execute_successful := False undo_successful := True redo_successful := False end redo (args: TUPLE) is -- Redo command require else circle_not_void: circle /= Void do circle.set_true_radius (rad_after) circle.set_changed circle.recreate_collidable execute_successful := False undo_successful := False redo_successful := True end name: STRING is "set circle radius" -- The name of the current command feature -- Implementation circle: CIRCLE -- backup of the list of image panes rad_before, rad_after: DOUBLE -- saved radii end