include "libdom.sol" xml xuldev xul window id="editext", title="Scriptol Xul Dev - Version Alpha 1.0.3", align="center", orient="horizontal" , xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" , xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" script ~~ window.screenX = (screen.width - window.width) / 2; window.screenY = (screen.height - windows.height) /2; ~~ /script vbox flex="1" minwidth="800" minheight="568" vbox height="54" `` ===== MENU ===== toolbox flex="1" height="24" menubar id="mainmenu" menu id="file-menu" label="File" menupopup id="file-popup" menuitem label="New" / menuitem label="Open" accesskey="o" / menuitem label="Save" accesskey="s" / menuseparator / menuitem label="Exit" accesskey="q" oncommand="window.close()" / /menupopup /menu menu id="edit-menu" label="Edit" menupopup id="edit-popup" menuitem label="Undo" accesskey="z" / menuitem label="Redo" / menuitem label="Cut" accesskey="x"/ menuitem label="Copy" accesskey="c"/ menuitem label="Paste" accesskey="v" disabled="true"/ /menupopup /menu spacer flex="1" / menu id="help-menu" label="Help" menupopup id="help-popup" menuitem label="Help" / menuitem label="About" oncommand="aboutDisplay();" / /menupopup /menu /menubar /toolbox ``===== TOOLBAR ===== toolbox orient="horizontal" height="30" maxheight="30" deck id="toolbar1" selectedIndex="0" flex="1" stack toolbar flex="1" box button label="compile" oncommand="compile()" / button label="run" oncommand="execute()" / /box box id="createnew" button label="Add window" oncommand="addButton();"/ /box spacer flex="1" / hbox align="right" button label="Find" height="24" width="60" oncommand="myfunc2()" / textbox id="directSearch" style="min-width: 200px;max-height: 24px;", flex="1", value="" / checkbox id="directCase" label="Ignore Case" command="nothing" / //spacer flex="1" style="max-height: 30px;" / /hbox /toolbar /stack /deck /toolbox /vbox `` Main Panel hbox flex="1" `` ===== LEFT PANEL ===== vbox flex="1" maxwidth="240" box flex="1" groupbox orient="vertical" flex="1" width="240" caption label="Workspace" / box height="24" button label="Add" height="20" oncommand="addFile()" image src="images/Open24.gif" / description value="Add" / /button button label="Delete" height="20" oncommand="delFile()" / /box panel height="4" /panel tabbox pack="center" flex="1" width="240" tabs tab label="Files"/ tab label="Tree" / tab label="Objects"/ /tabs tabpanels flex="1" // FILES tabpanel id="files" flex="1" hbox listbox datasources="files.rdf" ref="http://www.xul.fr/all-files" listhead listheader label="Name"/ listheader label="Size"/ /listhead listcols listcol flex="1"/ listcol flex="2"/ /listcols template rule listitem uri="rdf:*" listcell id="name" label="rdf:http://www.xul.fr/rdf#name" / listcell id="size" label="rdf:http://www.xul.fr/rdf#size" / /listitem /rule /template /listbox /hbox /tabpanel // TREE tabpanel id="tree" flex="1" hbox tree flex="1" width="200" height="200", datasources="disktree.rdf" ref="http://www.xul.fr/sources" treecols treecol id="name" label="Name" primary="true" flex="1"/ treecol id="size" label="Size" flex="1"/ /treecols template rule treechildren treeitem uri="rdf:*" treerow treecell label="rdf:http://www.xul.fr/rdf#name"/ treecell label="rdf:http://www.xul.fr/rdf#size"/ /treerow /treeitem /treechildren /rule /template /tree /hbox /tabpanel // CLASSES, OBJECTS tabpanel id="classes" flex="1" tree flex="1" width="200" height="200", datasources="classes.rdf" ref="http://www.xul.fr/all-classes" treecols treecol id="name" label="Classe" primary="true" flex="1"/ /treecols template rule treechildren treeitem uri="rdf:*" treerow treecell label="rdf:http://www.xul.fr/rdf#name"/ /treerow /treeitem /treechildren /rule /template /tree /tabpanel /tabpanels /tabbox /groupbox /panel /vbox splitter id="identifier" state="open" collapse="none" , resizebefore="closest", resizeafter="closest" /splitter `` ===== Main Top Panel ===== tabbox pack="center" flex="1" // minheight="400" minwidth="560" tabs tab label="Source"/ tab label="Another source"/ /tabs tabpanels flex="1" tabpanel id="source1" flex="1" textbox id="thetext" style="min-width: 400px;", flex="1", multiline="true" value="Nothing..." / /* hbox vbox flex="1" label control="t1" value="Search results:" / textbox id="results" style="min-width: 400px;", flex="1", multiline="false" value="empty" / /vbox vbox style="min-width: 150px;", flex="1", align="start" label control="l2" value="Searching:" / textbox id="mytext" style="min-width: 200px;max-height: 20px;", flex="1", value="" / checkbox id="casemode" label="Ignore Case" oncommand="myfunc()" / spacer flex="1" style="max-height: 30px;" / button label="Find" oncommand="myfunc2()" / spacer flex="1" style="max-height: 30px;" / label control="case" value="insensitive" / /vbox /hbox */ /tabpanel tabpanel id="texttab" flex="1" textbox id="thetext" style="min-width: 320px;", flex="1", multiline="true" value="Nothing yet..." / //editor src="about.xul" / //button label="Edit" style="max-height: 20px;", // oncommand="this.previousSibling.makeEditable('html',false);" / /tabpanel /tabpanels /tabbox `` ===== RIGTH PANEL ===== vbox flex="1" maxwidth="140" groupbox orient="vertical" flex="1" width="140" caption label="Widgets" / box height="24" button label="Add" height="20" oncommand="addFile()" image src="images/Open24.gif" / description value="Add" / /button //button label="Delete" height="20" oncommand="delFile()" / /box panel height="4" /panel // Widgets panel id="widgets" flex="1" hbox listbox datasources="widgets.rdf" ref="http://www.xul.fr/all-files" listhead listheader label="Name"/ /listhead listcols listcol flex="1"/ /listcols template rule listitem uri="rdf:*" listcell id="name" label="rdf:http://www.xul.fr/rdf#name" / /listitem /rule /template /listbox /hbox /panel /groupbox /vbox /hbox statusbar statusbarpanel label="Line number" / statusbarpanel label="Column" / statusbarpanel icon="SCRIPTOL" / statusbarpanel label="Welcome" progressmeter value="300" / /statusbarpanel /statusbar /vbox script ~~ function myfunc() { var b; b = document.getElementById('casemode').getAttribute('value'); var t; if(b == true) t = "sensitive"; else t = "insensitive"; document.getElementById('case').setAttribute('value', t); } function myfunc2(x, y) { document.getElementById('results').setAttribute('value','searching...'); alert(document.getElementById('directSearch').getAttribute('value')); return y; } function compile( x, y) { alert("compiling..."); return y; } function execute(x, y) { alert("launched..."); return y; } function addFile() { alert("add.."); } function delFile() { alert("delete.."); } function addButton() { aboutDisplay(); aBox = document.getElementById("createnew"); button = document.createElement("newbutton"); button.setAttribute("label","new button"); aBox.appendChild(button); window.sizeToContent(); } function aboutDisplay() { window.open("about.xul","About Scriptol Dev", "chrome"); } ~~ /script /window /xml print "Scriptol Xul Dev" dom xuldemo xuldemo.build() xuldemo.save("chrome/content/xuldev/xuldev.xul") print "xuldev.xul created..." text command = "c:\\xulrunner\\xulrunner xuldev.ini" print command system(command)