class interface OUTPUT_FORMATTER
   -- Formatters that take instructions and words from the 
   -- client, arrange them into lines and send them to an 
   -- output stream.
   -- Author: Ian Barnes
   -- $Revision: 2004.3 $
   -- $Date: 2004/03/12 00:52:27 $

creation
   make (s: OUTPUT_STREAM)
      -- Initialise
      require
         not_void: s /= Void;
         connected: s.is_connected

feature(s) from OUTPUT_FORMATTER
   -- Attribute-setting commands

   set_width (n: INTEGER)
      -- Set the maximum line length equal to n.
      require
         positive: n > 0;
         not_too_big: n <= 80

   set_justify
      -- Set to justify text between the margins

   set_right_align
      -- Set to align all text to the right

   set_left_align
      -- Set to align all text to the left (default)

   set_centre_align
      -- Set to centre all text

feature(s) from OUTPUT_FORMATTER
   -- Commands

   blank_line
      -- Put a blank line on the output, making sure to 
      -- flush anything pending

   indent
      -- Increase indentation depth

   outdent
      -- Decrease indentation depth (if possible)

   add_word (w: STRING)
      -- Add w to the end of line ejecting and starting a
      -- new line if it won't fit.
      require
         not_void: w /= Void;
         not_empty: not w.is_empty



end of OUTPUT_FORMATTER