<commit_before>/*
---
name: ART.SplitView
description: A simple horizonal double-pane split view.
requires: [ART.Widget, ART.Sheet, Core/Element.Event, Core/Element.Style, Touch/Touch, Core/Fx.Tween, More/Fx.Elements]
provides: ART.SplitView
...
*/

ART.Sheet.define('splitview.art', {
	'width': 600,
	'height': 400,
	'fixed-width': 200,
	'max-fixed-width': 400,
	'min-fixed-width': null,
	'splitter-width': 3,
	'display': 'block',
	//IE doesn't support east-west resize cursor; just use east
	'splitter-cursor': Browser.Engine.trident ? 'e-resize' : 'ew-resize',
	
	'splitter-background-color': hsb(0, 0, 50),
	'left-background-color': '#d6dde5',
	
	'right-background-color': '#fff'
});

ART.Sheet.define('splitview.art:disabled', {
	'splitter-background-color': hsb(0, 0, 70),
	'left-background-color': '#e8e8e8'
});
(function(){
	
var splitter = {
	
	Extends: ART.Widget,
	
	Implements: [Options, Events, Chain],
	
	options: {
		resizable: true, 
		foldable: true,
		hideSplitterOnFullFold: false
	},
	
	name: 'splitview',
	
	initialize: function(options){
		this.parent(options);
		this._orientations = {
			'left': this.options.orientation == "horizontal" ? "left" : "top",
			'right': this.options.orientation == "horizontal" ? "right" : "bottom",
			'bottom': 'bottom',
			'top': 'top',
			'dimension': this.options.orientation == "horizontal" ? "width" : "height"
		};
		if (this.options.orientation == "vertical") this.addClass('vertical');
		this._build();
	},

	_build: function(){
		document.id(this.canvas).dispose();
		var sheet = this.setSheet();

		this.element.addClass('art-splitview').setStyles({
			'position': 'relative',
			'width': sheet.width,
			'height': sheet.height,
			'display': sheet.display
		});
		var styles = this.options.orientation == "horizontal" ? 
			     {'float': 'left', 'overflow-x': 'auto'} : 
			     {'overflow-y': 'auto'};
		var o = this._orientations;
		this[o.left] = new Element('div', {<commit_msg>Adding the ability to return the sides of your split window.<commit_after>/*
---
name: ART.SplitView
description: A simple horizonal double-pane split view.
requires: [ART.Widget, ART.Sheet, Core/Element.Event, Core/Element.Style, Touch/Touch, Core/Fx.Tween, More/Fx.Elements]
provides: ART.SplitView
...
*/

ART.Sheet.define('splitview.art', {
	'width': 600,
	'height': 400,
	'fixed-width': 200,
	'max-fixed-width': 400,
	'min-fixed-width': null,
	'splitter-width': 3,
	'display': 'block',
	//IE doesn't support east-west resize cursor; just use east
	'splitter-cursor': Browser.Engine.trident ? 'e-resize' : 'ew-resize',
	
	'splitter-background-color': hsb(0, 0, 50),
	'left-background-color': '#d6dde5',
	
	'right-background-color': '#fff'
});

ART.Sheet.define('splitview.art:disabled', {
	'splitter-background-color': hsb(0, 0, 70),
	'left-background-color': '#e8e8e8'
});
(function(){
	
var splitter = {
	
	Extends: ART.Widget,
	
	Implements: [Options, Events, Chain],
	
	options: {
		resizable: true, 
		foldable: true,
		hideSplitterOnFullFold: false
	},
	
	name: 'splitview',
	
	initialize: function(options){
		this.parent(options);
		this._orientations = {
			'left': this.options.orientation == "horizontal" ? "left" : "top",
			'right': this.options.orientation == "horizontal" ? "right" : "bottom",
			'bottom': 'bottom',
			'top': 'top',
			'dimension': this.options.orientation == "horizontal" ? "width" : "height"
		};
		if (this.options.orientation == "vertical") this.addClass('vertical');
		this._build();
	},

	getSides: function(){
		var o = this._orientations;
		var sides = {};
		sides[o.left] = this[o.left];
		sides[o.right] = this[o.right];
		return sides;
	},
	_build: function(){
		document.id(this.canvas).dispose();
		var sheet = this.setSheet();

		this.element.addClass('art-splitview').setStyles({
			'position': 'relative',
			'width': sheet.width,
			'height': sheet.height,
			'display': sheet.display
		});
		var styles = this.options.orientation == "horizontal" ? 
			     {'float': 'left', 'overflow-x': 'auto'} : 
			     {'overflow-y': 'auto'};
		var o = this._orientations;
		this[o.left] = new Element('div', {
{'fraction_non_alphanumeric': 0.19176413255360625, 'fraction_numerical': 0.012670565302144249, 'mean_word_length': 4.13125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1858331', 'n_tokens_mistral': 1605, 'n_tokens_neox': 1424, 'n_words': 303}