package FormatFFF3;

# PACKAGE : FormatFFF3
# PURPOSE : Contains the Folio Views V3 specific tags information
# AUTHOR  : William Chesters (WilliamC@dai.ed.ac.uk)
# CREATED : 1 Sep 1998
#-----------------------------------------------------------------------------

# Modification History Log
# ========================
# Who                      When       What
#-----------------------------------------
# Williamc@dai.ed.ac.uk    31/08/98   Write
# Tim@paneris.co.uk        31/08/98   Rename
#-----------------------------------------

use DX::Format;

@ISA = ('FormatFFF4');

%default_values = (
    'baseshift'          => 0,
    'alignment'          => 'left',
#    for (temp_int = 0; temp_int < max_tabs; temp_int++)
#    {
#           "tabs[temp_int]"  => 0,  
#    }
    'tabstops'           => [], # tabstopsParse('1,2,"foo"');  
    'left_indent'        => 0,  
    'first_line_indent'  => 0,
    'right_indent'       => 0,  
    'leading'            => 0,
    'space_before'       => 0,
    'space_after'        => 0,
    'grid_lock_flag'     => 1,
    'language'           => " ",
    'hyphenation'        => " ",
    'rule_above'        => new Rule,
    'rule_below'        => new Rule,
    'drop_cap'           => 0,
    'dc_char_count'      => 0,
    'dc_line_count'      => 0,
    'keep_with'          => 0,
    'keep_together'      => 0,
    'kt_start_line'      => 0,
    'kt_end_line'        => 0,


    'plain'              => 1, 
    'bold'               => 0,
    'italic'             => 0,   
    'outline'            => 0,
    'shadow'             => 0, 
    'underline'          => 0,
    'wordunderline'      => 0,
    'strikethrough'      => 0,
    'all_caps'           => 0,  
    'small_caps'         => 0,   
    'superscript'        => 0,
    'subscript'          => 0,
    'superior'           => 0,
    'font_name'          => 'Times-Roman',
    'font_size'          => 10,
    'colour'             => ' ',
    'shade_percent'      => 0,
    'hscale_percent'     => 0,
    'vscale_percent'     => 0,
    'kern'               => 0,
    'track'              => 0, 

);

#-------------------------------------
sub blockOutput {
  shift;
  '<' . join(',', @_) . '>';
}

sub definitionOutput {
  my $self = shift;
  my $name = shift;

  $self->definition_header .
  $self->attribBlockOutput('name', $name, @_) .
  $self->definition_footer ;
}

sub invocationOutput {
  $_[0]->blockOutput($_[0]->concreteAttribValueOutput('PS', $_[1]));
}

sub new {
  bless {};
}

sub header
{
  return <<end_of_text;
<CM> ***********************************************
     ** Folio Flat File Version 3                 **
     ** http//www.paneris.co.uk/                  **
     *********************************************** </CM>

end_of_text
}

sub footer
{
  return "<RD>\n";
}

sub definition_header
{
  return <<end_of_text;
<CM> ***********************************************
     ** Folio Flat File Version 3                 **
     ** http//www.paneris.co.uk/                  **
     *********************************************** </CM>

end_of_text
}



sub definition_footer
{
  return <<end_of_text;
<CM> ***********************************************
     **          Infobase Information             **
     *********************************************** </CM>
end_of_text
}

sub copy {

    my($self) = shift;

    # Create the anonymous hash reference to hold the object's data.

    my %copy = %$self;

    return bless \%copy;  
}


1;

