
//
// put it in here...
//

function layeredEditor(eContainer)
{
	this.layers = new canvasLayers(eContainer);

	// put 'em in the right order... hopefully they come out in the right order...
	// what if we FAIL?
	if (this.layers.add('controlGrid') == null) throw('Could not create controlGrid layer');
	if (this.layers.add('controlPoints') == null) throw('Could not create controlPoints layer');
	if (this.layers.add('controlLines') == null) throw('Could not create controlLines layer');
	if (this.layers.add('controlPath') == null) throw('Could not create controlPath layer');
	if (this.layers.add('controlCanvas') == null) throw('Could not create controlCanvas layer');

	// backwards reference
	eContainer._layers = this;
}

layeredEditor.prototype.getCpCtx = function() {
	return this.layers.getContext('controlPoints');
}

layeredEditor.prototype.getClCtx = function() {
	return this.layers.getContext('controlLines');
}

layeredEditor.prototype.getCanvasCtx = function() {
	return this.layers.getContext('controlCanvas');
}

layeredEditor.prototype.getPathCtx = function() {
	return this.layers.getContext('controlPath');
}

layeredEditor.prototype.getGridCtx = function() {
	return this.layers.getContext('controlGrid');
}

