Module: ScreenDump

Included in:
AppleText, AtariText, Trs80Text
Defined in:
lib/native_file_types/generic/ScreenDump.rb

Instance Method Summary collapse

Instance Method Details

#to_screendumpObject



7
8
9
10
11
12
13
14
15
# File 'lib/native_file_types/generic/ScreenDump.rb', line 7

def to_screendump
  lines=to_text.split("\n")
  max_line_length=(lines.collect{|l| l.length}).max
  screen_width= (max_line_length>file_system_image.host_system.default_screen_width && max_line_length<file_system_image.host_system.max_screen_width ) ? file_system_image.host_system.max_screen_width : file_system_image.host_system.default_screen_width

#    puts "#{filename} max length - #{max_line_length} - cols #{screen_width}"
  file_system_image.host_system.to_screendump(text_for_screendump,screen_width)
  
end