src/js/widgets.js
author hamidouk
Fri, 21 Oct 2011 17:26:44 +0200
branchpopcorn-port
changeset 122 04bd1e2f9674
parent 114 eda061f1aa75
child 124 2758dfb208b2
permissions -rw-r--r--
change to an internal structure.

/* the widget classes and definitions */

IriSP.Widget = function(Popcorn, config, Serializer) {

  if (config === undefined || config === null) {
    config = {}
  }
  
  this._Popcorn = Popcorn;
  this._config = config;  
  this._serializer = Serializer;
  
  if (config.hasOwnProperty("gui") && config.gui.hasOwnProperty("container")) {
     this._id = config.gui.container;
     this.selector = IriSP.jQuery("#" + this._id);
  }  
};

IriSP.Widget.prototype.draw = function() {
  /* implemented by "sub-classes" */  
};

IriSP.Widget.prototype.redraw = function() {
  /* implemented by "sub-classes" */  
};