indexing description: "This is a special view of a puzzle. This view does not allow deletion and draws the parts always correct." author: "Stefan Hildenbrand and Team UC" date: "$Date$" revision: "$Revision$" class UC_TO_SPACE inherit UC_PUZZLE_VIEW redefine draw end create make feature draw (a_surface: EM_SURFACE) is -- Draw `Current' to `a_surface' -- this draws the parts in this workspace in a sorted way local cursor: DS_LINKED_LIST_CURSOR [EM_DRAWABLE] pv : UC_PUZZLE_PART_VIEW -- needed for casting do -- Draw all contained objects. cursor := new_cursor from cursor.start until cursor.off loop pv ?= cursor.item if pv /= void then pv.draw_solved (a_surface, x ,y) end cursor.forth end end feature -- Status report save: STRING is -- give a string back that holds all information for saving this workspace local str: STRING -- string to be resulted ppv: UC_PUZZLE_PART_VIEW -- puzzle part view that actually will be saved do create str.make_empty from start until after loop ppv ?= item_for_iteration str.append (ppv.save) -- all the information from the ppv to the file str.append ("%N") -- put a new line at the end forth end Result := str ensure Result_not_Void: Result /= Void end end -- class UC_TO_SPACE