﻿function HtmlControl(_1, _2) {
   this._html = _1;
   this.isVisible = true;
   this._isPrintable = false;
   this._isSelectable = false;
   if(_2) {
      this.isVisible = (_2.visible === false) ? false : true;
      this._isPrintable = (_2.printable === true) ? true : false;
      this._isSelectable = (_2.selectable === true) ? true : false;
      }
   this.setVisible = function(_3) {
      this._div.style.display = (_3) ? "block" : "none";
      this.isVisible = _3;
      };
   }
   
HtmlControl.prototype = new GControl();

HtmlControl.prototype.initialize = function(_4) {
   this.selectable = function() {
      return this._isSelectable;
      };
   this.printable = function() {
      return this._isPrintable;
      };
   this._div = document.createElement("div");
   this._div.innerHTML = this._html;
   this.setVisible(this.isVisible);
   _4.getContainer().appendChild(this._div);
   return this._div;
   };
   
HtmlControl.prototype.getDefaultPosition = function() {
   return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));
   }; 