lib/gui/form.py
def tabScript(f):
	"""Writes the tabbing script for the GUI.
	@param f: File to write to
	"""
	openScript(f)
	f.write("""
		if (!Array.indexOf) {
			Array.prototype.indexOf = function (obj) {
				for (var i = 0;i < this.length;i++)
					if (this[i] == obj)
						return i;
				return -1;
			}
		}
		var colors = new Array()
		var tabs = new Array()
		var pages = new Array()
		function init_tabs() {
			for (var i = 0;i < pages.length;i++)
				pages[i].className = colors[i] + ' page'
			select_tab(tabs[0])
		}
		function reset_tabs() {
			for (var i = 0;i < tabs.length;i++) {
				tabs[i].className = colors[i] + ' tab'
				pages[i].style.display = 'none'
			}
		}
		function select_tab(tab) {
			reset_tabs()
			var index = tabs.indexOf(tab)
			var page = pages[index]
			tab.className = tab.className + ' selected'
			page.style.display = 'block'
		}
	""")
	closeScript(f)
Writes the tabbing script for the GUI.
	@param f: File to write to
	
Writes the tabbing script for the GUI.
Writes the tabbing script for the GUI .
def tabScript(f):
	openScript(f)
	f.write("""
		if (!Array.indexOf) {
			Array.prototype.indexOf = function (obj) {
				for (var i = 0;i < this.length;i++)
					if (this[i] == obj)
						return i;
				return -1;
			}
		}
		var colors = new Array()
		var tabs = new Array()
		var pages = new Array()
		function init_tabs() {
			for (var i = 0;i < pages.length;i++)
				pages[i].className = colors[i] + ' page'
			select_tab(tabs[0])
		}
		function reset_tabs() {
			for (var i = 0;i < tabs.length;i++) {
				tabs[i].className = colors[i] + ' tab'
				pages[i].style.display = 'none'
			}
		}
		function select_tab(tab) {
			reset_tabs()
			var index = tabs.indexOf(tab)
			var page = pages[index]
			tab.className = tab.className + ' selected'
			page.style.display = 'block'
		}
	""")
	closeScript(f)
def tabScript ( f ) : openScript ( f ) f . write ( """
		if (!Array.indexOf) {
			Array.prototype.indexOf = function (obj) {
				for (var i = 0;i < this.length;i++)
					if (this[i] == obj)
						return i;
				return -1;
			}
		}
		var colors = new Array()
		var tabs = new Array()
		var pages = new Array()
		function init_tabs() {
			for (var i = 0;i < pages.length;i++)
				pages[i].className = colors[i] + ' page'
			select_tab(tabs[0])
		}
		function reset_tabs() {
			for (var i = 0;i < tabs.length;i++) {
				tabs[i].className = colors[i] + ' tab'
				pages[i].style.display = 'none'
			}
		}
		function select_tab(tab) {
			reset_tabs()
			var index = tabs.indexOf(tab)
			var page = pages[index]
			tab.className = tab.className + ' selected'
			page.style.display = 'block'
		}
	""" ) closeScript ( f )
Writes the tabbing script for the GUI.
Writes the tabbing script for the GUI .
"""Writes the tabbing script for the GUI.
	@param f: File to write to
	"""
f
File to write to
File to write to