indexing description: "[ Removes an image pane. ]" date: "$Date$" revision: "$Revision$" class REMOVE_PANE inherit COMMAND create make feature -- Initialization make is -- creation procedure. do end feature {HISTORY} -- Access execute (args: TUPLE) is -- remove an image pane -- args.item (1) :: image_panes: HEAP_PRIORITY_QUEUE_WALKABLE [IMAGE_PANE] -- args.item (2) :: image_pane: IMAGE_PANE local i: INTEGER do execute_successful := False if args.count = 2 then image_panes ?= args.item (1) image_pane ?= args.item (2) if image_panes /= Void and image_pane /= Void then -- remove the item from the list i := image_panes.count image_panes.prune (image_pane) if image_panes.count < i then -- the object was delted execute_successful := True end end end end undo (args: TUPLE) is -- Undo command require else image_panes_not_void: image_panes /= Void image_pane_not_void: image_pane /= Void do -- create image pane again image_panes.put (image_pane) execute_successful := False undo_successful := True redo_successful := False end redo (args: TUPLE) is -- Redo command require else image_panes_not_void: image_panes /= Void image_pane_not_void: image_pane /= Void do image_panes.prune (image_pane) execute_successful := False undo_successful := False redo_successful := True end name: STRING is "remove image pane" -- The name of the current command feature -- Implementation image_panes: HEAP_PRIORITY_QUEUE_WALKABLE [IMAGE_PANE] -- reference to `image_panes' image_pane: IMAGE_PANE -- reference to the pane end