// Copyright Neil Ramsden 2004. All rights reserved.

// SlidePresentation classes
// Neil Ramsden
// Presentation.js
// 30 Jan 06 -> 17 Feb 06
//	Has nested slideset for frames within table.
//	Added generic frame
// 27 Aug 04 -> 1 Sep 04

// Uses: Presentation; SlideAdviceView; SlideChoiceView.
// Uses: customised.slideBaseName and slideCount.

//---------------------------------------------------------------------------

/* SlidePresentation - manages links between views and documents

A slide presentation uses a sequence of frames to display successive views.
*/

function getSlidePaneList()
//get all panes
//  return -> a list of current panes
//note: clients should configure customised.slideBaseName and slideCount
{
  var result = new Array(customised.slideCount)
  for (var i=0; i<customised.slideCount; i++) {
    frame_name = customised.slideBaseName + String(i+1)
    result[i] = eval(frame_name)
  }
  return result
}

function SlidePresentation()
//create a slide presentation object
{
  //inheritance
  this.base = Presentation;
  this.base();

  //methods
  this.getPaneList = getSlidePaneList;
  this.makeAdviceView = function(advice) { 
    return new SlideAdviceView(this, advice); };
  this.makeChoiceView = function(choice) {
    return new SlideChoiceView(this, choice); };
}
SlidePresentation.prototype = new Presentation;