/***************************************************************\
| |\  /|                                                We Put  |
| | >< Hypercosm     hc_getting_started_interface.js    3d      |
| |/  \|                                                To Work |
|***************************************************************|
|                                                               |
|        This file defines a Javascript API for a user          |
|        interface used to control SketchUp applets.            |
|                                                               |
|***************************************************************|
|                Copyright (c) 2007 Hypercosm, LLC.             |
\***************************************************************/


//
// "class" constructor
//


function HCGettingStartedInterface(element, appletSrc, commandLine, pageSoundNames, path) {
  if (!element)
    return this;

  // set optional parameter defaults
  //
  if (pageSoundNames == undefined)
    pageSoundNames = null;
  if (path == undefined)
    path = "";
  if (path && (path[path.length - 1] != "/"))
    path += "/";
  
  // call superclass constructor
  //
  HCSketchUpInterface.call(this, element, appletSrc, getGettingStartedResources(path + "applet/resources"), commandLine);
  
  // set attributes
  //
  this.pageSoundNames = pageSoundNames;
  this.path = path;
  
  return this;
}    // HCGettingStartedInterface


// inherit prototype from "superclass"
//
HCGettingStartedInterface.prototype = new HCSketchUpInterface();


//
// "object" or "instance" methods
//


HCGettingStartedInterface.prototype.onLoad = function() {

  // call superclass method
  //
  HCSketchUpInterface.prototype.onLoad.call(this);

  // add user interface toolbars
  //
  this.mouseModeButtons = new radioButtonGroup();
  this.internetToolbar = new internetToolbar("internetToolbar", this);
  this.gettingStartedToolbar = new gettingStartedToolbar("gettingStartedToolbar", this.mouseModeButtons, this);
  this.pageToolbar = new pageTabs("pageTabs", this.path, this.pageSoundNames, this);
}    // onLoad


HCGettingStartedInterface.prototype.initialize = function() {
  
  // set default initial mouse mode
  //  
  this.gettingStartedToolbar.orbitButton.setSelected(true);
  
  // call superclass method
  //
  HCSketchUpInterface.prototype.initialize.call(this);
}    // initialize
