diff --git a/.gitignore b/.gitignore
index 04f175ff..59ec847b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,21 +2,20 @@
.DS_Store
*.swp
*.tmp
+*~
# Project files that should not be in the repo
-.project
-.settings/
-.settings.xml
-.settings
-.c9settings.xml
-.c9revisions
-.settings.xml.old
+.*
+\#*
+!/.gitignore
.*.gz
+*.tmTheme.js
# A handy place to put stuff that git should ignore:
/ignore/
node_modules/
-tool/node_modules/
+jam/
+* *
.git-ref
npm-debug.log
diff --git a/.gitmodules b/.gitmodules
index 4678c516..07bbe371 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
[submodule "doc/wiki"]
path = doc/wiki
- url = git://github.com/ajaxorg/ace.wiki.git
+ url = https://github.com/ajaxorg/ace.wiki.git
[submodule "build"]
path = build
- url = git://github.com/ajaxorg/ace-builds.git
+ url = https://github.com/ajaxorg/ace-builds.git
diff --git a/CNAME b/CNAME
new file mode 100644
index 00000000..75431b15
--- /dev/null
+++ b/CNAME
@@ -0,0 +1 @@
+ace.c9.io
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..062af59c
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,15 @@
+Contributing
+------------
+
+Ace is a community project and wouldn't be what it is without contributions! We actively encourage and support contributions. The Ace source code is released under the BSD License. This license is very simple, and is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!
+
+Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. To protect the interests of the Ace contributors and users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is the simplest of agreements, requiring that the contributions you make to an ajax.org project are only those you're allowed to make. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes ten minutes, and only needs to be completed once.
+
+There are two versions of the agreement:
+
+1. [The Individual CLA](https://docs.google.com/a/c9.io/forms/d/1MfmfrxqD_PNlNsuK0lC2KSelRLxGLGfh_wEcG0ijVvo/viewform): use this version if you're working on the Cloud9 SDK or open source projects in your spare time, or can clearly claim ownership of copyright in what you'll be submitting.
+2. [The Corporate CLA](https://docs.google.com/a/c9.io/forms/d/1vFejn4111GdnCNuQ6BfnJDaxdsUEMD4KCo1ayovAfu0/viewform): have your corporate lawyer review and submit this if your company is going to be contributing to the Cloud9 SDK and/or open source projects.
+
+If you want to contribute to the Cloud9 SDK and/or open source projects please go to the online form, fill it out and submit it.
+
+Happy coding, Cloud9
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 8662233a..3077d171 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,185 @@
+Version 1.2.0-pre
+
+* New Features
+ - Indented soft wrap (danyaPostfactum)
+
+* API Changes
+ - unified delta types `{start, end, action, lines}` (Alden Daniels https://github.com/ajaxorg/ace/pull/1745)
+ - "change" event listeners on session and editor get delta objects directly
+
+2015.04.03 Version 1.1.9
+
+ - Small Enhancements and Bugfixes
+
+2014.11.08 Version 1.1.8
+
+* API Changes
+ - `editor.commands.commandKeyBinding` now contains direct map from keys to commands instead of grouping them by hashid
+
+* New Features
+ - Improved autoindent for html and php modes (Adam Jimenez)
+ - Find All from searchbox (Colton Voege)
+
+* new language modes
+ - Elixir, Elm
+
+2014.09.21 Version 1.1.7
+
+* Bugfixes
+ - fix several bugs in autocompletion
+ - workaround for inaccurate getBoundingClientRect on chrome 37
+
+2014.08.17 Version 1.1.6
+
+* Bugfixes
+ - fix regression in double tap to highlight
+ - Improved Latex Mode (Daniel Felder)
+
+* API Changes
+ - editor.destroy destroys editor.session too (call editor.setSession(null) to prevent that)
+
+* new language modes
+ - Praat (José Joaquín Atria)
+ - Eiffel (Victorien Elvinger)
+ - G-code (Adam Joseph Cook)
+
+2014.07.09 Version 1.1.5
+
+* Bugfixes
+ - fix regression in autocomplete popup
+
+* new language modes
+ - gitignore (Devon Carew)
+
+2014.07.01 Version 1.1.4
+
+* New Features
+ - Highlight matching tags (Adam Jimenez)
+ - Improved jump to matching command (Adam Jimenez)
+
+* new language modes
+ - AppleScript (Yaogang Lian)
+ - Vala
+
+2014.03.08 Version 1.1.3
+
+* New Features
+ - Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman)
+ - Add ColdFusion behavior (Abram Adams)
+ - add showLineNumbers option
+ - Add html syntax checker (danyaPostfactum)
+
+* new language modes
+ - Gherkin (Patrick Nevels)
+ - Smarty
+
+2013.12.02 Version 1.1.2
+
+* New Features
+ - Accessibility Theme for Ace (Peter Xiao)
+ - use snipetManager for expanding emmet snippets
+ - update jshint to 2.1.4
+ - improve php syntax checker (jdalegonzalez)
+ - add option for autoresizing
+ - add option for autohiding vertical scrollbar
+ - improvements to highlighting of xml like languages (danyaPostfactum)
+ - add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others)
+ - add option to merge similar changes in undo history
+ - add scrollPastEnd option
+ - use html5 dragndrop for text dragging (danyaPostfactum)
+
+* API Changes
+ - fixed typo in HashHandler commmandManager
+
+* new language modes
+ - Nix (Zef Hemel)
+ - Protobuf (Zef Hemel)
+ - Soy
+ - Handlebars
+
+2013.06.04 Version 1.1.1
+
+ - Improved emacs keybindings (Robert Krahn)
+ - Added markClean, isClean methods to UndoManager (Joonsoo Jeon)
+ - Do not allow `Toggle comments` command to remove spaces from indentation
+ - Softer colors for indent guides in dark themes
+
+* new language modes
+ - Ada
+ - Assembly_x86
+ - Cobol
+ - D
+ - ejs
+ - MATLAB
+ - MySQL
+ - Twig
+ - Verilog
+
+2013.05.01, Version 1.1.0
+
+* API Changes
+ - Default position of the editor container is changed to relative. Add `.ace_editor {position: absolute}` css rule to restore old behavior
+ - Changed default line-height to `normal` to not conflict with bootstrap. Use `line-height: inherit` for old behavior.
+ - Changed marker types accepted by session.addMarker. It now accepts "text"|"line"|"fullLine"|"screenLine"
+ - Internal classnames used by editor were made more consistent
+ - Introduced `editor.setOption/getOption/setOptions/getOptions` methods
+ - Introduced positionToIndex, indexToPosition methods
+
+* New Features
+ - Improved emacs mode (chetstone)
+ with Incremental search and Occur modes (Robert Krahn)
+
+ - Improved ime handling
+ - Searchbox (Vlad Zinculescu)
+
+ - Added elastic tabstops lite extension (Garen Torikian)
+ - Added extension for whitespace manipulation
+ - Added extension for enabling spellchecking from contextmenu
+ - Added extension for displaying available keyboard shortcuts (Matthew Christopher Kastor-Inare III)
+ - Added extension for displaying options panel (Matthew Christopher Kastor-Inare III)
+ - Added modelist extension (Matthew Christopher Kastor-Inare III)
+
+ - Improved toggleCommentLines and added ToggleCommentBlock command
+ - `:;` pairing in CSS mode (danyaPostfactum)
+
+ - Added suppoert for Delete and SelectAll from context menu (danyaPostfactum)
+
+ - Make wrapping behavior optional
+ - Selective bracket insertion/skipping
+
+ - Added commands for increase/decrease numbers, sort lines (Vlad Zinculescu)
+ - Folding for Markdown, Lua, LaTeX
+ - Selective bracket insertion/skipping for C-like languages
+
+* Many new languages
+ - Scheme (Mu Lei)
+ - Dot (edwardsp)
+ - FreeMarker (nguillaumin)
+ - Tiny Mushcode (h3rb)
+ - Velocity (Ryan Griffith)
+ - TOML (Garen Torikian)
+ - LSL (Nemurimasu Neiro, Builders Brewery)
+ - Curly (Libo Cannici)
+ - vbScript (Jan Jongboom)
+ - R (RStudio)
+ - ABAP
+ - Lucene (Graham Scott)
+ - Haml (Garen Torikian)
+ - Objective-C (Garen Torikian)
+ - Makefile (Garen Torikian)
+ - TypeScript (Garen Torikian)
+ - Lisp (Garen Torikian)
+ - Stylus (Garen Torikian)
+ - Dart (Garen Torikian)
+
+* Live syntax checks
+ - PHP (danyaPostfactum)
+ - Lua
+
+* New Themes
+ - Chaos
+ - Terminal
+
2012.09.17, Version 1.0.0
* New Features
@@ -153,4 +335,4 @@
* Add Ruby mode contributed by Shlomo Zalman Heigh
* Add Java mode contributed by Tom Tasche
* Fix annotation bug
-* Changing a document added a new empty line at the end
\ No newline at end of file
+* Changing a document added a new empty line at the end
diff --git a/Makefile b/Makefile
index 373d4c88..29cf0495 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,17 @@ pre_build:
build: pre_build
./Makefile.dryice.js normal
./Makefile.dryice.js demo
- ./Makefile.dryice.js bm
+
+# Minimal build: call Makefile.dryice.js only if our sources changed
+basic: build/src/ace.js
+
+build/src/ace.js : ${wildcard lib/*} \
+ ${wildcard lib/*/*} \
+ ${wildcard lib/*/*/*} \
+ ${wildcard lib/*/*/*/*} \
+ ${wildcard lib/*/*/*/*/*} \
+ ${wildcard lib/*/*/*/*/*/*}
+ ./Makefile.dryice.js
doc:
cd doc;\
diff --git a/Makefile.dryice.js b/Makefile.dryice.js
index 4f56c016..0ce7c657 100755
--- a/Makefile.dryice.js
+++ b/Makefile.dryice.js
@@ -31,22 +31,23 @@
var fs = require("fs");
var path = require("path");
-if (!fs.existsSync)
- fs.existsSync = path.existsSync;
-else
- path.existsSync = fs.existsSync;
-var copy = require('dryice').copy;
+var copy = require('architect-build/copy');
+var build = require('architect-build/build');
var ACE_HOME = __dirname;
var BUILD_DIR = ACE_HOME + "/build";
+var CACHE = {};
function main(args) {
+ if (args.indexOf("updateModes") !== -1) {
+ return updateModes();
+ }
var type = "minimal";
args = args.map(function(x) {
if (x[0] == "-" && x[1] != "-")
return "-" + x;
return x;
- });
+ }).filter(Boolean);
if (args[2] && (args[2][0] != "-" || args[2].indexOf("h") != -1))
type = args[2];
@@ -66,22 +67,24 @@ function main(args) {
ace();
} else if (type == "demo") {
demo();
- } else if (type == "bm") {
- bookmarklet();
} else if (type == "full") {
- demo(ace());
- bookmarklet();
+ ace();
+ demo();
+ } else if (type == "highlighter") {
+ // TODO
}
}
+}
+function showHelp(type) {
console.log("--- Ace Dryice Build Tool ---");
console.log("");
console.log("Options:");
- console.log(" minimal Places necessary Ace files out in build dir; uses configuration flags below [default]");
- console.log(" normal Runs four Ace builds--minimal, minimal-noconflict, minimal-min, and minimal-noconflict-min");
- console.log(" demo Runs demo build of Ace");
- console.log(" bm Runs bookmarklet build of Ace");
- console.log(" full all of above");
+ console.log(" minimal Places necessary Ace files out in build dir; uses configuration flags below [default]");
+ console.log(" normal Runs four Ace builds--minimal, minimal-noconflict, minimal-min, and minimal-noconflict-min");
+ console.log(" demo Runs demo build of Ace");
+ console.log(" full all of above");
+ console.log(" highlighter ");
console.log("args:");
console.log(" --target ./path path to build folder");
console.log("flags:");
@@ -90,94 +93,34 @@ function main(args) {
console.log(" --nc namespace require");
console.log(" --s shrinkwrap (combines all output files into one)");
console.log("");
- if (BUILD_DIR)
- console.log(" output generated in " + type + __dirname + "/" + BUILD_DIR)
-}
-
-function bookmarklet() {
- var targetDir = BUILD_DIR + "/textarea";
- copy({
- source: "build_support/editor_textarea.html",
- dest: targetDir + '/editor.html'
- });
- copy({
- source: "build_support/style.css",
- dest: targetDir + '/style.css'
- });
-
- buildAce({
- targetDir: targetDir + "/src",
- ns: "__ace_shadowed__",
- exportModule: "ace/ext/textarea",
- compress: false,
- noconflict: true,
- suffix: "",
- name: "ace-bookmarklet",
- workers: [],
- keybindings: []
- });
+ if (type)
+ console.log(" output for " + type + " generated in " + BUILD_DIR);
}
function ace() {
- console.log('# ace ---------');
-
- // uncompressed
- var project = buildAce({
- compress: false,
- noconflict: false
- });
- buildAce({
- compress: false,
- noconflict: true
- });
-
- // compressed
- buildAce({
- compress: true,
- noconflict: false
- });
- buildAce({
- compress: true,
- noconflict: true
- });
-
console.log('# ace License | Readme | Changelog ---------');
- copy({
- source: ACE_HOME + "/build_support/editor.html",
- dest: BUILD_DIR + "/editor.html"
- });
- copy({
- source: ACE_HOME + "/LICENSE",
- dest: BUILD_DIR + "/LICENSE"
- });
- copy({
- source: ACE_HOME + "/ChangeLog.txt",
- dest: BUILD_DIR + "/ChangeLog.txt"
- });
+ copy.file(ACE_HOME + "/build_support/editor.html", BUILD_DIR + "/editor.html");
+ copy.file(ACE_HOME + "/LICENSE", BUILD_DIR + "/LICENSE");
+ copy.file(ACE_HOME + "/ChangeLog.txt", BUILD_DIR + "/ChangeLog.txt");
- return project;
+ console.log('# ace ---------');
+ for (var i = 0; i < 4; i++)
+ buildAce({compress: i & 2, noconflict: i & 1});
}
-function demo(project) {
- project = project || buildAce({
- compress: false,
- noconflict: false,
- coreOnly: true
- });
+function demo() {
console.log('# kitchen sink ---------');
- var version, ref;
+ var version = "", ref = "";
try {
version = JSON.parse(fs.readFileSync(ACE_HOME + "/package.json")).version;
ref = fs.readFileSync(ACE_HOME + "/.git-ref").toString();
- } catch(e) {
- ref = "";
- version = "";
- }
+ } catch(e) {}
function changeComments(data) {
return (data
+ .replace("doc/site/images/ace-logo.png", "demo/kitchen-sink/ace-logo.png")
.replace(//g, "")
.replace(/PACKAGE\-\->|")}
+ function script(str) {result.push('')}
+ scripts.forEach(function(s) {
+ s = s.replace(/"/g, "");
+ if (s == "ace/ace") {
+ comment("load ace");
+ script("ace");
+ } else {
+ var extName = s.match(/[^/]*$/)[0];
+ comment("load ace " + extName + " extension");
+ script("ext-" + extName);
+ }
+ });
+ result.push("
\ No newline at end of file
+
+
+
+
+
+
+
+
The main class required to set up an Ace instance in the browser.
+
+
+
+
+
+
+
+
+
+
+
+
Creates a new EditSession , and returns the associated Document .
+
+
Arguments text Document | String Required. If text is a Document, it associates the EditSession with it. Otherwise, a new Document is created, with the initial text
+mode TextMode Required. The inital language mode to use for the document
+
+
+
+
+
+
+
+
+
+
+
+
Embeds the Ace editor into the DOM, at the element provided by el.
+
+
+
Embeds the Ace editor into the DOM, at the element provided by el.
+
+
Arguments el String | DOMElement Required. Either the id of an element, or the element itself
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Ace. require (String moduleName )
+
+
+
+
+
+
+
+
+
+
Provides access to require in packed noconflict mode
+
+
+
Provides access to require in packed noconflict mode
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/anchor.html b/api/anchor.html
index f3f25cd1..727c1cb8 100644
--- a/api/anchor.html
+++ b/api/anchor.html
@@ -1,33 +1,272 @@
-
Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated
-
Creates a new Anchor and associates it with a document.
-
Creates a new Anchor and associates it with a document.
-
Arguments doc Document Required. The document to associate with the anchor
-row Number Required. The starting row position
-column Number Required. The starting column position
-
Anchor .on(" change ", function( Object e)) Fires whenever the anchor position changes.
-
Fires whenever the anchor position changes.
-
Events that can trigger this function include setPosition() .
-
Arguments e Object Required. An object containing information about the anchor position. It has two properties:
-
+
+
+
+
+
+
+
+
+
+
+
+
When called, the 'change' event listener is removed.
+
+
+
When called, the 'change' event listener is removed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Anchor. getDocument ()
+
+
+
+
+
+
+
+
+
+
Returns the current document.
+
+
+
Returns the current document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Anchor. getPosition ()
+
+
+
+
+
+
+
+
+
+
Returns an object identifying the row and column position of the current anchor.
+
+
+
Returns an object identifying the row and column position of the current anchor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sets the anchor position to the specified row and column. If noClip is true, the position is not clipped.
+
+
+
Sets the anchor position to the specified row and column. If noClip is true, the position is not clipped.
+
+
Arguments row Number Required. The row index to move the anchor to
+column Number Required. The column index to move the anchor to
+noClip Boolean Required. Identifies if you want the position to be clipped
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/background_tokenizer.html b/api/background_tokenizer.html
index 8a11bcee..a4ef22c2 100644
--- a/api/background_tokenizer.html
+++ b/api/background_tokenizer.html
@@ -1,30 +1,320 @@
-
Tokenizes the current Document in the background, and caches the tokenized rows for future use. If a certain row is changed, everything below that row is re-tokenized.
-
Creates a new BackgroundTokenizer object.
-
Creates a new BackgroundTokenizer object.
-
Arguments tokenizer Tokenizer Required. The tokenizer to use
-editor Editor Required. The editor to associate with
-
BackgroundTokenizer .on(" update ", function( Object e)) Fires whenever the background tokeniziers between a range of rows are going to be updated.
-
Fires whenever the background tokeniziers between a range of rows are going to be updated.
-
Arguments e Object Required. An object containing two properties, first and last, which indicate the rows of the region being updated.
-
BackgroundTokenizer. fireUpdateEvent (Number firstRow, Number lastRow )Emits the 'update' event. firstRow and lastRow are used to define the boundaries of the region to be updated.
-
Emits the 'update' event. firstRow and lastRow are used to define the boundaries of the region to be updated.
-
Arguments firstRow Number Required. The starting row region
-lastRow Number Required. The final row region
-
BackgroundTokenizer. getState (Number row )Returns the state of tokenization at the end of a row.
-
Returns the state of tokenization at the end of a row.
-
Arguments row Number Required. The row to get state at
-
BackgroundTokenizer. getTokens (Number row )Gives list of tokens of the row. (tokens are cached)
-
Gives list of tokens of the row. (tokens are cached)
-
Arguments row Number Required. The row to get tokens at
-
BackgroundTokenizer. setDocument (Document doc )Sets a new document to associate with this object.
-
Sets a new document to associate with this object.
-
Arguments doc Document Required. The new document to associate with
-
BackgroundTokenizer. setTokenizer (Tokenizer tokenizer )Sets a new tokenizer for this object.
-
Sets a new tokenizer for this object.
-
Arguments tokenizer Tokenizer Required. The new tokenizer to use
-
BackgroundTokenizer. start (Number startRow )Starts tokenizing at the row indicated.
-
Starts tokenizing at the row indicated.
-
Arguments startRow Number Required. The row to start at
-
BackgroundTokenizer. stop ( )
\ No newline at end of file
+
+
+
+
+
+
+
+
Tokenizes the current Document in the background, and caches the tokenized rows for future use.
+
If a certain row is changed, everything below that row is re-tokenized.
+
+
+
+
+
+
+
+
+
+
+
Creates a new BackgroundTokenizer object.
+
+
+
Creates a new BackgroundTokenizer object.
+
+
Arguments tokenizer Tokenizer Required. The tokenizer to use
+editor Editor Required. The editor to associate with
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BackgroundTokenizer .on(" update ", function( Object e))
+
+
+
+
+
+
+
Fires whenever the background tokeniziers between a range of rows are going to be updated.
+
+
+
Fires whenever the background tokeniziers between a range of rows are going to be updated.
+
+
Arguments e Object Required. An object containing two properties, first and last, which indicate the rows of the region being updated.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BackgroundTokenizer. fireUpdateEvent (Number firstRow, Number lastRow )
+
+
+
+
+
+
+
Emits the 'update' event. firstRow and lastRow are used to define the boundaries of the region to be updated.
+
+
+
Emits the 'update' event. firstRow and lastRow are used to define the boundaries of the region to be updated.
+
+
Arguments firstRow Number Required. The starting row region
+lastRow Number Required. The final row region
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BackgroundTokenizer. getState (Number row )
+
+
+
+
+
+
+
Returns the state of tokenization at the end of a row.
+
+
+
Returns the state of tokenization at the end of a row.
+
+
Arguments row Number Required. The row to get state at
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BackgroundTokenizer. getTokens (Number row )
+
+
+
+
+
+
+
Gives list of tokens of the row. (tokens are cached)
+
+
+
Gives list of tokens of the row. (tokens are cached)
+
+
Arguments row Number Required. The row to get tokens at
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BackgroundTokenizer. setDocument (Document doc )
+
+
+
+
+
+
+
Sets a new document to associate with this object.
+
+
+
Sets a new document to associate with this object.
+
+
Arguments doc Document Required. The new document to associate with
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BackgroundTokenizer. setTokenizer (Tokenizer tokenizer )
+
+
+
+
+
+
+
Sets a new tokenizer for this object.
+
+
+
Sets a new tokenizer for this object.
+
+
Arguments tokenizer Tokenizer Required. The new tokenizer to use
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BackgroundTokenizer. start (Number startRow )
+
+
+
+
+
+
+
Starts tokenizing at the row indicated.
+
+
+
Starts tokenizing at the row indicated.
+
+
Arguments startRow Number Required. The row to start at
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BackgroundTokenizer. stop ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/command_manager.html b/api/command_manager.html
index b580d309..142ca741 100644
--- a/api/command_manager.html
+++ b/api/command_manager.html
@@ -1,5 +1,55 @@
-
TODO
-
Arguments platform String Required. Identifier for the platform; must be either 'mac' or 'win'
-commands Array Required. A list of commands
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
new CommandManager(platform, commands)
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/document.html b/api/document.html
index 577fe66f..f1fc2ff5 100644
--- a/api/document.html
+++ b/api/document.html
@@ -1,146 +1,927 @@
-
Contains the text of the document. Document can be attached to several EditSession s. At its core, Documents are just an array of strings, with each row in the document matching up to the array index.
-
Creates a new Document. If text is included, the Document contains those strings; otherwise, it's empty.
-
Creates a new Document. If text is included, the Document contains those strings; otherwise, it's empty.
-
Arguments Document .on(" change ", function( Object e)) Fires whenever the document changes.
-
Fires whenever the document changes.
+
+
+
+
+
+
+
+
Contains the text of the document. Document can be attached to several EditSession s.
+
At its core, Documents are just an array of strings, with each row in the document matching up to the array index.
+
+
+
+
+
+
+
+
+
+
+
Creates a new Document. If text is included, the Document contains those strings; otherwise, it's empty.
+
+
+
Creates a new Document. If text is included, the Document contains those strings; otherwise, it's empty.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document .on(" change ", function( Object e))
+
+
+
+
+
+
+
Fires whenever the document changes.
+
+
+
Fires whenever the document changes.
Several methods trigger different "change" events. Below is a list of each action type, followed by each property that's also available:
-
Arguments e Object Required. Contains at least one property called "action". "action" indicates the action that triggered the change. Each action also has a set of additional properties.
-
Document. $clipPosition (position )Document. $detectNewLine (text )Splits a string of text on any newline (\n) or carriage-return ('\r') characters.
-
Splits a string of text on any newline (\n) or carriage-return ('\r') characters.
-
Arguments text String Required. The text to work with
-
Returns Array of String s A String array, with each index containing a piece of the original text string.
-
Document. applyDeltas (deltas )Applies all the changes previously accumulated. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
-
Applies all the changes previously accumulated. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
-
Creates a new Anchor to define a floating point in the document.
-
Creates a new Anchor to define a floating point in the document.
-
Arguments row Number Required. The row number to use
-column Number Required. The column number to use
-
Returns all lines in the document as string array. Warning: The caller should not modify this array!
-
Returns all lines in the document as string array. Warning: The caller should not modify this array!
-
Returns the number of rows in the document.
-
Returns the number of rows in the document.
-
Returns a verbatim copy of the given line as it is in the document
-
Returns a verbatim copy of the given line as it is in the document
-
Arguments row Number Required. The row index to retrieve
-
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
-
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
-
Arguments firstRow Number Required. The first row index to retrieve
-lastRow Number Required. The final row index to retrieve
-
Document. getNewLineCharacter ( )Returns the newline character that's being used, depending on the value of newLineMode.
-
Returns the newline character that's being used, depending on the value of newLineMode.
-
Returns String If newLineMode == windows, \r\n is returned.
-
-If newLineMode == unix, \n is returned.
-
-If newLineMode == auto, the value of autoNewLine is returned.
-
-
-
Document. getNewLineMode ( )Returns the type of newlines being used; either windows, unix, or auto
-
Returns the type of newlines being used; either windows, unix, or auto
-
Given a range within the document, this function returns all the text within that range as a single string.
-
Arguments range Range Required. The range to work with
-
Returns all the lines in the document as a single string, split by the new line character.
-
Returns all the lines in the document as a single string, split by the new line character.
-
Arguments position Number Required. The position to start inserting at
-text String Required. A chunk of text to insert
-
Returns Number The position of the last line of text. If the length of text is 0, this function simply returns position.
-
-Inserts a block of text and the indicated position.
-
-
Inserts text into the position at the current row. This method also triggers the 'change' event.
-
Inserts text into the position at the current row. This method also triggers the 'change' event.
-
Arguments position Number Required. The position to insert at
-text String Required. A chunk of text
-
Returns Object Returns an object containing the final row and column, like this:
-
-{row: endRow, column: 0}
-
-Number If text is empty, this function returns the value of position
-
Inserts the elements in lines into the document, starting at the row index given by row. This method also triggers the 'change' event.
-
Inserts the elements in lines into the document, starting at the row index given by row. This method also triggers the 'change' event.
-
Arguments row Number Required. The index of the row to insert at
-lines Array Required. An array of strings
-
Returns Object Returns an object containing the final row and column, like this:
-
-{row: endRow, column: 0}
-
-If lines is empty, this function returns an object containing the current row, and column, like this:
-
-{row: row, column: 0}
-
-
-
Document. insertNewLine (String position )Inserts a new line into the document at the current row's position. This method also triggers the 'change' event.
-
Inserts a new line into the document at the current row's position. This method also triggers the 'change' event.
-
Arguments position String Required. The position to insert at
-
Returns Object Returns an object containing the final row and column, like this:
-
-{row: endRow, column: 0}
-
-
Document. isNewLine (String text )Returns true if text is a newline character (either \r\n, \r, or \n).
-
Returns true if text is a newline character (either \r\n, \r, or \n).
-
Arguments text String Required. The text to check
-
Document. remove (Range range )Removes the range from the document.
-
Removes the range from the document.
-
Arguments range Range Required. A specified Range to remove
-
Returns Object Returns the new start property of the range, which contains startRow and startColumn. If range is empty, this function returns the unmodified value of range.start.
-
Removes the specified columns from the row. This method also triggers the 'change' event.
-
Removes the specified columns from the row. This method also triggers the 'change' event.
-
Arguments row Number Required. The row to remove from
-startColumn Number Required. The column to start removing at
-endColumn Number Required. The column to stop removing at
-
Returns Object Returns an object containing startRow and startColumn, indicating the new row and column values. If startColumn is equal to endColumn, this function returns nothing.
-
Removes a range of full lines. This method also triggers the 'change' event.
-
Removes a range of full lines. This method also triggers the 'change' event.
-
Arguments firstRow Number Required. The first row to be removed
-lastRow Number Required. The last row to be removed
-
Returns Document. removeNewLine (Number row )Removes the new line between row and the row immediately following it. This method also triggers the 'change' event.
-
Removes the new line between row and the row immediately following it. This method also triggers the 'change' event.
-
Arguments row Number Required. The row to check
-
Replaces a range in the document with the new text.
-
Replaces a range in the document with the new text.
-
Arguments range Range Required. A specified Range to replace
-text String Required. The new text to use as a replacement
-
Returns Object Returns an object containing the final row and column, like this:
-
-{row: endRow, column: 0}
-
-If the text and range are empty, this function returns an object containing the current range.start value.
-
-If the text is the exact same as what currently exists, this function returns an object containing the current range.end value.
-
-
-
Document. revertDeltas (deltas )Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
-
Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
-
Document. setNewLineMode (String newLineMode )Sets the new line mode.
-
Sets the new line mode.
-
Arguments newLineMode String Required. The newline mode to use; can be either windows, unix, or auto
-
Document. setValue (String text )Replaces all the lines in the current Document with the value of text.
-
Replaces all the lines in the current Document with the value of text.
-
Arguments text String Required. The text to use
-
\ No newline at end of file
+
+
Arguments e Object Required. Contains at least one property called "action". "action" indicates the action that triggered the change. Each action also has a set of additional properties.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. applyDeltas (Object deltas )
+
+
+
+
+
+
+
Applies all the changes previously accumulated. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
+
+
+
Applies all the changes previously accumulated. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
Creates a new Anchor to define a floating point in the document.
+
+
+
Creates a new Anchor to define a floating point in the document.
+
+
Arguments row Number Required. The row number to use
+column Number Required. The column number to use
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. getAllLines ()
+
+
+
+
+
+
+
Returns all lines in the document as string array.
+
+
+
Returns all lines in the document as string array. Warning: The caller should not modify this array!
+
+
+
+
+
+
+
+
+
+
+
+
Returns the number of rows in the document.
+
+
+
Returns the number of rows in the document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. getLine (Number row )
+
+
+
+
+
+
+
Returns a verbatim copy of the given line as it is in the document
+
+
+
Returns a verbatim copy of the given line as it is in the document
+
+
Arguments row Number Required. The row index to retrieve
+
+
+
+
+
+
+
+
+
+
+
+
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
+
+
+
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
+
+
Arguments firstRow Number Required. The first row index to retrieve
+lastRow Number Required. The final row index to retrieve
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. getNewLineCharacter ()
+
+
+
+
+
+
+
+
+
+
Returns the newline character that's being used, depending on the value of newLineMode.
+
+
+
Returns the newline character that's being used, depending on the value of newLineMode.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. getNewLineMode ()
+
+
+
+
+
+
+
+
+
+
Returns the type of newlines being used; either windows, unix, or auto
+
+
+
Returns the type of newlines being used; either windows, unix, or auto
+
+
+
+
+
+
+
+
+
+
+
+
+
Given a range within the document, this function returns all the text within that range as a single string.
+
+
Arguments range Range Required. The range to work with
+
+
+
+
+
+
+
+
+
+
+
+
Returns all the lines in the document as a single string, split by the new line character.
+
+
+
Returns all the lines in the document as a single string, split by the new line character.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. indexToPosition (Number index, Number startRow )
+
+
+
+
+
+
+
+
+
+
Converts an index position in a document to a {row, column} object.
+
+
+
Converts an index position in a document to a {row, column} object.
+
Index refers to the "absolute position" of a character in the document. For example:
+
var x = 0 ;
+var y = -1 ;
+
Here, y is an index 15: 11 characters for the first row, and 5 characters until y in the second.
+
+
Arguments index Number Required. An index to convert
+startRow Number Required. =0 The row from which to start the conversion
+
+
+
+
+
+
+
+
+
+
+
+
Inserts a block of text and the indicated position.
+
+
+
Inserts a block of text and the indicated position.
+
+
Arguments position Object Required. The position to start inserting at
+text String Required. A chunk of text to insert
+
+
+
+
+
+
+
+
+
+
+
+
Inserts text into the position at the current row. This method also triggers the 'change' event.
+
+
+
Inserts text into the position at the current row. This method also triggers the 'change' event.
+
+
Arguments position Object Required. The position to insert at
+text String Required. A chunk of text
+
+
+
+
+
+
+
+
+
+
+
+
Inserts the elements in lines into the document, starting at the row index given by row. This method also triggers the 'change' event.
+
+
+
Inserts the elements in lines into the document, starting at the row index given by row. This method also triggers the 'change' event.
+
+
Arguments row Number Required. The index of the row to insert at
+lines Array Required. An array of strings
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. insertNewLine (Object position )
+
+
+
+
+
+
+
+
+
+
Inserts a new line into the document at the current row's position. This method also triggers the 'change' event.
+
+
+
Inserts a new line into the document at the current row's position. This method also triggers the 'change' event.
+
+
Arguments position Object Required. The position to insert at
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. isNewLine (String text )
+
+
+
+
+
+
+
Returns true if text is a newline character (either \r\n, \r, or \n).
+
+
+
Returns true if text is a newline character (either \r\n, \r, or \n).
+
+
Arguments text String Required. The text to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. positionToIndex (Object pos, Number startRow )
+
+
+
+
+
+
+
+
+
+
Converts the {row, column} position in a document to the character's index.
+
+
+
Converts the {row, column} position in a document to the character's index.
+
Index refers to the "absolute position" of a character in the document. For example:
+
var x = 0 ;
+var y = -1 ;
+
Here, y is an index 15: 11 characters for the first row, and 5 characters until y in the second.
+
+
Arguments pos Object Required. The {row, column} to convert
+startRow Number Required. =0 The row from which to start the conversion
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. remove (Range range )
+
+
+
+
+
+
+
+
+
+
Removes the range from the document.
+
+
+
Removes the range from the document.
+
+
Arguments range Range Required. A specified Range to remove
+
+
+
+
+
+
+
+
+
+
+
+
Removes the specified columns from the row. This method also triggers the 'change' event.
+
+
+
Removes the specified columns from the row. This method also triggers the 'change' event.
+
+
Arguments row Number Required. The row to remove from
+startColumn Number Required. The column to start removing at
+endColumn Number Required. The column to stop removing at
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. removeLines (Number firstRow, Number lastRow )
+
+
+
+
+
+
+
+
+
+
Removes a range of full lines. This method also triggers the 'change' event.
+
+
+
Removes a range of full lines. This method also triggers the 'change' event.
+
+
Arguments firstRow Number Required. The first row to be removed
+lastRow Number Required. The last row to be removed
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. removeNewLine (Number row )
+
+
+
+
+
+
+
Removes the new line between row and the row immediately following it. This method also triggers the 'change' event.
+
+
+
Removes the new line between row and the row immediately following it. This method also triggers the 'change' event.
+
+
Arguments row Number Required. The row to check
+
+
+
+
+
+
+
+
+
+
+
+
Replaces a range in the document with the new text.
+
+
+
Replaces a range in the document with the new text.
+
+
Arguments range Range Required. A specified Range to replace
+text String Required. The new text to use as a replacement
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. revertDeltas (Object deltas )
+
+
+
+
+
+
+
Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
+
+
+
Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. setNewLineMode (String newLineMode )
+
+
+
+
+
+
+
Sets the new line mode.
+
+
+
Sets the new line mode.
+
+
Arguments newLineMode String Required. The newline mode to use; can be either windows, unix, or auto
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document. setValue (String text )
+
+
+
+
+
+
+
Replaces all the lines in the current Document with the value of text.
+
+
+
Replaces all the lines in the current Document with the value of text.
+
+
Arguments text String Required. The text to use
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/edit_session.html b/api/edit_session.html
index 398d61c3..11e79ed0 100644
--- a/api/edit_session.html
+++ b/api/edit_session.html
@@ -1,306 +1,3235 @@
-
Stores all the data about Editor state providing easy way to change editors state. EditSession can be attached to only one Document . Same Document can be attached to several EditSessions.
-
Sets up a new EditSession and associates it with the given Document and TextMode.
-
Sets up a new EditSession and associates it with the given Document and TextMode.
-
Arguments text Document | String Required. If text is a Document, it associates the EditSession with it. Otherwise, a new Document is created, with the initial text
-mode TextMode Required. The inital language mode to use for the document
-
EditSession .on(" change ", function( Object e)) Emitted when the document changes.
-
Emitted when the document changes.
-
Arguments e Object Required. An object containing a delta of information about the change.
-
EditSession .on(" changeAnnotation ", function( )) EditSession .on(" changeBackMarker ", function( )) Emitted when a back marker changes.
-
Emitted when a back marker changes.
-
EditSession .on(" changeBreakpoint ", function( )) Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
-
Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
-
EditSession .on(" changeFold ", function( e)) Emitted when a code fold is added or removed.
-
Emitted when a code fold is added or removed.
-
EditSession .on(" changeFrontMarker ", function( )) Emitted when a front marker changes.
-
Emitted when a front marker changes.
-
EditSession .on(" changeMode ", function( )) Emitted when the current mode changes.
-
Emitted when the current mode changes.
-
EditSession .on(" changeOverwrite ", function( )) EditSession .on(" changeScrollLeft ", function( Number scrollLeft)) Emitted when the scroll left changes.
-
Arguments scrollLeft Number Required. The new scroll left value
-
EditSession .on(" changeScrollTop ", function( Number scrollTop)) Emitted when the scroll top changes.
-
Arguments scrollTop Number Required. The new scroll top value
-
EditSession .on(" changeTabSize ", function( )) EditSession .on(" changeWrapLimit ", function( )) Emitted when the wrapping limit changes.
-
Emitted when the wrapping limit changes.
-
EditSession .on(" changeWrapMode ", function( )) Emitted when the wrap mode changes.
-
Emitted when the wrap mode changes.
-
EditSession .on(" loadMode ", function( e)) EditSession .on(" tokenizerUpdate ", function( Object e)) Emitted when a background tokenizer asynchronously processes new rows.
-
Emitted when a background tokenizer asynchronously processes new rows.
-
Arguments e Object Required. An object containing one property, "data", that contains information about the changing rows
-
EditSession. $computeWrapSplits (tokens, wrapLimit )EditSession. $constrainWrapLimit (wrapLimit )EditSession. $detectNewLine (String text )If text contains either the newline (\n) or carriage-return ('\r') characters, $autoNewLine stores that value.
-
If text contains either the newline (\n) or carriage-return ('\r') characters, $autoNewLine stores that value.
-
Arguments text String Required. A block of text
-
Given a string, returns an array of the display characters, including tabs and spaces.
-
Given a string, returns an array of the display characters, including tabs and spaces.
-
Arguments str String Required. The string to check
-offset Number Required. The value to start at
-
EditSession. $getStringScreenWidth (String str, Number maxScreenColumn, Number screenColumn )Calculates the width of the string str on the screen while assuming that the string starts at the first column on the screen.
-
Calculates the width of the string str on the screen while assuming that the string starts at the first column on the screen.
-
Arguments str String Required. The string to calculate the screen width of
-maxScreenColumn Number Required.
-screenColumn Number Required.
-
Returns Array of Number s Returns an int[] array with two elements:
-
-
EditSession. $getUndoSelection (deltas, isUndo, lastUndoRange )EditSession. $resetRowCache (Number row )
Arguments row Number Required. The row to work with
-
EditSession. $startWorker ( )EditSession. $syncInformUndoManager ( )EditSession. $updateInternalDataOnChange ( )EditSession. $updateWrapData (firstRow, lastRow )Adds a dynamic marker to the session.
-
Adds a dynamic marker to the session.
-
Arguments marker Object Required. object with update method
-inFront Boolean Required. Set to true to establish a front marker
-
EditSession. addGutterDecoration (Number row, String className )Adds className to the row, to be used for CSS stylings and whatnot.
-
Adds className to the row, to be used for CSS stylings and whatnot.
-
Arguments row Number Required. The row number
-className String Required. The class to add
-
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
-
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
-
Arguments range Range Required. Define the range of the marker
-clazz String Required. Set the CSS class for the marker
-type Function | String Required. Identify the type of the marker
-inFront Boolean Required. Set to true to establish a front marker
-
EditSession. adjustWrapLimit (Number desiredLimit )This should generally only be called by the renderer when a resize is detected.
-
This should generally only be called by the renderer when a resize is detected.
-
Arguments desiredLimit Number Required. The new wrap limit
-
EditSession. clearAnnotations ( )Clears all the annotations for this session. This function also triggers the 'changeAnnotation' event.
-
Clears all the annotations for this session. This function also triggers the 'changeAnnotation' event.
-
EditSession. clearBreakpoint (Number row )Removes a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
-
Removes a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
-
Arguments row Number Required. A row index
-
EditSession. clearBreakpoints ( )Removes all breakpoints on the rows. This function also emites the 'changeBreakpoint' event.
-
Removes all breakpoints on the rows. This function also emites the 'changeBreakpoint' event.
-
EditSession. documentToScreenColumn (row, docColumn )EditSession. documentToScreenPosition (Number docRow, Number docColumn )Converts document coordinates to screen coordinates. This takes into account code folding, word wrap, tab size, and any other visual modifications.
-
Converts document coordinates to screen coordinates. This takes into account code folding, word wrap, tab size, and any other visual modifications.
-
Arguments docRow Number Required. The document row to check
-docColumn Number Required. The document column to check
-
Returns Object The object returned by this method has two properties: row and column.
-
EditSession. documentToScreenRow (docRow, docColumn )Duplicates all the text between firstRow and lastRow.
-
Duplicates all the text between firstRow and lastRow.
-
Arguments firstRow Number Required. The starting row to duplicate
-lastRow Number Required. The final row to duplicate
-
Returns Number Returns the number of new rows added; in other words, lastRow - firstRow + 1.
-
EditSession. getAnnotations ( )Returns the annotations for the EditSession.
-
Returns the annotations for the EditSession.
-
Gets the range of a word, including its right whitespace.
-
Gets the range of a word, including its right whitespace.
-
Arguments row Number Required. The row number to start from
-column Number Required. The column number to start from
-
EditSession. getBreakpoints ( )Returns an array of numbers, indicating which rows have breakpoints.
-
Returns an array of numbers, indicating which rows have breakpoints.
-
EditSession. getDocument ( )Returns the Document associated with this session.
-
Returns the Document associated with this session.
-
EditSession. getDocumentLastRowColumn (Number docRow, Number docColumn )EditSession. getDocumentLastRowColumnPosition (docRow, docColumn )Returns the number of rows in the document.
-
Returns the number of rows in the document.
-
EditSession. getLine (Number row )Returns a verbatim copy of the given line as it is in the document
-
Returns a verbatim copy of the given line as it is in the document
-
Arguments row Number Required. The row to retrieve from
-
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
-
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
-
Arguments firstRow Number Required. The first row index to retrieve
-lastRow Number Required. The final row index to retrieve
-
EditSession. getMarkers (Boolean inFront )Returns an array containing the IDs of all the markers, either front or back.
-
Returns an array containing the IDs of all the markers, either front or back.
-
Arguments inFront Boolean Required. If true, indicates you only want front markers; false indicates only back markers
-
Returns the current text mode.
-
Returns the current text mode.
-
EditSession. getNewLineMode ( )Returns the current new line mode.
-
Returns the current new line mode.
-
EditSession. getOverwrite ( )Returns true if overwrites are enabled; false otherwise.
-
Returns true if overwrites are enabled; false otherwise.
-
EditSession. getRowLength (Number row )Returns number of screenrows in a wrapped line.
-
Returns number of screenrows in a wrapped line.
-
Arguments row Number Required. The row number to check
-
EditSession. getRowSplitData (row )EditSession. getScreenLastRowColumn (Number screenRow )Returns the column position (on screen) for the last character in the provided row.
-
Returns the column position (on screen) for the last character in the provided row.
-
Arguments screenRow Number Required. The screen row to check
-
EditSession. getScreenLength ( )Returns the length of the screen.
-
Returns the length of the screen.
-
EditSession. getScreenTabSize (Number screenColumn )The distance to the next tab stop at the specified screen column.
-
The distance to the next tab stop at the specified screen column.
-
Arguments screenColumn Number Required. The screen column to check
-
EditSession. getScreenWidth ( )Returns the width of the screen.
-
Returns the width of the screen.
-
EditSession. getScrollLeft ( )Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
-
EditSession. getScrollTop ( )Returns the value of the distance between the top of the editor and the topmost part of the visible content.
-
EditSession. getSelection ( )Returns the string of the current selection.
-
Returns the string of the current selection.
-
EditSession. getState (Number row )Returns the state of tokenization at the end of a row.
-
Returns the state of tokenization at the end of a row.
-
Arguments row Number Required. The row to start at
-
Returns the current tab size.
-
Returns the current tab size.
-
EditSession. getTabString ( )Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize() ); otherwise it's simply '\t'.
-
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize() ); otherwise it's simply '\t'.
-
Given a range within the document, this function returns all the text within that range as a single string.
-
Arguments range Range Required. The range to work with
-
Returns an object indicating the token at the current row. The object has two properties: index and start.
-
Returns an object indicating the token at the current row. The object has two properties: index and start.
-
Arguments row Number Required. The row number to retrieve from
-column Number Required. The column number to retrieve from
-
EditSession. getTokens (Number row )Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
-
Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
-
Arguments row Number Required. The row to start at
-
EditSession. getUndoManager ( )Returns the current undo manager.
-
Returns the current undo manager.
-
EditSession. getUseSoftTabs ( )Returns true if soft tabs are being used, false otherwise.
-
Returns true if soft tabs are being used, false otherwise.
-
EditSession. getUseWorker ( )Returns true if workers are being used.
-
Returns true if workers are being used.
-
EditSession. getUseWrapMode ( )Returns true if wrap mode is being used; false otherwise.
-
Returns true if wrap mode is being used; false otherwise.
-
Returns the current Document as a string.
-
Returns the current Document as a string.
-
Given a starting row and column, this method returns the Range of the first word boundary it finds.
-
Given a starting row and column, this method returns the Range of the first word boundary it finds.
-
Arguments row Number Required. The row to start at
-column Number Required. The column to start at
-
EditSession. getWrapLimit ( )Returns the value of wrap limit.
-
Returns the value of wrap limit.
-
EditSession. getWrapLimitRange ( )Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
-
Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
-
{ min : wrapLimitRange_min, max: wrapLimitRange_max }
-
Indents all the rows, from startRow to endRow (inclusive), by prefixing each row with the token in indentString.
-
Indents all the rows, from startRow to endRow (inclusive), by prefixing each row with the token in indentString.
+
+
+
+
+
+
+
+
Stores all the data about Editor state providing easy way to change editors state.
+
EditSession can be attached to only one Document . Same Document can be attached to several EditSessions.
+
+
+
+
+
+
+
+
+
+
+
Sets up a new EditSession and associates it with the given Document and TextMode.
+
+
+
Sets up a new EditSession and associates it with the given Document and TextMode.
+
+
Arguments text Document | String Required. If text is a Document, it associates the EditSession with it. Otherwise, a new Document is created, with the initial text
+mode TextMode Required. The inital language mode to use for the document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" change ", function( Object e))
+
+
+
+
+
+
+
Emitted when the document changes.
+
+
+
Emitted when the document changes.
+
+
Arguments e Object Required. An object containing a delta of information about the change.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeAnnotation ", function( ))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeBackMarker ", function( ))
+
+
+
+
+
+
+
Emitted when a back marker changes.
+
+
+
Emitted when a back marker changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeBreakpoint ", function( ))
+
+
+
+
+
+
+
Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
+
+
+
Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeFold ", function( ))
+
+
+
+
+
+
+
Emitted when a code fold is added or removed.
+
+
+
Emitted when a code fold is added or removed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeFrontMarker ", function( ))
+
+
+
+
+
+
+
Emitted when a front marker changes.
+
+
+
Emitted when a front marker changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeMode ", function( ))
+
+
+
+
+
+
+
Emitted when the current mode changes.
+
+
+
Emitted when the current mode changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeOverwrite ", function( ))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeScrollLeft ", function( Number scrollLeft))
+
+
+
+
+
+
+
+
Emitted when the scroll left changes.
+
+
Arguments scrollLeft Number Required. The new scroll left value
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeScrollTop ", function( Number scrollTop))
+
+
+
+
+
+
+
+
Emitted when the scroll top changes.
+
+
Arguments scrollTop Number Required. The new scroll top value
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeTabSize ", function( ))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeWrapLimit ", function( ))
+
+
+
+
+
+
+
Emitted when the wrapping limit changes.
+
+
+
Emitted when the wrapping limit changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" changeWrapMode ", function( ))
+
+
+
+
+
+
+
Emitted when the wrap mode changes.
+
+
+
Emitted when the wrap mode changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession .on(" tokenizerUpdate ", function( Object e))
+
+
+
+
+
+
+
Emitted when a background tokenizer asynchronously processes new rows.
+
+
+
Emitted when a background tokenizer asynchronously processes new rows.
+
+
Arguments e Object Required. An object containing one property, "data", that contains information about the changing rows
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. addDynamicMarker (Object marker, Boolean inFront )
+
+
+
+
+
+
+
+
+
+
Adds a dynamic marker to the session.
+
+
+
Adds a dynamic marker to the session.
+
+
Arguments marker Object Required. object with update method
+inFront Boolean Required. Set to true to establish a front marker
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. addGutterDecoration (Number row, String className )
+
+
+
+
+
+
+
Adds className to the row, to be used for CSS stylings and whatnot.
+
+
+
Adds className to the row, to be used for CSS stylings and whatnot.
+
+
Arguments row Number Required. The row number
+className String Required. The class to add
+
+
+
+
+
+
+
+
+
+
+
+
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
+
+
+
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
+
+
Arguments range Range Required. Define the range of the marker
+clazz String Required. Set the CSS class for the marker
+type Function | String Required. Identify the type of the marker
+inFront Boolean Required. Set to true to establish a front marker
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. clearAnnotations ()
+
+
+
+
+
+
+
Clears all the annotations for this session. This function also triggers the 'changeAnnotation' event.
+
+
+
Clears all the annotations for this session. This function also triggers the 'changeAnnotation' event.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. clearBreakpoint (Number row )
+
+
+
+
+
+
+
Removes a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
+
+
+
Removes a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
+
+
Arguments row Number Required. A row index
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. clearBreakpoints ()
+
+
+
+
+
+
+
Removes all breakpoints on the rows. This function also emites the 'changeBreakpoint' event.
+
+
+
Removes all breakpoints on the rows. This function also emites the 'changeBreakpoint' event.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. documentToScreenColumn (Number row, Number docColumn )
+
+
+
+
+
+
+
+
+
+
For the given document row and column, returns the screen column.
+
+
+
For the given document row and column, returns the screen column.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. documentToScreenPosition (Number docRow, Number docColumn )
+
+
+
+
+
+
+
+
+
+
Converts document coordinates to screen coordinates. This takes into account code folding, word wrap, tab size, and any other visual modifications.
+
+
+
Converts document coordinates to screen coordinates. This takes into account code folding, word wrap, tab size, and any other visual modifications.
+
+
Arguments docRow Number Required. The document row to check
+docColumn Number Required. The document column to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. documentToScreenRow (Number docRow, Number docColumn )
+
+
+
+
+
+
+
For the given document row and column, returns the screen row.
+
+
+
For the given document row and column, returns the screen row.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. duplicateLines (Number firstRow, Number lastRow )
+
+
+
+
+
+
+
+
+
+
Duplicates all the text between firstRow and lastRow.
+
+
+
Duplicates all the text between firstRow and lastRow.
+
+
Arguments firstRow Number Required. The starting row to duplicate
+lastRow Number Required. The final row to duplicate
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getAnnotations ()
+
+
+
+
+
+
+
+
+
+
Returns the annotations for the EditSession.
+
+
+
Returns the annotations for the EditSession.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getAWordRange (Number row, Number column )
+
+
+
+
+
+
+
+
+
+
Gets the range of a word, including its right whitespace.
+
+
+
Gets the range of a word, including its right whitespace.
+
+
Arguments row Number Required. The row number to start from
+column Number Required. The column number to start from
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getBreakpoints ()
+
+
+
+
+
+
+
+
+
+
Returns an array of numbers, indicating which rows have breakpoints.
+
+
+
Returns an array of numbers, indicating which rows have breakpoints.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getDocument ()
+
+
+
+
+
+
+
+
+
+
Returns the Document associated with this session.
+
+
+
Returns the Document associated with this session.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getDocumentLastRowColumn (Number docRow, Number docColumn )
+
+
+
+
+
+
+
For the given document row and column, this returns the column position of the last screen row.
+
+
+
For the given document row and column, this returns the column position of the last screen row.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getDocumentLastRowColumnPosition (Number docRow, Number docColumn )
+
+
+
+
+
+
+
For the given document row and column, this returns the document position of the last row.
+
+
+
For the given document row and column, this returns the document position of the last row.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getLength ()
+
+
+
+
+
+
+
+
+
+
Returns the number of rows in the document.
+
+
+
Returns the number of rows in the document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getLine (Number row )
+
+
+
+
+
+
+
+
+
+
Returns a verbatim copy of the given line as it is in the document
+
+
+
Returns a verbatim copy of the given line as it is in the document
+
+
Arguments row Number Required. The row to retrieve from
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getLines (Number firstRow, Number lastRow )
+
+
+
+
+
+
+
+
+
+
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
+
+
+
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
+
+
Arguments firstRow Number Required. The first row index to retrieve
+lastRow Number Required. The final row index to retrieve
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getMarkers (Boolean inFront )
+
+
+
+
+
+
+
+
+
+
Returns an array containing the IDs of all the markers, either front or back.
+
+
+
Returns an array containing the IDs of all the markers, either front or back.
+
+
Arguments inFront Boolean Required. If true, indicates you only want front markers; false indicates only back markers
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getMode ()
+
+
+
+
+
+
+
+
+
+
Returns the current text mode.
+
+
+
Returns the current text mode.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getNewLineMode ()
+
+
+
+
+
+
+
+
+
+
Returns the current new line mode.
+
+
+
Returns the current new line mode.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getOverwrite ()
+
+
+
+
+
+
+
Returns true if overwrites are enabled; false otherwise.
+
+
+
Returns true if overwrites are enabled; false otherwise.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getRowLength (Number row )
+
+
+
+
+
+
+
+
+
+
Returns number of screenrows in a wrapped line.
+
+
+
Returns number of screenrows in a wrapped line.
+
+
Arguments row Number Required. The row number to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getRowSplitData (Object row )
+
+
+
+
+
+
+
+
+
+
For the given row, this returns the split data.
+
+
+
For the given row, this returns the split data.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getScreenLastRowColumn (Number screenRow )
+
+
+
+
+
+
+
+
+
+
Returns the position (on screen) for the last character in the provided screen row.
+
+
+
Returns the position (on screen) for the last character in the provided screen row.
+
+
Arguments screenRow Number Required. The screen row to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getScreenLength ()
+
+
+
+
+
+
+
+
+
+
Returns the length of the screen.
+
+
+
Returns the length of the screen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getScreenTabSize (Number screenColumn )
+
+
+
+
+
+
+
+
+
+
The distance to the next tab stop at the specified screen column.
+
+
+
The distance to the next tab stop at the specified screen column.
+
+
Arguments screenColumn Number Required. The screen column to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getScreenWidth ()
+
+
+
+
+
+
+
+
+
+
Returns the width of the screen.
+
+
+
Returns the width of the screen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getScrollLeft ()
+
+
+
+
+
+
+
+
+
+
+
Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getScrollTop ()
+
+
+
+
+
+
+
+
+
+
+
Returns the value of the distance between the top of the editor and the topmost part of the visible content.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getSelection ()
+
+
+
+
+
+
+
Returns the string of the current selection.
+
+
+
Returns the string of the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getState (Number row )
+
+
+
+
+
+
+
Returns the state of tokenization at the end of a row.
+
+
+
Returns the state of tokenization at the end of a row.
+
+
Arguments row Number Required. The row to start at
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getTabSize ()
+
+
+
+
+
+
+
Returns the current tab size.
+
+
+
Returns the current tab size.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getTabString ()
+
+
+
+
+
+
+
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize() ); otherwise it's simply '\t'.
+
+
+
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize() ); otherwise it's simply '\t'.
+
+
+
+
+
+
+
+
+
+
+
+
+
Given a range within the document, this function returns all the text within that range as a single string.
+
+
Arguments range Range Required. The range to work with
+
+
+
+
+
+
+
+
+
+
+
+
Returns an object indicating the token at the current row. The object has two properties: index and start.
+
+
+
Returns an object indicating the token at the current row. The object has two properties: index and start.
+
+
Arguments row Number Required. The row number to retrieve from
+column Number Required. The column number to retrieve from
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getTokens (Number row )
+
+
+
+
+
+
+
Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
+
+
+
Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
+
+
Arguments row Number Required. The row to start at
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getUndoManager ()
+
+
+
+
+
+
+
Returns the current undo manager.
+
+
+
Returns the current undo manager.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getUseSoftTabs ()
+
+
+
+
+
+
+
+
+
+
Returns true if soft tabs are being used, false otherwise.
+
+
+
Returns true if soft tabs are being used, false otherwise.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getUseWorker ()
+
+
+
+
+
+
+
Returns true if workers are being used.
+
+
+
Returns true if workers are being used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getUseWrapMode ()
+
+
+
+
+
+
+
+
+
+
Returns true if wrap mode is being used; false otherwise.
+
+
+
Returns true if wrap mode is being used; false otherwise.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getValue ()
+
+
+
+
+
+
+
+
+
+
Returns the current Document as a string.
+
+
+
Returns the current Document as a string.
+
+
+
+
+
+
+
+
+
+
+
+
Given a starting row and column, this method returns the Range of the first word boundary it finds.
+
+
+
Given a starting row and column, this method returns the Range of the first word boundary it finds.
+
+
Arguments row Number Required. The row to start at
+column Number Required. The column to start at
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getWrapLimit ()
+
+
+
+
+
+
+
+
+
+
Returns the value of wrap limit.
+
+
+
Returns the value of wrap limit.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. getWrapLimitRange ()
+
+
+
+
+
+
+
+
+
+
Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
+
+
+
Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
+
{ min: wrapLimitRange_min, max: wrapLimitRange_max }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. highlight ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. highlightLines ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Indents all the rows, from startRow to endRow (inclusive), by prefixing each row with the token in indentString.
+
+
+
Indents all the rows, from startRow to endRow (inclusive), by prefixing each row with the token in indentString.
If indentString contains the '\t' character, it's replaced by whatever is defined by getTabString() .
-
Arguments startRow Number Required. Starting row
-endRow Number Required. Ending row
-indentString String Required. The indent token
-
Inserts a block of text and the indicated position.
-
Inserts a block of text and the indicated position.
-
Arguments position Number Required. The position to start inserting at
-text String Required. A chunk of text to insert
-
Returns Number The position of the last line of text. If the length of text is 0, this function simply returns position.
-
EditSession. isTabStop (Object position )Returns true if the character at the position is a soft tab.
-
Returns true if the character at the position is a soft tab.
-
Arguments position Object Required. The position to check
-
Arguments firstRow Number Required. The starting row to move down
-lastRow Number Required. The final row to move down
-
Returns Number If firstRow is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.
-
Shifts all the lines in the document up one, starting from firstRow and ending at lastRow.
-
Shifts all the lines in the document up one, starting from firstRow and ending at lastRow.
-
Arguments firstRow Number Required. The starting row to move up
-lastRow Number Required. The final row to move up
-
Returns Number If firstRow is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.
-
EditSession. moveText (Range fromRange, Object toPosition ){ row: newRowLocation, column: newColumnLocation }
-
{ row: newRowLocation, column: newColumnLocation }
-
Arguments fromRange Range Required. The range of text you want moved within the document
-toPosition Object Required. The location (row and column) where you want to move the text to
-
Returns Range The new range where the text was moved to.
-
-Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
-
-
EditSession. onReloadTokenizer (e )Reloads all the tokens on the current session. This function calls BackgroundTokenizer.start () to all the rows; it also emits the 'tokenizerUpdate' event.
-
Reloads all the tokens on the current session. This function calls BackgroundTokenizer.start () to all the rows; it also emits the 'tokenizerUpdate' event.
-
EditSession. outdentRows (Range range )Outdents all the rows defined by the start and end properties of range.
-
Outdents all the rows defined by the start and end properties of range.
-
Arguments range Range Required. A range of rows
-
Re-implements a previously undone change to your document.
-
Re-implements a previously undone change to your document.
-
Arguments deltas Array Required. An array of previous changes
-dontSelect Boolean Required. If true, doesn't select the range of where the change occured
-
EditSession. remove (Range range )Removes the range from the document.
-
Removes the range from the document.
-
Arguments range Range Required. A specified Range to remove
-
Returns Object The new start property of the range, which contains startRow and startColumn. If range is empty, this function returns the unmodified value of range.start.
-
EditSession. removeGutterDecoration (Number row, String className )Removes className from the row.
-
Removes className from the row.
-
Arguments row Number Required. The row number
-className String Required. The class to add
-
EditSession. removeMarker (Number markerId )Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
-
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
-
Arguments markerId Number Required. A number representing a marker
-
Replaces a range in the document with the new text.
-
Replaces a range in the document with the new text.
-
Arguments range Range Required. A specified Range to replace
-text String Required. The new text to use as a replacement
-
Returns Object Returns an object containing the final row and column, like this:
-
-{row: endRow, column: 0}
-
-If the text and range are empty, this function returns an object containing the current range.start value.
-
-If the text is the exact same as what currently exists, this function returns an object containing the current range.end value.
-
-
-
EditSession. screenToDocumentColumn (screenRow, screenColumn )EditSession. screenToDocumentPosition (Number screenRow, Number screenColumn )Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
-
Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
-
Arguments screenRow Number Required. The screen row to check
-screenColumn Number Required. The screen column to check
-
Returns Object The object returned has two properties: row and column.
-
EditSession. screenToDocumentRow (screenRow, screenColumn )EditSession. setAnnotations (Array annotations )Sets annotations for the EditSession. This functions emits the 'changeAnnotation' event.
-
Sets annotations for the EditSession. This functions emits the 'changeAnnotation' event.
-
Arguments annotations Array Required. A list of annotations
-
Sets a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
-
Sets a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
-
Arguments row Number Required. A row index
-className String Required. Class of the breakpoint
-
EditSession. setBreakpoints (Array rows )Sets a breakpoint on every row number given by rows. This function also emites the 'changeBreakpoint' event.
-
Sets a breakpoint on every row number given by rows. This function also emites the 'changeBreakpoint' event.
-
Arguments rows Array Required. An array of row indicies
-
Sets the EditSession to point to a new Document. If a BackgroundTokenizer exists, it also points to doc.
-
Sets the EditSession to point to a new Document. If a BackgroundTokenizer exists, it also points to doc.
-
Arguments doc Document Required. The new Document to use
-
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
-
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
-
Arguments mode TextMode Required. Set a new text mode
-
EditSession. setNewLineMode (String newLineMode )Sets the new line mode.
-
Sets the new line mode.
-
Arguments newLineMode String Required. The newline mode to use; can be either windows, unix, or auto
-
EditSession. setOverwrite (Boolean overwrite )Pass in true to enable overwrites in your session, or false to disable.
-
Pass in true to enable overwrites in your session, or false to disable.
+
+
Arguments startRow Number Required. Starting row
+endRow Number Required. Ending row
+indentString String Required. The indent token
+
+
+
+
+
+
+
+
+
+
+
+
Inserts a block of text and the indicated position.
+
+
+
Inserts a block of text and the indicated position.
+
+
Arguments position Object Required. The position {row, column} to start inserting at
+text String Required. A chunk of text to insert
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. isTabStop (Object position )
+
+
+
+
+
+
+
Returns true if the character at the position is a soft tab.
+
+
+
Returns true if the character at the position is a soft tab.
+
+
Arguments position Object Required. The position to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. moveLinesDown (Number firstRow, Number lastRow )
+
+
+
+
+
+
+
+
+
+
Shifts all the lines in the document down one, starting from firstRow and ending at lastRow.
+
+
+
Shifts all the lines in the document down one, starting from firstRow and ending at lastRow.
+
+
Arguments firstRow Number Required. The starting row to move down
+lastRow Number Required. The final row to move down
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. moveLinesUp (Number firstRow, Number lastRow )
+
+
+
+
+
+
+
+
+
+
Shifts all the lines in the document up one, starting from firstRow and ending at lastRow.
+
+
+
Shifts all the lines in the document up one, starting from firstRow and ending at lastRow.
+
+
Arguments firstRow Number Required. The starting row to move up
+lastRow Number Required. The final row to move up
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. moveText (Range fromRange, Object toPosition )
+
+
+
+
+
+
+
+
+
+
Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
+
{ row: newRowLocation, column: newColumnLocation }
+
+
+
Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
+
{ row: newRowLocation, column: newColumnLocation }
+
+
Arguments fromRange Range Required. The range of text you want moved within the document
+toPosition Object Required. The location (row and column) where you want to move the text to
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. onChange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. onChangeFold ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. onReloadTokenizer (Object e )
+
+
+
+
+
+
+
Reloads all the tokens on the current session. This function calls BackgroundTokenizer.start () to all the rows; it also emits the 'tokenizerUpdate' event.
+
+
+
Reloads all the tokens on the current session. This function calls BackgroundTokenizer.start () to all the rows; it also emits the 'tokenizerUpdate' event.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. outdentRows (Range range )
+
+
+
+
+
+
+
Outdents all the rows defined by the start and end properties of range.
+
+
+
Outdents all the rows defined by the start and end properties of range.
+
+
Arguments range Range Required. A range of rows
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. redoChanges (Array deltas, Boolean dontSelect )
+
+
+
+
+
+
+
+
+
+
Re-implements a previously undone change to your document.
+
+
+
Re-implements a previously undone change to your document.
+
+
Arguments deltas Array Required. An array of previous changes
+dontSelect Boolean Required. If true, doesn't select the range of where the change occured
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. remove (Range range )
+
+
+
+
+
+
+
+
+
+
Removes the range from the document.
+
+
+
Removes the range from the document.
+
+
Arguments range Range Required. A specified Range to remove
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. removeGutterDecoration (Number row, String className )
+
+
+
+
+
+
+
Removes className from the row.
+
+
+
Removes className from the row.
+
+
Arguments row Number Required. The row number
+className String Required. The class to add
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. removeMarker (Number markerId )
+
+
+
+
+
+
+
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
+
+
+
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
+
+
Arguments markerId Number Required. A number representing a marker
+
+
+
+
+
+
+
+
+
+
+
+
Replaces a range in the document with the new text.
+
+
+
Replaces a range in the document with the new text.
+
+
Arguments range Range Required. A specified Range to replace
+text String Required. The new text to use as a replacement
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. resetCaches ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. screenToDocumentColumn ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. screenToDocumentPosition (Number screenRow, Number screenColumn )
+
+
+
+
+
+
+
+
+
+
Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
+
+
+
Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
+
+
Arguments screenRow Number Required. The screen row to check
+screenColumn Number Required. The screen column to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. screenToDocumentRow ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setAnnotations (Array annotations )
+
+
+
+
+
+
+
Sets annotations for the EditSession. This functions emits the 'changeAnnotation' event.
+
+
+
Sets annotations for the EditSession. This functions emits the 'changeAnnotation' event.
+
+
Arguments annotations Array Required. A list of annotations
+
+
+
+
+
+
+
+
+
+
+
+
Sets a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
+
+
+
Sets a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
+
+
Arguments row Number Required. A row index
+className String Required. Class of the breakpoint
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setBreakpoints (Array rows )
+
+
+
+
+
+
+
Sets a breakpoint on every row number given by rows. This function also emites the 'changeBreakpoint' event.
+
+
+
Sets a breakpoint on every row number given by rows. This function also emites the 'changeBreakpoint' event.
+
+
Arguments rows Array Required. An array of row indices
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setDocument (Document doc )
+
+
+
+
+
+
+
Sets the EditSession to point to a new Document. If a BackgroundTokenizer exists, it also points to doc.
+
+
+
Sets the EditSession to point to a new Document. If a BackgroundTokenizer exists, it also points to doc.
+
+
Arguments doc Document Required. The new Document to use
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setMode ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setNewLineMode (String newLineMode )
+
+
+
+
+
+
+
Sets the new line mode.
+
+
+
Sets the new line mode.
+
+
Arguments newLineMode String Required. The newline mode to use; can be either windows, unix, or auto
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setOverwrite (Boolean overwrite )
+
+
+
+
+
+
+
Pass in true to enable overwrites in your session, or false to disable.
+
+
+
Pass in true to enable overwrites in your session, or false to disable.
If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
-
Arguments overwrite Boolean Required. Defines wheter or not to set overwrites
-
EditSession. setScrollLeft (scrollLeft )Sets the value of the distance between the left of the editor and the leftmost part of the visible content.
-
EditSession. setScrollTop (Number scrollTop )This function sets the scroll top value. It also emits the 'changeScrollTop' event.
-
Arguments scrollTop Number Required. The new scroll top value
-
EditSession. setTabSize (Number tabSize )Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
-
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
-
Arguments tabSize Number Required. The new tab size
-
Sets the undo manager.
-
Arguments EditSession. setUndoSelect (Boolean enable )ENables or disables highlighting of the range where an undo occured.
-
ENables or disables highlighting of the range where an undo occured.
-
Arguments enable Boolean Required. If true, selects the range of the reinserted change
-
EditSession. setUseSoftTabs (Boolean useSoftTabs )Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character ('\t').
-
Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character ('\t').
-
Arguments useSoftTabs Boolean Required. Value indicating whether or not to use soft tabs
-
EditSession. setUseWorker (Boolean useWorker )Identifies if you want to use a worker for the EditSession.
-
Identifies if you want to use a worker for the EditSession.
-
Arguments useWorker Boolean Required. Set to true to use a worker
-
EditSession. setUseWrapMode (Boolean useWrapMode )Sets whether or not line wrapping is enabled. If useWrapMode is different than the current value, the 'changeWrapMode' event is emitted.
-
Sets whether or not line wrapping is enabled. If useWrapMode is different than the current value, the 'changeWrapMode' event is emitted.
-
Arguments useWrapMode Boolean Required. Enable (or disable) wrap mode
-
EditSession. setValue (String text )Sets the session text.
-
Arguments text String Required. The new text to place
-
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
-
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
-
Arguments min Number Required. The minimum wrap value (the left side wrap)
-max Number Required. The maximum wrap value (the right side wrap)
-
EditSession. toggleOverwrite ( )Sets the value of overwrite to the opposite of whatever it currently is.
-
Sets the value of overwrite to the opposite of whatever it currently is.
-
Returns the current Document as a string.
-
Returns the current Document as a string.
-
Reverts previous changes to your document.
-
Reverts previous changes to your document.
-
Arguments deltas Array Required. An array of previous changes
-dontSelect Boolean Required. If true, doesn't select the range of where the change occured
-
\ No newline at end of file
+
+
Arguments overwrite Boolean Required. Defines wheter or not to set overwrites
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setScrollLeft (Object scrollLeft )
+
+
+
+
+
+
+
+
Sets the value of the distance between the left of the editor and the leftmost part of the visible content.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setScrollTop (Number scrollTop )
+
+
+
+
+
+
+
+
This function sets the scroll top value. It also emits the 'changeScrollTop' event.
+
+
Arguments scrollTop Number Required. The new scroll top value
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setTabSize (Number tabSize )
+
+
+
+
+
+
+
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
+
+
+
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
+
+
Arguments tabSize Number Required. The new tab size
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setUndoManager (UndoManager undoManager )
+
+
+
+
+
+
+
Sets the undo manager.
+
+
+
Sets the undo manager.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setUndoSelect (Boolean enable )
+
+
+
+
+
+
+
Enables or disables highlighting of the range where an undo occured.
+
+
+
Enables or disables highlighting of the range where an undo occured.
+
+
Arguments enable Boolean Required. If true, selects the range of the reinserted change
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setUseSoftTabs (Boolean useSoftTabs )
+
+
+
+
+
+
+
Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character ('\t').
+
+
+
Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character ('\t').
+
+
Arguments useSoftTabs Boolean Required. Value indicating whether or not to use soft tabs
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setUseWorker (Boolean useWorker )
+
+
+
+
+
+
+
Identifies if you want to use a worker for the EditSession.
+
+
+
Identifies if you want to use a worker for the EditSession.
+
+
Arguments useWorker Boolean Required. Set to true to use a worker
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setUseWrapMode (Boolean useWrapMode )
+
+
+
+
+
+
+
Sets whether or not line wrapping is enabled. If useWrapMode is different than the current value, the 'changeWrapMode' event is emitted.
+
+
+
Sets whether or not line wrapping is enabled. If useWrapMode is different than the current value, the 'changeWrapMode' event is emitted.
+
+
Arguments useWrapMode Boolean Required. Enable (or disable) wrap mode
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. setValue (String text )
+
+
+
+
+
+
+
Sets the session text.
+
+
+
Sets the session text.
+
+
Arguments text String Required. The new text to place
+
+
+
+
+
+
+
+
+
+
+
+
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
+
+
+
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
+
+
Arguments min Number Required. The minimum wrap value (the left side wrap)
+max Number Required. The maximum wrap value (the right side wrap)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. toggleOverwrite ()
+
+
+
+
+
+
+
Sets the value of overwrite to the opposite of whatever it currently is.
+
+
+
Sets the value of overwrite to the opposite of whatever it currently is.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. toString ()
+
+
+
+
+
+
+
+
+
+
Returns the current Document as a string.
+
+
+
Returns the current Document as a string.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EditSession. undoChanges (Array deltas, Boolean dontSelect )
+
+
+
+
+
+
+
+
+
+
Reverts previous changes to your document.
+
+
+
Reverts previous changes to your document.
+
+
Arguments deltas Array Required. An array of previous changes
+dontSelect Boolean Required. If true, doesn't select the range of where the change occured
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/editor.html b/api/editor.html
index f2493025..6ffe4369 100644
--- a/api/editor.html
+++ b/api/editor.html
@@ -1,343 +1,4689 @@
-
The main entry point into the Ace functionality. The Editor manages the EditSession (which manages Documents), as well as the VirtualRenderer, which draws everything to the screen. Event sessions dealing with the mouse and keyboard are bubbled up from Document to the Editor, which decides what to do with them.
-
Creates a new Editor object.
-
Creates a new Editor object.
-
Arguments renderer VirtualRenderer Required. Associated VirtualRenderer that draws everything
-session EditSession Required. The EditSession to refer to
-
Editor .on(" blur ", function( )) Emitted once the editor has been blurred.
-
Emitted once the editor has been blurred.
-
Editor .on(" change ", function( Object e)) Emitted whenever the document is changed.
-
Emitted whenever the document is changed.
-
Arguments e Object Required. Contains a single property, data, which has the delta of changes
-
Editor .on(" changeSelection ", function( )) Emitted when the selection changes.
-
Emitted when the selection changes.
-
Editor .on(" changeSelectionStyle ", function( Object data)) Emitted when the selection style changes, via Editor.setSelectionStyle() .
-
Arguments data Object Required. Contains one property, data, which indicates the new selection style
-
Editor .on(" changeSession ", function( Object e)) Emitted whenever the EditSession changes.
-
Arguments e Object Required. An object with two properties, oldSession and session, that represent the old and new EditSession s.
-
Editor .on(" copy ", function( String text)) Emitted when text is copied.
-
Emitted when text is copied.
-
Arguments text String Required. The copied text
-
Editor .on(" focus ", function( )) Emitted once the editor comes into focus.
-
Emitted once the editor comes into focus.
-
Editor .on(" paste ", function( String text)) Emitted when text is pasted.
-
Emitted when text is pasted.
-
Arguments text String Required. The pasted text
-
Editor. $getSelectedRows ( )Returns an object indicating the currently selected rows. The object looks like this:
-
Returns an object indicating the currently selected rows. The object looks like this:
-
{ first: range.start.row, last: range.end.row }
-
Editor. $getVisibleRowCount ( )Returns the number of currently visibile rows.
-
Returns the number of currently visibile rows.
-
Editor. $highlightBrackets ( )Executes a specific function, which can be anything that manipulates selected lines, such as copying them, duplicating them, or shifting them.
-
Executes a specific function, which can be anything that manipulates selected lines, such as copying them, duplicating them, or shifting them.
-
Arguments mover Function Required. A method to call on each selected row
-
Editor. $updateHighlightActiveLine ( )Editor. addSelectionMarker (Range orientedRange )Adds the selection and cursor.
-
Adds the selection and cursor.
-
Arguments orientedRange Range Required. A range containing a cursor
-
aligns cursors or selected text
-
aligns cursors or selected text
-
Outdents the current line.
-
Outdents the current line.
-
Blurs the current textInput.
-
Blurs the current textInput.
-
Attempts to center the current selection on the screen.
-
Attempts to center the current selection on the screen.
-
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
-
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
-
Copies all the selected lines down one row.
-
Copies all the selected lines down one row.
-
Returns Number On success, returns the number of new rows added; in other words, lastRow - firstRow + 1.
-
Copies all the selected lines up one row.
-
Copies all the selected lines up one row.
-
Returns Number On success, returns 0.
-
Cleans up the entire editor.
-
Cleans up the entire editor.
-
Editor. exitMultiSelectMode ( )Removes all the selections except the last added one.
-
Removes all the selections except the last added one.
-
Attempts to find needle within the document. For more information on options, see Search .
-
Attempts to find needle within the document. For more information on options, see Search .
-
Arguments needle String Required. The text to search for (optional)
-options Object Required. An object defining various search properties
-animate Boolean Required. If true animate scrolling
-
Finds and selects all the occurences of needle.
-
Finds and selects all the occurences of needle.
-
Arguments needle String Required. The text to find
-options Object Required. The search options
-additive Boolean Required. keeps
-
Performs another search for needle in the document. For more information on options, see Search .
-
Performs another search for needle in the document. For more information on options, see Search .
-
Arguments options Object Required. search options
-animate Boolean Required. If true animate scrolling
-
Performs a search for needle backwards. For more information on options, see Search .
-
Performs a search for needle backwards. For more information on options, see Search .
-
Arguments options Object Required. search options
-animate Boolean Required. If true animate scrolling
-
Brings the current textInput into focus.
-
Brings the current textInput into focus.
-
Executes a command for each selection range.
-
Executes a command for each selection range.
-
Arguments cmd String Required. The command to execute
-args String Required. Any arguments for the command
-
Editor. getBehavioursEnabled ( )Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
-
Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
-
Returns the string of text currently highlighted.
-
Returns the string of text currently highlighted.
-
Editor. getCursorPosition ( )Gets the current position of the cursor.
-
Gets the current position of the cursor.
-
Returns Object This returns an object that looks something like this:
-
-{ row: currRow, column: currCol }
-
-
Editor. getCursorPositionScreen ( )Returns the screen position of the cursor.
-
Returns the screen position of the cursor.
-
Returns the current mouse drag delay.
-
Returns the current mouse drag delay.
-
Editor. getFirstVisibleRow ( )Returns the index of the first visible row.
-
Returns the index of the first visible row.
-
Editor. getHighlightActiveLine ( )Returns true if current lines are always highlighted.
-
Returns true if current lines are always highlighted.
-
Editor. getHighlightSelectedWord ( )Returns true if currently highlighted words are to be highlighted.
-
Returns true if currently highlighted words are to be highlighted.
-
Editor. getKeyboardHandler ( )Returns the keyboard handler.
-
Returns the keyboard handler.
-
Editor. getLastSearchOptions ( )Returns an object containing all the search options. For more information on options, see Search .
-
Returns an object containing all the search options. For more information on options, see Search .
-
Editor. getLastVisibleRow ( )Returns the index of the last visible row.
-
Returns the index of the last visible row.
-
Returns true if overwrites are enabled; false otherwise.
-
Returns true if overwrites are enabled; false otherwise.
-
Editor. getPrintMarginColumn ( )Returns the column number of where the print margin is.
-
Returns the column number of where the print margin is.
-
Returns true if the editor is set to read-only mode.
-
Returns true if the editor is set to read-only mode.
-
Returns the value indicating how fast the mouse scroll speed is.
-
Returns the currently highlighted selection.
-
Returns the currently highlighted selection.
-
Editor. getSelectionRange ( )Returns the Range for the selected text.
-
Returns the Range for the selected text.
-
Editor. getSelectionStyle ( )Returns the current selection style.
-
Returns the current selection style.
-
Returns the current session being used.
-
Returns the current session being used.
-
Editor. getShowFoldWidgets ( )Returns true if the fold widgets are shown.
-
Editor. getShowInvisibles ( )Returns true if invisible characters are being shown.
-
Returns true if invisible characters are being shown.
-
Editor. getShowPrintMargin ( )Returns true if the print margin is being shown.
-
Returns true if the print margin is being shown.
-
Returns the path of the current theme.
-
Returns the path of the current theme.
-
Returns the current session's content.
-
Returns the current session's content.
-
Moves the cursor to the specified line number, and also into the indiciated column.
-
Moves the cursor to the specified line number, and also into the indiciated column.
-
Arguments lineNumber Number Required. The line number to go to
-column Number Required. A column number to go to
-animate Boolean Required. If true animates scolling
-
Shifts the document to wherever "page down" is, as well as moving the cursor position.
-
Shifts the document to wherever "page down" is, as well as moving the cursor position.
-
Shifts the document to wherever "page up" is, as well as moving the cursor position.
-
Shifts the document to wherever "page up" is, as well as moving the cursor position.
-
Indents the current line.
-
Indents the current line.
-
Inserts text into wherever the cursor is pointing.
-
Inserts text into wherever the cursor is pointing.
-
Arguments text String Required. The new text to add
-
Returns true if the current textInput is in focus.
-
Returns true if the current textInput is in focus.
-
Editor. isRowFullyVisible (Number row )Indicates if the entire row is currently visible on the screen.
-
Indicates if the entire row is currently visible on the screen.
-
Arguments row Number Required. The row to check
-
Editor. isRowVisible (Number row )Indicates if the row is currently visible on the screen.
-
Indicates if the row is currently visible on the screen.
-
Arguments row Number Required. The row to check
-
Moves the cursor's row and column to the next matching bracket.
-
Moves the cursor's row and column to the next matching bracket.
-
Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
-
Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
-
Arguments row Number Required. The new row number
-column Number Required. The new column number
-
Editor. moveCursorToPosition (Object pos )Moves the cursor to the position indicated by pos.row and pos.column.
-
Moves the cursor to the position indicated by pos.row and pos.column.
-
Arguments pos Object Required. An object with two properties, row and column
-
Shifts all the selected lines down one row.
-
Shifts all the selected lines down one row.
-
Returns Number On success, it returns -1.
-
Shifts all the selected lines up one row.
-
Shifts all the selected lines up one row.
-
Returns Number On success, it returns -1.
-
Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
-
Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
-
{ row: newRowLocation, column: newColumnLocation }
-
Arguments fromRange Range Required. The range of text you want moved within the document
-toPosition Object Required. The location (row and column) where you want to move the text to
-
Returns Range The new range where the text was moved to.
-
Editor. navigateDown (Number times )Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
-
Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
-
Arguments times Number Required. The number of times to change navigation
-
Moves the cursor to the end of the current file. Note that this does de-select the current selection.
-
Moves the cursor to the end of the current file. Note that this does de-select the current selection.
-
Editor. navigateFileStart ( )Moves the cursor to the start of the current file. Note that this does de-select the current selection.
-
Moves the cursor to the start of the current file. Note that this does de-select the current selection.
-
Editor. navigateLeft (Number times )Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
-
Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
-
Arguments times Number Required. The number of times to change navigation
-
Moves the cursor to the end of the current line. Note that this does de-select the current selection.
-
Moves the cursor to the end of the current line. Note that this does de-select the current selection.
-
Editor. navigateLineStart ( )Moves the cursor to the start of the current line. Note that this does de-select the current selection.
-
Moves the cursor to the start of the current line. Note that this does de-select the current selection.
-
Editor. navigateRight (Number times )Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
-
Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
-
Arguments times Number Required. The number of times to change navigation
-
Moves the cursor to the specified row and column. Note that this does de-select the current selection.
-
Moves the cursor to the specified row and column. Note that this does de-select the current selection.
-
Arguments row Number Required. The new row number
-column Number Required. The new column number
-
Editor. navigateUp (Number times )Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
-
Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
-
Arguments times Number Required. The number of times to change navigation
-
Editor. navigateWordLeft ( )Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
-
Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
-
Editor. navigateWordRight ( )Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
-
Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
-
Called whenever a text "copy" happens.
-
Called whenever a text "copy" happens.
-
called whenever a text "cut" happens.
-
called whenever a text "cut" happens.
-
Called whenever a text "paste" happens.
-
Called whenever a text "paste" happens.
-
Arguments text String Required. The pasted text
-
Perform a redo operation on the document, reimplementing the last change.
-
Perform a redo operation on the document, reimplementing the last change.
-
Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
-
Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
-
Arguments dir String Required. The direction of the deletion to occur, either "left" or "right"
-
Removes all the lines in the current selection
-
Removes all the lines in the current selection
-
Editor. removeSelectionMarker (Range range )Removes the selection marker.
-
Removes the selection marker.
-
Arguments Removes all the words to the right of the current selection, until the end of the line.
-
Removes all the words to the right of the current selection, until the end of the line.
-
Editor. removeToLineStart ( )Removes all the words to the left of the current selection, until the start of the line.
-
Removes all the words to the left of the current selection, until the start of the line.
-
Removes the word directly to the left of the current selection.
-
Removes the word directly to the left of the current selection.
-
Removes the word directly to the right of the current selection.
-
Removes the word directly to the right of the current selection.
-
Replaces the first occurance of options.needle with the value in replacement.
-
Replaces the first occurance of options.needle with the value in replacement.
-
Arguments replacement String Required. The text to replace with
-options Object Required. The Search options to use
-
Replaces all occurances of options.needle with the value in replacement.
-
Replaces all occurances of options.needle with the value in replacement.
-
Arguments replacement String Required. The text to replace with
-options Object Required. The Search options to use
-
Triggers a resize of the editor.
-
Triggers a resize of the editor.
-
Arguments force Boolean Required. If true, recomputes the size, even if the height and width haven't changed
-
Scrolls the document to wherever "page down" is, without changing the cursor position.
-
Scrolls the document to wherever "page down" is, without changing the cursor position.
-
Scrolls the document to wherever "page up" is, without changing the cursor position.
-
Scrolls the document to wherever "page up" is, without changing the cursor position.
-
TODO scrolls a to line, if center == true, puts line in middle of screen or attempts to)
-
Arguments line Number Required. The line to scroll to
-center Boolean Required. If true
-animate Boolean Required. If true animates scrolling
-callback Function Required. Function to be called when the animation has finished
-
Editor. scrollToRow (Number row )Moves the editor to the specified row.
-
Arguments row Number Required. The row to move to
-
Selects all the text in editor.
-
Selects all the text in editor.
-
Finds the next occurence of text in an active selection and adds it to the selections.
-
Finds the next occurence of text in an active selection and adds it to the selections.
-
Arguments dir Number Required. The direction of lines to select: -1 for up, 1 for down
-skip Boolean Required. If true, removes the active selection range
-
Adds a cursor above or below the active cursor.
-
Adds a cursor above or below the active cursor.
-
Arguments dir Number Required. The direction of lines to select: -1 for up, 1 for down
-skip Boolean Required. If true, removes the active selection range
-
Selects the text from the current position of the document until where a "page down" finishes.
-
Selects the text from the current position of the document until where a "page down" finishes.
-
Selects the text from the current position of the document until where a "page up" finishes.
-
Selects the text from the current position of the document until where a "page up" finishes.
-
Editor. setBehavioursEnabled (Boolean enabled )Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
-
Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
-
Arguments enabled Boolean Required. Enables or disables behaviors
-
Editor. setDragDelay (Number dragDelay )Sets the delay (in milliseconds) of the mouse drag.
-
Sets the delay (in milliseconds) of the mouse drag.
-
Arguments dragDelay Number Required. A value indicating the new delay
-
Editor. setFontSize (Number size )Set a new font size (in pixels) for the editor text.
-
Set a new font size (in pixels) for the editor text.
-
Arguments size Number Required. A font size
-
Editor. setHighlightActiveLine (Boolean shouldHighlight )Determines whether or not the current line should be highlighted.
-
Determines whether or not the current line should be highlighted.
-
Arguments shouldHighlight Boolean Required. Set to true to highlight the current line
-
Editor. setHighlightSelectedWord (Boolean shouldHighlight )Determines if the currently selected word should be highlighted.
-
Determines if the currently selected word should be highlighted.
-
Arguments shouldHighlight Boolean Required. Set to true to highlight the currently selected word
-
Editor. setKeyboardHandler (keyboardHandler )Sets a new keyboard handler.
-
Sets a new keyboard handler.
-
Editor. setOverwrite (Boolean overwrite )Pass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
-
Pass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
-
Arguments overwrite Boolean Required. Defines wheter or not to set overwrites
-
Editor. setPrintMarginColumn (Number showPrintMargin )Sets the column defining where the print margin should be.
-
Sets the column defining where the print margin should be.
-
Arguments showPrintMargin Number Required. Specifies the new print margin
-
Editor. setReadOnly (Boolean readOnly )If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
-
If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
-
Arguments readOnly Boolean Required. Specifies whether the editor can be modified or not
-
Editor. setScrollSpeed (Number speed )Sets how fast the mouse scrolling should do.
-
Arguments speed Number Required. A value indicating the new speed
-
Editor. setSelectionStyle (String style )Indicates how selections should occur. By default, selections are set to "line". This function also emits the 'changeSelectionStyle' event.
-
Indicates how selections should occur. By default, selections are set to "line". This function also emits the 'changeSelectionStyle' event.
-
Arguments style String Required. The new selection style
-
Sets a new editsession to use. This method also emits the 'changeSession' event.
-
Sets a new editsession to use. This method also emits the 'changeSession' event.
-
Arguments Editor. setShowFoldWidgets (Boolean show )Indicates whether the fold widgets are shown or not.
-
Arguments show Boolean Required. Specifies whether the fold widgets are shown
-
Editor. setShowInvisibles (Boolean showInvisibles )If showInvisibiles is set to true, invisible characters—like spaces or new lines—are show in the editor.
-
If showInvisibiles is set to true, invisible characters—like spaces or new lines—are show in the editor.
-
Arguments showInvisibles Boolean Required. Specifies whether or not to show invisible characters
-
Editor. setShowPrintMargin (Boolean showPrintMargin )If showPrintMargin is set to true, the print margin is shown in the editor.
-
If showPrintMargin is set to true, the print margin is shown in the editor.
-
Arguments showPrintMargin Boolean Required. Specifies whether or not to show the print margin
-
Adds a new class, style, to the editor.
-
Adds a new class, style, to the editor.
-
Arguments style String Required. A class name
-
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
-
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
-
Arguments theme String Required. The path to a theme
-
Sets the current document to val.
-
Sets the current document to val.
-
Arguments val String Required. The new value to set for the document
-cursorPos Number Required. Where to set the new value. undefined or 0 is selectAll, -1 is at the document start, and 1 is at the end
-
Splits the line at the current selection (by inserting an '\n').
-
Splits the line at the current selection (by inserting an '\n').
-
Given the currently selected range, this function either comments all lines or uncomments all lines (depending on whether it's commented or not).
-
Sets the value of overwrite to the opposite of whatever it currently is.
-
Sets the value of overwrite to the opposite of whatever it currently is.
-
Converts the current selection entirely into lowercase.
-
Converts the current selection entirely into lowercase.
-
Converts the current selection entirely into uppercase.
-
Converts the current selection entirely into uppercase.
-
Editor. transposeLetters ( )Transposes current line.
-
Transposes current line.
-
Editor. transposeSelections (Number dir )Transposes the selected ranges.
-
Transposes the selected ranges.
-
Arguments dir Number Required. The direction to rotate selections
-
Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
-
Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
-
Removes the class style from the editor.
-
Removes the class style from the editor.
-
Editor. updateSelectionMarkers ( )Updates the cursor and marker layers.
-
Updates the cursor and marker layers.
-
\ No newline at end of file
+
+
+
+
+
+
+
+
The main entry point into the Ace functionality.
+
The Editor manages the EditSession (which manages Document s), as well as the VirtualRenderer , which draws everything to the screen.
+
Event sessions dealing with the mouse and keyboard are bubbled up from Document to the Editor, which decides what to do with them.
+
+
+
+
+
+
+
+
+
+
+
Creates a new Editor object.
+
+
+
Creates a new Editor object.
+
+
Arguments renderer VirtualRenderer Required. Associated VirtualRenderer that draws everything
+session EditSession Required. The EditSession to refer to
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor .on(" blur ", function( ))
+
+
+
+
+
+
+
Emitted once the editor has been blurred.
+
+
+
Emitted once the editor has been blurred.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor .on(" change ", function( Object e))
+
+
+
+
+
+
+
Emitted whenever the document is changed.
+
+
+
Emitted whenever the document is changed.
+
+
Arguments e Object Required. Contains a single property, data, which has the delta of changes
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor .on(" changeSelectionStyle ", function( Object data))
+
+
+
+
+
+
+
+
Emitted when the selection style changes, via Editor.setSelectionStyle() .
+
+
Arguments data Object Required. Contains one property, data, which indicates the new selection style
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor .on(" changeSession ", function( Object e))
+
+
+
+
+
+
+
+
Emitted whenever the EditSession changes.
+
+
Arguments e Object Required. An object with two properties, oldSession and session, that represent the old and new EditSession s.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor .on(" copy ", function( String text))
+
+
+
+
+
+
+
Emitted when text is copied.
+
+
+
Emitted when text is copied.
+
+
Arguments text String Required. The copied text
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor .on(" focus ", function( ))
+
+
+
+
+
+
+
Emitted once the editor comes into focus.
+
+
+
Emitted once the editor comes into focus.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor .on(" paste ", function( Object e))
+
+
+
+
+
+
+
Emitted when text is pasted.
+
+
+
Emitted when text is pasted.
+
+
Arguments e Object Required. An object which contains one property, text, that represents the text to be pasted. Editing this property will alter the text that is pasted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. addSelectionMarker (Range orientedRange )
+
+
+
+
+
+
+
+
+
+
Adds the selection and cursor.
+
+
+
Adds the selection and cursor.
+
+
Arguments orientedRange Range Required. A range containing a cursor
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. alignCursors ()
+
+
+
+
+
+
+
Aligns the cursors or selected text.
+
+
+
Aligns the cursors or selected text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. blockOutdent ()
+
+
+
+
+
+
+
Outdents the current line.
+
+
+
Outdents the current line.
+
+
+
+
+
+
+
+
+
+
+
+
Blurs the current textInput.
+
+
+
Blurs the current textInput.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. centerSelection ()
+
+
+
+
+
+
+
Attempts to center the current selection on the screen.
+
+
+
Attempts to center the current selection on the screen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. clearSelection ()
+
+
+
+
+
+
+
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
+
+
+
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. copyLinesDown ()
+
+
+
+
+
+
+
+
+
+
Copies all the selected lines down one row.
+
+
+
Copies all the selected lines down one row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. copyLinesUp ()
+
+
+
+
+
+
+
+
+
+
Copies all the selected lines up one row.
+
+
+
Copies all the selected lines up one row.
+
+
+
+
+
+
+
+
+
+
+
+
Cleans up the entire editor.
+
+
+
Cleans up the entire editor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. duplicateSelection ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. exitMultiSelectMode ()
+
+
+
+
+
+
+
Removes all the selections except the last added one.
+
+
+
Removes all the selections except the last added one.
+
+
+
+
+
+
+
+
+
+
+
+
Attempts to find needle within the document. For more information on options, see Search .
+
+
+
Attempts to find needle within the document. For more information on options, see Search .
+
+
Arguments needle String Required. The text to search for (optional)
+options Object Required. An object defining various search properties
+animate Boolean Required. If true animate scrolling
+
+
+
+
+
+
+
+
+
+
+
+
Finds and selects all the occurences of needle.
+
+
+
Finds and selects all the occurences of needle.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
Performs another search for needle in the document. For more information on options, see Search .
+
+
+
Performs another search for needle in the document. For more information on options, see Search .
+
+
Arguments options Object Required. search options
+animate Boolean Required. If true animate scrolling
+
+
+
+
+
+
+
+
+
+
+
+
Performs a search for needle backwards. For more information on options, see Search .
+
+
+
Performs a search for needle backwards. For more information on options, see Search .
+
+
Arguments options Object Required. search options
+animate Boolean Required. If true animate scrolling
+
+
+
+
+
+
+
+
+
+
+
+
Brings the current textInput into focus.
+
+
+
Brings the current textInput into focus.
+
+
+
+
+
+
+
+
+
+
+
+
Executes a command for each selection range.
+
+
+
Executes a command for each selection range.
+
+
Arguments cmd String Required. The command to execute
+args String Required. Any arguments for the command
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getAnimatedScroll ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getBehavioursEnabled ()
+
+
+
+
+
+
+
+
+
+
Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
+
+
+
Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getCopyText ()
+
+
+
+
+
+
+
+
+
+
Returns the string of text currently highlighted.
+
+
+
Returns the string of text currently highlighted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getCursorPosition ()
+
+
+
+
+
+
+
+
+
+
Gets the current position of the cursor.
+
+
+
Gets the current position of the cursor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getCursorPositionScreen ()
+
+
+
+
+
+
+
+
+
+
Returns the screen position of the cursor.
+
+
+
Returns the screen position of the cursor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getDisplayIndentGuides ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getDragDelay ()
+
+
+
+
+
+
+
+
+
+
Returns the current mouse drag delay.
+
+
+
Returns the current mouse drag delay.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getFadeFoldWidgets ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getFirstVisibleRow ()
+
+
+
+
+
+
+
+
+
+
Returns the index of the first visible row.
+
+
+
Returns the index of the first visible row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getHighlightActiveLine ()
+
+
+
+
+
+
+
+
+
+
Returns true if current lines are always highlighted.
+
+
+
Returns true if current lines are always highlighted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getHighlightGutterLine ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getHighlightSelectedWord ()
+
+
+
+
+
+
+
+
+
+
Returns true if currently highlighted words are to be highlighted.
+
+
+
Returns true if currently highlighted words are to be highlighted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getKeyboardHandler ()
+
+
+
+
+
+
+
+
+
+
Returns the keyboard handler, such as "vim" or "windows".
+
+
+
Returns the keyboard handler, such as "vim" or "windows".
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getLastSearchOptions ()
+
+
+
+
+
+
+
+
+
+
Returns an object containing all the search options. For more information on options, see Search .
+
+
+
Returns an object containing all the search options. For more information on options, see Search .
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getLastVisibleRow ()
+
+
+
+
+
+
+
+
+
+
Returns the index of the last visible row.
+
+
+
Returns the index of the last visible row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getOverwrite ()
+
+
+
+
+
+
+
+
+
+
Returns true if overwrites are enabled; false otherwise.
+
+
+
Returns true if overwrites are enabled; false otherwise.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getPrintMarginColumn ()
+
+
+
+
+
+
+
+
+
+
Returns the column number of where the print margin is.
+
+
+
Returns the column number of where the print margin is.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getReadOnly ()
+
+
+
+
+
+
+
+
+
+
Returns true if the editor is set to read-only mode.
+
+
+
Returns true if the editor is set to read-only mode.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getScrollSpeed ()
+
+
+
+
+
+
+
+
+
+
+
Returns the value indicating how fast the mouse scroll speed is (in milliseconds).
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getSelection ()
+
+
+
+
+
+
+
+
+
+
Returns the currently highlighted selection.
+
+
+
Returns the currently highlighted selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getSelectionRange ()
+
+
+
+
+
+
+
+
+
+
Returns the Range for the selected text.
+
+
+
Returns the Range for the selected text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getSelectionStyle ()
+
+
+
+
+
+
+
+
+
+
Returns the current selection style.
+
+
+
Returns the current selection style.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getSession ()
+
+
+
+
+
+
+
+
+
+
Returns the current session being used.
+
+
+
Returns the current session being used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getShowFoldWidgets ()
+
+
+
+
+
+
+
+
+
+
+
Returns true if the fold widgets are shown.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getShowInvisibles ()
+
+
+
+
+
+
+
+
+
+
Returns true if invisible characters are being shown.
+
+
+
Returns true if invisible characters are being shown.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getShowPrintMargin ()
+
+
+
+
+
+
+
+
+
+
Returns true if the print margin is being shown.
+
+
+
Returns true if the print margin is being shown.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getTheme ()
+
+
+
+
+
+
+
+
+
+
Returns the path of the current theme.
+
+
+
Returns the path of the current theme.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getValue ()
+
+
+
+
+
+
+
+
+
+
Returns the current session's content.
+
+
+
Returns the current session's content.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. getWrapBehavioursEnabled ()
+
+
+
+
+
+
+
Returns true if the wrapping behaviors are currently enabled.
+
+
+
Returns true if the wrapping behaviors are currently enabled.
+
+
+
+
+
+
+
+
+
+
+
+
Moves the cursor to the specified line number, and also into the indiciated column.
+
+
+
Moves the cursor to the specified line number, and also into the indiciated column.
+
+
Arguments lineNumber Number Required. The line number to go to
+column Number Required. A column number to go to
+animate Boolean Required. If true animates scolling
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. gotoPageDown ()
+
+
+
+
+
+
+
Shifts the document to wherever "page down" is, as well as moving the cursor position.
+
+
+
Shifts the document to wherever "page down" is, as well as moving the cursor position.
+
+
+
+
+
+
+
+
+
+
+
+
Shifts the document to wherever "page up" is, as well as moving the cursor position.
+
+
+
Shifts the document to wherever "page up" is, as well as moving the cursor position.
+
+
+
+
+
+
+
+
+
+
+
+
Indents the current line.
+
+
+
Indents the current line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. insert (String text )
+
+
+
+
+
+
+
Inserts text into wherever the cursor is pointing.
+
+
+
Inserts text into wherever the cursor is pointing.
+
+
Arguments text String Required. The new text to add
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. isFocused ()
+
+
+
+
+
+
+
+
+
+
Returns true if the current textInput is in focus.
+
+
+
Returns true if the current textInput is in focus.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. isRowFullyVisible (Number row )
+
+
+
+
+
+
+
+
+
+
Indicates if the entire row is currently visible on the screen.
+
+
+
Indicates if the entire row is currently visible on the screen.
+
+
Arguments row Number Required. The row to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. isRowVisible (Number row )
+
+
+
+
+
+
+
+
+
+
Indicates if the row is currently visible on the screen.
+
+
+
Indicates if the row is currently visible on the screen.
+
+
Arguments row Number Required. The row to check
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. jumpToMatching (Object select )
+
+
+
+
+
+
+
Moves the cursor's row and column to the next matching bracket.
+
+
+
Moves the cursor's row and column to the next matching bracket.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. modifyNumber (Number amount )
+
+
+
+
+
+
+
If the character before the cursor is a number, this functions changes its value by amount.
+
+
+
If the character before the cursor is a number, this functions changes its value by amount.
+
+
Arguments amount Number Required. The value to change the numeral by (can be negative to decrease value)
+
+
+
+
+
+
+
+
+
+
+
+
Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
+
+
+
Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
+
+
Arguments row Number Required. The new row number
+column Number Required. The new column number
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. moveCursorToPosition (Object pos )
+
+
+
+
+
+
+
Moves the cursor to the position indicated by pos.row and pos.column.
+
+
+
Moves the cursor to the position indicated by pos.row and pos.column.
+
+
Arguments pos Object Required. An object with two properties, row and column
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. moveLinesDown ()
+
+
+
+
+
+
+
+
+
+
Shifts all the selected lines down one row.
+
+
+
Shifts all the selected lines down one row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. moveLinesUp ()
+
+
+
+
+
+
+
+
+
+
Shifts all the selected lines up one row.
+
+
+
Shifts all the selected lines up one row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateDown (Number times )
+
+
+
+
+
+
+
Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
+
+
+
Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
+
+
Arguments times Number Required. The number of times to change navigation
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateFileEnd ()
+
+
+
+
+
+
+
Moves the cursor to the end of the current file. Note that this does de-select the current selection.
+
+
+
Moves the cursor to the end of the current file. Note that this does de-select the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateFileStart ()
+
+
+
+
+
+
+
Moves the cursor to the start of the current file. Note that this does de-select the current selection.
+
+
+
Moves the cursor to the start of the current file. Note that this does de-select the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateLeft (Number times )
+
+
+
+
+
+
+
Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
+
+
+
Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
+
+
Arguments times Number Required. The number of times to change navigation
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateLineEnd ()
+
+
+
+
+
+
+
Moves the cursor to the end of the current line. Note that this does de-select the current selection.
+
+
+
Moves the cursor to the end of the current line. Note that this does de-select the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateLineStart ()
+
+
+
+
+
+
+
Moves the cursor to the start of the current line. Note that this does de-select the current selection.
+
+
+
Moves the cursor to the start of the current line. Note that this does de-select the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateRight (Number times )
+
+
+
+
+
+
+
Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
+
+
+
Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
+
+
Arguments times Number Required. The number of times to change navigation
+
+
+
+
+
+
+
+
+
+
+
+
Moves the cursor to the specified row and column. Note that this does de-select the current selection.
+
+
+
Moves the cursor to the specified row and column. Note that this does de-select the current selection.
+
+
Arguments row Number Required. The new row number
+column Number Required. The new column number
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateUp (Number times )
+
+
+
+
+
+
+
Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
+
+
+
Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
+
+
Arguments times Number Required. The number of times to change navigation
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateWordLeft ()
+
+
+
+
+
+
+
Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
+
+
+
Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. navigateWordRight ()
+
+
+
+
+
+
+
Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
+
+
+
Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onChangeAnnotation ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onChangeBackMarker ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onChangeBreakpoint ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onChangeFold ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onChangeFrontMarker ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onChangeMode ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onChangeWrapLimit ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onChangeWrapMode ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onCommandKey ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onCompositionEnd ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onCompositionStart ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onCompositionUpdate ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Called whenever a text "copy" happens.
+
+
+
Called whenever a text "copy" happens.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onCursorChange ()
+
+
+
+
+
+
+
Emitted when the selection changes.
+
+
+
Emitted when the selection changes.
+
+
+
+
+
+
+
+
+
+
+
+
Called whenever a text "cut" happens.
+
+
+
Called whenever a text "cut" happens.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onDocumentChange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onPaste (String text )
+
+
+
+
+
+
+
Called whenever a text "paste" happens.
+
+
+
Called whenever a text "paste" happens.
+
+
Arguments text String Required. The pasted text
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onScrollLeftChange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onScrollTopChange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onSelectionChange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. onTokenizerUpdate ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Perform a redo operation on the document, reimplementing the last change.
+
+
+
Perform a redo operation on the document, reimplementing the last change.
+
+
+
+
+
+
+
+
+
+
+
+
Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
+
+
+
Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
+
+
Arguments dir String Required. The direction of the deletion to occur, either "left" or "right"
+
+
+
+
+
+
+
+
+
+
+
+
Removes all the lines in the current selection
+
+
+
Removes all the lines in the current selection
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. removeSelectionMarker (Range The )
+
+
+
+
+
+
+
Removes the selection marker.
+
+
+
Removes the selection marker.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. removeToLineEnd ()
+
+
+
+
+
+
+
Removes all the words to the right of the current selection, until the end of the line.
+
+
+
Removes all the words to the right of the current selection, until the end of the line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. removeToLineStart ()
+
+
+
+
+
+
+
Removes all the words to the left of the current selection, until the start of the line.
+
+
+
Removes all the words to the left of the current selection, until the start of the line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. removeWordLeft ()
+
+
+
+
+
+
+
Removes the word directly to the left of the current selection.
+
+
+
Removes the word directly to the left of the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. removeWordRight ()
+
+
+
+
+
+
+
Removes the word directly to the right of the current selection.
+
+
+
Removes the word directly to the right of the current selection.
+
+
+
+
+
+
+
+
+
+
+
+
Replaces the first occurance of options.needle with the value in replacement.
+
+
+
Replaces the first occurance of options.needle with the value in replacement.
+
+
Arguments replacement String Required. The text to replace with
+options Object Required. The Search options to use
+
+
+
+
+
+
+
+
+
+
+
+
Replaces all occurances of options.needle with the value in replacement.
+
+
+
Replaces all occurances of options.needle with the value in replacement.
+
+
Arguments replacement String Required. The text to replace with
+options Object Required. The Search options to use
+
+
+
+
+
+
+
+
+
+
+
+
Triggers a resize of the editor.
+
+
+
Triggers a resize of the editor.
+
+
Arguments force Boolean Required. If true, recomputes the size, even if the height and width haven't changed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. scrollPageDown ()
+
+
+
+
+
+
+
Scrolls the document to wherever "page down" is, without changing the cursor position.
+
+
+
Scrolls the document to wherever "page down" is, without changing the cursor position.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. scrollPageUp ()
+
+
+
+
+
+
+
Scrolls the document to wherever "page up" is, without changing the cursor position.
+
+
+
Scrolls the document to wherever "page up" is, without changing the cursor position.
+
+
+
+
+
+
+
+
+
+
+
+
+
Scrolls to a line. If center is true, it puts the line in middle of screen (or attempts to).
+
+
Arguments line Number Required. The line to scroll to
+center Boolean Required. If true
+animate Boolean Required. If true animates scrolling
+callback Function Required. Function to be called when the animation has finished
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. scrollToRow (Object row )
+
+
+
+
+
+
+
+
Moves the editor to the specified row.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
Selects all the text in editor.
+
+
+
Selects all the text in editor.
+
+
+
+
+
+
+
+
+
+
+
+
Finds the next occurence of text in an active selection and adds it to the selections.
+
+
+
Finds the next occurence of text in an active selection and adds it to the selections.
+
+
Arguments dir Number Required. The direction of lines to select: -1 for up, 1 for down
+skip Boolean Required. If true, removes the active selection range
+
+
+
+
+
+
+
+
+
+
+
+
Adds a cursor above or below the active cursor.
+
+
+
Adds a cursor above or below the active cursor.
+
+
Arguments dir Number Required. The direction of lines to select: -1 for up, 1 for down
+skip Boolean Required. If true, removes the active selection range
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. selectPageDown ()
+
+
+
+
+
+
+
Selects the text from the current position of the document until where a "page down" finishes.
+
+
+
Selects the text from the current position of the document until where a "page down" finishes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. selectPageUp ()
+
+
+
+
+
+
+
Selects the text from the current position of the document until where a "page up" finishes.
+
+
+
Selects the text from the current position of the document until where a "page up" finishes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setAnimatedScroll ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setBehavioursEnabled (Boolean enabled )
+
+
+
+
+
+
+
Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
+
+
+
Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
+
+
Arguments enabled Boolean Required. Enables or disables behaviors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setDisplayIndentGuides ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setDragDelay (Number dragDelay )
+
+
+
+
+
+
+
Sets the delay (in milliseconds) of the mouse drag.
+
+
+
Sets the delay (in milliseconds) of the mouse drag.
+
+
Arguments dragDelay Number Required. A value indicating the new delay
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setFadeFoldWidgets ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setFontSize (Number size )
+
+
+
+
+
+
+
Set a new font size (in pixels) for the editor text.
+
+
+
Set a new font size (in pixels) for the editor text.
+
+
Arguments size Number Required. A font size
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setHighlightActiveLine (Boolean shouldHighlight )
+
+
+
+
+
+
+
Determines whether or not the current line should be highlighted.
+
+
+
Determines whether or not the current line should be highlighted.
+
+
Arguments shouldHighlight Boolean Required. Set to true to highlight the current line
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setHighlightGutterLine ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setHighlightSelectedWord (Boolean shouldHighlight )
+
+
+
+
+
+
+
Determines if the currently selected word should be highlighted.
+
+
+
Determines if the currently selected word should be highlighted.
+
+
Arguments shouldHighlight Boolean Required. Set to true to highlight the currently selected word
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setKeyboardHandler (String keyboardHandler )
+
+
+
+
+
+
+
Sets a new key handler, such as "vim" or "windows".
+
+
+
Sets a new key handler, such as "vim" or "windows".
+
+
Arguments keyboardHandler String Required. The new key handler
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setOverwrite (Boolean overwrite )
+
+
+
+
+
+
+
Pass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
+
+
+
Pass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
+
+
Arguments overwrite Boolean Required. Defines wheter or not to set overwrites
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setPrintMarginColumn (Number showPrintMargin )
+
+
+
+
+
+
+
Sets the column defining where the print margin should be.
+
+
+
Sets the column defining where the print margin should be.
+
+
Arguments showPrintMargin Number Required. Specifies the new print margin
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setReadOnly (Boolean readOnly )
+
+
+
+
+
+
+
If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
+
+
+
If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
+
+
Arguments readOnly Boolean Required. Specifies whether the editor can be modified or not
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setScrollSpeed (Number speed )
+
+
+
+
+
+
+
+
Sets how fast the mouse scrolling should do.
+
+
Arguments speed Number Required. A value indicating the new speed (in milliseconds)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setSelectionStyle (String style )
+
+
+
+
+
+
+
Indicates how selections should occur.
+
+
+
Indicates how selections should occur.
+
By default, selections are set to "line". There are no other styles at the moment,
+although this code change in the future.
+
This function also emits the 'changeSelectionStyle' event.
+
+
Arguments style String Required. The new selection style
+
+
+
+
+
+
+
+
+
+
+
+
Sets a new editsession to use. This method also emits the 'changeSession' event.
+
+
+
Sets a new editsession to use. This method also emits the 'changeSession' event.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setShowFoldWidgets (Boolean show )
+
+
+
+
+
+
+
+
Indicates whether the fold widgets are shown or not.
+
+
Arguments show Boolean Required. Specifies whether the fold widgets are shown
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setShowInvisibles (Boolean showInvisibles )
+
+
+
+
+
+
+
If showInvisibles is set to true, invisible characters—like spaces or new lines—are show in the editor.
+
+
+
If showInvisibles is set to true, invisible characters—like spaces or new lines—are show in the editor.
+
+
Arguments showInvisibles Boolean Required. Specifies whether or not to show invisible characters
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setShowPrintMargin (Boolean showPrintMargin )
+
+
+
+
+
+
+
If showPrintMargin is set to true, the print margin is shown in the editor.
+
+
+
If showPrintMargin is set to true, the print margin is shown in the editor.
+
+
Arguments showPrintMargin Boolean Required. Specifies whether or not to show the print margin
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setStyle (String style )
+
+
+
+
+
+
+
Adds a new class, style, to the editor.
+
+
+
Adds a new class, style, to the editor.
+
+
Arguments style String Required. A class name
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setTheme (String theme )
+
+
+
+
+
+
+
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
+
+
+
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
+
+
Arguments theme String Required. The path to a theme
+
+
+
+
+
+
+
+
+
+
+
+
Sets the current document to val.
+
+
+
Sets the current document to val.
+
+
Arguments val String Required. The new value to set for the document
+cursorPos Number Required. Where to set the new value. undefined or 0 is selectAll, -1 is at the document start, and 1 is at the end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. setWrapBehavioursEnabled (Boolean enabled )
+
+
+
+
+
+
+
Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
+when such a character is typed in.
+
+
+
Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
+when such a character is typed in.
+
+
Arguments enabled Boolean Required. Enables or disables wrapping behaviors
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Splits the line at the current selection (by inserting an '\n').
+
+
+
Splits the line at the current selection (by inserting an '\n').
+
+
+
+
+
+
+
+
+
+
+
+
+
Given the currently selected range, this function either comments all the lines, or uncomments all of them.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. toggleOverwrite ()
+
+
+
+
+
+
+
Sets the value of overwrite to the opposite of whatever it currently is.
+
+
+
Sets the value of overwrite to the opposite of whatever it currently is.
+
+
+
+
+
+
+
+
+
+
+
+
Converts the current selection entirely into lowercase.
+
+
+
Converts the current selection entirely into lowercase.
+
+
+
+
+
+
+
+
+
+
+
+
Converts the current selection entirely into uppercase.
+
+
+
Converts the current selection entirely into uppercase.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. transposeLetters ()
+
+
+
+
+
+
+
Transposes current line.
+
+
+
Transposes current line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. transposeSelections (Number dir )
+
+
+
+
+
+
+
Transposes the selected ranges.
+
+
+
Transposes the selected ranges.
+
+
Arguments dir Number Required. The direction to rotate selections
+
+
+
+
+
+
+
+
+
+
+
+
Perform an undo operation on the document, reverting the last change.
+
+
+
Perform an undo operation on the document, reverting the last change.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. unsetStyle (Object style )
+
+
+
+
+
+
+
Removes the class style from the editor.
+
+
+
Removes the class style from the editor.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor. updateSelectionMarkers ()
+
+
+
+
+
+
+
Updates the cursor and marker layers.
+
+
+
Updates the cursor and marker layers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/index.html b/api/index.html
index a4f1f307..cccaab54 100644
--- a/api/index.html
+++ b/api/index.html
@@ -1,4 +1,12 @@
-Ace API Reference
+
+
Ace API Reference
Welcome to the Ace API Reference Guide. Ace is a standalone code editor written in JavaScript that you can embed onto any website. We're used in a bunch of places already, like GitHub, Google, and Facebook.
On the left, you'll find a list of all of our currently documented classes. There are plenty more to do, but these represent the "core" set. For more information on how to work with Ace, check out the main Ace website .
-
\ No newline at end of file
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/placeholder.html b/api/placeholder.html
index 98aa0b55..fa12a958 100644
--- a/api/placeholder.html
+++ b/api/placeholder.html
@@ -1,24 +1,293 @@
-
TODO
-
Arguments session Document Required. The document to associate with the anchor
-length Number Required. The starting row position
-pos Number Required. The starting column position
-others String Required.
-mainClass String Required.
-othersClass String Required.
-
PlaceHolder .on(" onCursorChange ", function( e)) Emitted when the cursor changes.
-
Emitted when the cursor changes.
-
PlaceHolder .on(" onUpdate ", function( e)) Emitted when the place holder updates.
-
Emitted when the place holder updates.
-
PlaceHolder. hideOtherMarkers ( )Hides all over markers in the EditSession that are not the currently selected one.
-
Hides all over markers in the EditSession that are not the currently selected one.
-
PlaceHolder. showOtherMarkers ( )
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+session (Document): The document to associate with the anchor
+length (Number): The starting row position
+pos (Number): The starting column position
+others (String):
+mainClass (String):
+othersClass (String):
+
+
+
+
+session (Document): The document to associate with the anchor
+length (Number): The starting row position
+pos (Number): The starting column position
+others (String):
+mainClass (String):
+othersClass (String):
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
PlaceHolder.cancel()
+
TODO
+
+
+
+
+
+
+
+
+
+
+
+
+
PlaceHolder.detach()
+
TODO
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PlaceHolder. hideOtherMarkers ()
+
+
+
+
+
+
+
PlaceHolder.hideOtherMarkers()
+
+
+
PlaceHolder.hideOtherMarkers()
+
Hides all over markers in the EditSession that are not the currently selected one.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PlaceHolder. onCursorChange (Object event )
+
+
+
+
+
+
+
PlaceHolder@onCursorChange(e)
+
+
+
PlaceHolder@onCursorChange(e)
+
Emitted when the cursor changes.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ PlaceHolder. onUpdate (Object event )
+
+
+
+
+
+
+
PlaceHolder@onUpdate(e)
+
+
+
PlaceHolder@onUpdate(e)
+
Emitted when the place holder updates.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
PlaceHolder.setup()
+
TODO
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PlaceHolder. showOtherMarkers ()
+
+
+
+
+
+
+
PlaceHolder.showOtherMarkers()
+
+
+
PlaceHolder.showOtherMarkers()
+
TODO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/range.html b/api/range.html
index 19f69645..9779fe27 100644
--- a/api/range.html
+++ b/api/range.html
@@ -1,297 +1,968 @@
-
This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogus to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.
-
Creates a new Range object with the given starting and ending row and column points.
-
Creates a new Range object with the given starting and ending row and column points.
-
Arguments startRow Number Required. The starting row
-startColumn Number Required. The starting column
-endRow Number Required. The ending row
-endColumn Number Required. The ending column
-
Returns the part of the current Range that occurs within the boundaries of firstRow and lastRow as a new Range object.
-
Returns the part of the current Range that occurs within the boundaries of firstRow and lastRow as a new Range object.
-
Arguments firstRow Number Required. The starting row
-lastRow Number Required. The ending row
-
Returns a duplicate of the calling range.
-
Returns a duplicate of the calling range.
-
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
-
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
-
Checks the row and column points with the row and column points of the calling range.
-
Checks the row and column points with the row and column points of the calling range.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Returns Number This method returns one of the following numbers:
-
-
-0 if the two points are exactly equal
-
-
-
--1 if p.row is less then the calling range
-
-
-
-1 if p.row is greater than the calling range
-
-
-
-
-If the starting row of the calling range is equal to p.row, and:
-
-
-p.column is greater than or equal to the calling range's starting column, this returns 0
-
-
-
-Otherwise, it returns -1
-
-
-
-
-If the ending row of the calling range is equal to p.row, and:
-
-
-p.column is less than or equal to the calling range's ending column, this returns 0
-
-
-
-Otherwise, it returns 1
-
-
-
-
Checks the row and column points with the row and column points of the calling range.
-
Checks the row and column points with the row and column points of the calling range.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Returns Number This method returns one of the following numbers:
-
-
-0 if the two points are exactly equal
-
-
-
--1 if p.row is less then the calling range
-
-
-
-1 if p.row is greater than the calling range, or if isEnd is `true.
-
-
-
-
-If the starting row of the calling range is equal to p.row, and:
-
-
-p.column is greater than or equal to the calling range's starting column, this returns 0
-
-
-
-Otherwise, it returns -1
-
-*
-
-If the ending row of the calling range is equal to p.row, and:
-
-
-p.column is less than or equal to the calling range's ending column, this returns 0
-
-
-
-Otherwise, it returns 1
-
-
-
-
Checks the row and column points with the row and column points of the calling range.
-
Checks the row and column points with the row and column points of the calling range.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Returns Number This method returns one of the following numbers:
-
-
Range. comparePoint (Range p )Checks the row and column points of p with the row and column points of the calling range.
-
Checks the row and column points of p with the row and column points of the calling range.
-
Arguments p Range Required. A point to compare with
-
Returns Number This method returns one of the following numbers:
-
-
-0 if the two points are exactly equal
-
-
-
--1 if p.row is less then the calling range
-
-
-
-1 if p.row is greater than the calling range
-
-
-
-
-If the starting row of the calling range is equal to p.row, and:
-
-
-p.column is greater than or equal to the calling range's starting column, this returns 0
-
-
-
-Otherwise, it returns -1
-
-*
-
-If the ending row of the calling range is equal to p.row, and:
-
-
-p.column is less than or equal to the calling range's ending column, this returns 0
-
-
-
-Otherwise, it returns 1
-
-
-
-
Range. compareRange (Range range )Compares this range (A) with another range (B).
-
Compares this range (A) with another range (B).
-
Arguments range Range Required. A range to compare with
-
Returns Number This method returns one of the following numbers:
-
-
-
-
--2: (B) is in front of (A), and doesn't intersect with (A)
-
-
-
--1: (B) begins before (A) but ends inside of (A)
-
-
-
-0: (B) is completely inside of (A) OR (A) is completely inside of (B)
-
-
-
-+1: (B) begins inside of (A) but ends outside of (A)
-
-
-
-+2: (B) is after (A) and doesn't intersect with (A)
-
-
-
-42: FTW state: (B) ends in (A) but starts outside of (A)
-
-
-
-
Checks the row and column points with the row and column points of the calling range.
-
Checks the row and column points with the row and column points of the calling range.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Returns Number This method returns one of the following numbers:
-
-
-
-
-0 if the two points are exactly equal
-
-
-
--1 if p.row is less then the calling range
-
-
-
-1 if p.row is greater than the calling range, or if isStart is true.
-
-
-
-
-If the starting row of the calling range is equal to p.row, and:
-
-
-p.column is greater than or equal to the calling range's starting column, this returns 0
-
-
-
-Otherwise, it returns -1
-
-
-
-
-If the ending row of the calling range is equal to p.row, and:
-
-
-p.column is less than or equal to the calling range's ending column, this returns 0
-
-
-
-Otherwise, it returns 1
-
-
-
-
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
-
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
-
this.start.row <= row <= this.end.row &&
- this.start.column <= column <= this.end.column
-
Arguments row Number Required. A row to check for
-column Number Required. A column to check for
-
Range. containsRange (Range range )Checks the start and end points of range and compares them to the calling range. Returns true if the range is contained within the caller's range.
-
Checks the start and end points of range and compares them to the calling range. Returns true if the range is contained within the caller's range.
-
Arguments range Range Required. A range to compare with
-
Changes the row and column points for the calling range for both the starting and ending points. This method returns that range with a new row.
-
Changes the row and column points for the calling range for both the starting and ending points. This method returns that range with a new row.
-
Arguments row Number Required. A new row to extend to
-column Number Required. A new column to extend to
-
Creates and returns a new Range based on the row and column of the given parameters.
-
Creates and returns a new Range based on the row and column of the given parameters.
-
Arguments start Range Required. A starting point to use
-end Range Required. An ending point to use
-
Returns true if the row and column are within the given range.
-
Returns true if the row and column are within the given range.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Returns true if the row and column are within the given range's ending points.
-
Returns true if the row and column are within the given range's ending points.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Returns true if the row and column are within the given range's starting points.
-
Returns true if the row and column are within the given range's starting points.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Range. intersects (Range range )Returns true if passed in range intersects with the one calling this method.
-
Returns true if passed in range intersects with the one calling this method.
-
Arguments range Range Required. A range to compare with
-
Returns true if the caller's ending row point is the same as row, and if the caller's ending column is the same as column.
-
Returns true if the caller's ending row point is the same as row, and if the caller's ending column is the same as column.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Range. isEqual (Range range )Returns true if and only if the starting row and column, and ending tow and column, are equivalent to those given by range.
-
Returns true if and only if the starting row and column, and ending tow and column, are equivalent to those given by range.
-
Arguments range Range Required. A range to check against
-
Returns true if the range spans across multiple lines.
-
Returns true if the range spans across multiple lines.
-
Returns true if the caller's starting row point is the same as row, and if the caller's starting column is the same as column.
-
Returns true if the caller's starting row point is the same as row, and if the caller's starting column is the same as column.
-
Arguments row Number Required. A row point to compare with
-column Number Required. A column point to compare with
-
Sets the starting row and column for the range.
-
Sets the starting row and column for the range.
-
Arguments row Number Required. A row point to set
-column Number Required. A column point to set
-
Sets the starting row and column for the range.
-
Sets the starting row and column for the range.
-
Arguments row Number Required. A row point to set
-column Number Required. A column point to set
-
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
-
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
-
Arguments session EditSession Required. The EditSession to retrieve coordinates from
-
Returns a string containing the range's row and column information, given like this:
-
Returns a string containing the range's row and column information, given like this:
-
[start.row/start.column] -> [end.row/end.column]
-
\ No newline at end of file
+
+
+
+
+
+
+
+
This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogus to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.
+
+
+
+
+
+
+
+
+
+
+
Creates a new Range object with the given starting and ending row and column points.
+
+
+
Creates a new Range object with the given starting and ending row and column points.
+
+
Arguments startRow Number Required. The starting row
+startColumn Number Required. The starting column
+endRow Number Required. The ending row
+endColumn Number Required. The ending column
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns the part of the current Range that occurs within the boundaries of firstRow and lastRow as a new Range object.
+
+
+
Returns the part of the current Range that occurs within the boundaries of firstRow and lastRow as a new Range object.
+
+
Arguments firstRow Number Required. The starting row
+lastRow Number Required. The ending row
+
+
+
+
+
+
+
+
+
+
+
+
Returns a duplicate of the calling range.
+
+
+
Returns a duplicate of the calling range.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Range. collapseRows ()
+
+
+
+
+
+
+
+
+
+
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
+
+
+
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
+
+
+
+
+
+
+
+
+
+
+
+
Checks the row and column points with the row and column points of the calling range.
+
+
+
Checks the row and column points with the row and column points of the calling range.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
Checks the row and column points with the row and column points of the calling range.
+
+
+
Checks the row and column points with the row and column points of the calling range.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
Checks the row and column points with the row and column points of the calling range.
+
+
+
Checks the row and column points with the row and column points of the calling range.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Range. comparePoint (Range p )
+
+
+
+
+
+
+
+
+
+
Checks the row and column points of p with the row and column points of the calling range.
+
+
+
Checks the row and column points of p with the row and column points of the calling range.
+
+
Arguments p Range Required. A point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Range. compareRange (Range range )
+
+
+
+
+
+
+
+
+
+
Compares this range (A) with another range (B).
+
+
+
Compares this range (A) with another range (B).
+
+
Arguments range Range Required. A range to compare with
+
+
+
+
+
+
+
+
+
+
+
+
Checks the row and column points with the row and column points of the calling range.
+
+
+
Checks the row and column points with the row and column points of the calling range.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
+
this .start.row <= row <= this .end.row &&
+ this .start.column <= column <= this .end.column
+
+
+
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
+
this .start.row <= row <= this .end.row &&
+ this .start.column <= column <= this .end.column
+
+
Arguments row Number Required. A row to check for
+column Number Required. A column to check for
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Range. containsRange (Range range )
+
+
+
+
+
+
+
+
+
+
Checks the start and end points of range and compares them to the calling range. Returns true if the range is contained within the caller's range.
+
+
+
Checks the start and end points of range and compares them to the calling range. Returns true if the range is contained within the caller's range.
+
+
Arguments range Range Required. A range to compare with
+
+
+
+
+
+
+
+
+
+
+
+
Changes the row and column points for the calling range for both the starting and ending points.
+
+
+
Changes the row and column points for the calling range for both the starting and ending points.
+
+
Arguments row Number Required. A new row to extend to
+column Number Required. A new column to extend to
+
+
+
+
+
+
+
+
+
+
+
+
Creates and returns a new Range based on the row and column of the given parameters.
+
+
+
Creates and returns a new Range based on the row and column of the given parameters.
+
+
Arguments start Range Required. A starting point to use
+end Range Required. An ending point to use
+
+
+
+
+
+
+
+
+
+
+
+
Returns true if the row and column are within the given range.
+
+
+
Returns true if the row and column are within the given range.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
Returns true if the row and column are within the given range's ending points.
+
+
+
Returns true if the row and column are within the given range's ending points.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
Returns true if the row and column are within the given range's starting points.
+
+
+
Returns true if the row and column are within the given range's starting points.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Range. intersects (Range range )
+
+
+
+
+
+
+
+
+
+
Returns true if passed in range intersects with the one calling this method.
+
+
+
Returns true if passed in range intersects with the one calling this method.
+
+
Arguments range Range Required. A range to compare with
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns true if the caller's ending row point is the same as row, and if the caller's ending column is the same as column.
+
+
+
Returns true if the caller's ending row point is the same as row, and if the caller's ending column is the same as column.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Range. isEqual (Range range )
+
+
+
+
+
+
+
+
+
+
Returns true if and only if the starting row and column, and ending row and column, are equivalent to those given by range.
+
+
+
Returns true if and only if the starting row and column, and ending row and column, are equivalent to those given by range.
+
+
Arguments range Range Required. A range to check against
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Range. isMultiLine ()
+
+
+
+
+
+
+
+
+
+
Returns true if the range spans across multiple lines.
+
+
+
Returns true if the range spans across multiple lines.
+
+
+
+
+
+
+
+
+
+
+
+
Returns true if the caller's starting row point is the same as row, and if the caller's starting column is the same as column.
+
+
+
Returns true if the caller's starting row point is the same as row, and if the caller's starting column is the same as column.
+
+
Arguments row Number Required. A row point to compare with
+column Number Required. A column point to compare with
+
+
+
+
+
+
+
+
+
+
+
+
Sets the starting row and column for the range.
+
+
+
Sets the starting row and column for the range.
+
+
Arguments row Number Required. A row point to set
+column Number Required. A column point to set
+
+
+
+
+
+
+
+
+
+
+
+
Sets the starting row and column for the range.
+
+
+
Sets the starting row and column for the range.
+
+
Arguments row Number Required. A row point to set
+column Number Required. A column point to set
+
+
+
+
+
+
+
+
+
+
+
+
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
+
+
+
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
+
+
Arguments session EditSession Required. The EditSession to retrieve coordinates from
+
+
+
+
+
+
+
+
+
+
+
+
Returns a string containing the range's row and column information, given like this:
+
[start .row/start .column ] -> [end .row/end .column ]
+
+
+
Returns a string containing the range's row and column information, given like this:
+
[start .row/start .column ] -> [end .row/end .column ]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/renderloop.html b/api/renderloop.html
index 26aa4d16..59c98a0c 100644
--- a/api/renderloop.html
+++ b/api/renderloop.html
@@ -1,3 +1,55 @@
-
Batches changes (that force something to be redrawn) in the background.
-
new RenderLoop (onRender, win )RenderLoop. schedule (Array change )
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Batches changes (that force something to be redrawn) in the background.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/resources/csses/ace_api.css b/api/resources/csses/ace_api.css
index 7080c7a5..7a90b4c3 100644
--- a/api/resources/csses/ace_api.css
+++ b/api/resources/csses/ace_api.css
@@ -14,13 +14,16 @@
color: black;
}
-#documentation code {
+pre {
+ background-color: #FFFFFF;
+}
+
+code {
font-size: 12px;
line-height: 16px;
font-family: 'Ubuntu Mono',Monaco,Consolas,monospace !important;
background-color: #F9F9F9;
border-radius: 3px 3px 3px 3px;
- box-shadow: 0 0 2px #888888;
display: inline-block;
padding: 0 4px;
margin: 2px 1px;
@@ -61,8 +64,6 @@
}
#documentation p {
font-size: 13px;
- line-height : 20px;
- margin-bottom : 13px;
}
#documentation li p:last-child {
margin-bottom : 5px;
@@ -141,26 +142,6 @@
Menu venue
*/
-form.navbar-search {
- float: none;
-}
-
-form.navbar-search .search-query {
- background-color: #FFFFFF;
- border-color: #999;
- -webkit-transition: border 0.3s;
- -moz-transition: border 0.3s;
- font-size: 14px;
- line-height: 16px;
-}
-
-form.navbar-search .search-query:focus, form.navbar-search .search-query:active {
- border: 1px solid #666;
-}
-
-.navbar-search .search-query:focus, .navbar-search .search-query.focused {
- padding: 4px 9px;
-}
h3.api_title {
padding-top: 10px;
@@ -200,50 +181,6 @@ ul.menu {
Members and the tabs that represent them
*/
-.members {
-/* width: 800px; */
- /*width: 700px;*/
-/* margin: 0 10px;*/
-
- height: 42px;
- left: 0;
-/* position: fixed;*/
- top: 0;
-/* transition-duration: 300ms, 300ms;
- transition-property: box-shadow, height;
- transition-timing-function: ease-out, ease-out;
- -moz-transition-duration: 300ms, 300ms;
- -moz-transition-property: -moz-box-shadow, height;
- -moz-transition-timing-function: ease-out, ease-out;
- -o-transition-duration: 300ms, 300ms;
- -o-transition-property: -o-box-shadow, height;
- -o-transition-timing-function: ease-out, ease-out;
- -webkit-transition-duration: 300ms, 300ms;
- -webkit-transition-property: -webkit-box-shadow, height;
- -webkit-transition-timing-function: ease-out, ease-out;*/
-/* width: 100%;*/
- /*transition-duration: 300ms;
- transition-property: box-shadow;
- transition-timing-function: ease-out;
- -moz-transition-duration: 300ms, 300ms;
- -moz-transition-property: -moz-box-shadow, height;
- -moz-transition-timing-function: ease-out, ease-out;
- -o-transition-duration: 300ms;
- -o-transition-property: -o-box-shadow;
- -o-transition-timing-function: ease-out;*/
- -webkit-transition-duration: 400ms, 0ms;
- -webkit-transition-property: -webkit-box-shadow, background;
- -webkit-transition-timing-function: ease-out, ease-out;
- z-index: 100;
- padding-bottom : 5px;
- overflow: visible !important;
-
-/* background: #FFF;
- width: 100%;
- padding-bottom: 13px;
- top: 40px;
- position: fixed;*/
-}
.srolled .members {
width: 100%;
/* -webkit-box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.35);
@@ -339,13 +276,18 @@ ul.menu {
}
+ul.tabs li:first-child ul{
+ left: -63px;
+}
+
.tabs a.menu:after, .tabs .dropdown-toggle:after {
margin-top: 22px;
}
-.dropdown .caret {
- margin-top: 14px;
- color: #6D8CA0;
+.nav .dropdown-toggle .caret {
+ margin-top: 12px;
+ border-top-color: #6D8CA0;
+ border-bottom-color: #6D8CA0;
}
li.dropdown {
@@ -393,14 +335,10 @@ li.dropdown {
margin-left: 6px;
}
-.members .tabs ul li {
- font-weight: bold;
-}
-
.memberLink a {
margin-left: 0 !important;
}
-.menu-dropdown, .dropdown-menu {
+.menu-dropdown {
min-width : 105px;
max-height: 350px;
overflow: auto;
@@ -413,9 +351,6 @@ li.dropdown {
background-color: #ffffff;
color: #000000;
}
-.dropdown-menu {
- border-top: none;
-}
.tabs a.menu:after, .tabs .dropdown-toggle:after {
margin-top: 13px;
@@ -463,9 +398,8 @@ li.dropdown {
}
.tabs .menu-dropdown, .tabs .dropdown-menu {
border-radius: 0 0 6px 6px;
- top: 32px;
- right: 0px;
- width: 150px;
+ left: 10px;
+ width: 160px;
}
.srolled .tabs .menu-dropdown, .srolled .tabs .dropdown-menu {
top: 32px;
@@ -501,10 +435,6 @@ ul.tabs .double ul, ul.tabs .triple ul, ul.tabs .quad ul{
.content {
height: 100%;
}
-.content .row {
- margin-left: auto;
- margin-right: auto;
-}
header.filler {
position: relative;
@@ -512,11 +442,6 @@ header.filler {
width: 100%;
}
-.centerpiece {
- min-height: 100%;
- padding: 20px 0;
-}
-
/*
.container-fluid .row-fluid {
width: 1000px;
@@ -530,26 +455,21 @@ header.filler {
margin-bottom: 3px;
}
-#sidebar {
- margin-top: 5px;
- /*background: url(../images/sidebar-border.png) repeat-y right 0;*/
- margin-left: 12px;
-/* width: 280px;*/
-/* overflow: auto;*/
- padding-right : 10px;
-}
-
#sidebar h3 a,
#sidebar h3 a:hover {
color: #404040;
}
+#sidebarContainer {
+ padding-top: 20px;
+}
+
#mainContent {
margin-left: 30px;
}
#documentation {
- padding-left: 15px;
+ padding-top: 35px;
padding-bottom: 10px;
}
@@ -571,7 +491,6 @@ div#documentation article:last-child {
}
#documentation article.article.methodToggleOpen {
background: rgba(255, 255, 255, 0.5);
- padding: 20px;
font-size: 13px;
line-height: 24px;
margin: 0 0 10px 0;
@@ -707,7 +626,7 @@ li.signature {
.eventObjName {
font-style: italic;
}
-.eventListenerStart, .eventFunctionOpen, .eventFunctionClose {
+.eventListenerStart, .eventListenerClose, .eventFunctionOpen, .eventFunctionClose {
color: #999999;
}
.eventMember {
@@ -743,6 +662,11 @@ li.signature {
text-transform: capitalize;
}
+.undocumented {
+ background-color: #B94A48;
+ color: #ffffff;
+}
+
#documentation .alias a, #documentation .related-to a {
color: #ffffff;
/* text-decoration: underline; */
@@ -774,8 +698,8 @@ li.signature {
color: #ffffff;
}
.description h4 {
+ padding-top: 10px;
font-size: 18px;
- margin: 20px 0 10px;
line-height : 18px;
}
@@ -798,10 +722,6 @@ li.signature {
Everyday I'm togglin'
*/
-#documentation h3 {
- font-size: 24px;
- margin-top: 5px;
-}
#documentation i.methodToggle {
cursor: pointer;
color: #9f9f9f;
@@ -830,7 +750,6 @@ li.signature {
}
#documentation h3.sectionHeader {
- margin: 10px 0 17px 0;
line-height : 24px;
}
diff --git a/api/resources/csses/bootstrap.min.css b/api/resources/csses/bootstrap.min.css
deleted file mode 100644
index c9514677..00000000
--- a/api/resources/csses/bootstrap.min.css
+++ /dev/null
@@ -1,689 +0,0 @@
-article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
-audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
-audio:not([controls]){display:none;}
-html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
-a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
-a:hover,a:active{outline:0;}
-sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
-sup{top:-0.5em;}
-sub{bottom:-0.25em;}
-img{height:auto;border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;}
-button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
-button,input{*overflow:visible;line-height:normal;}
-button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
-button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
-input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
-input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
-textarea{overflow:auto;vertical-align:top;}
-.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
-.clearfix:after{clear:both;}
-.hide-text{overflow:hidden;text-indent:100%;white-space:nowrap;}
-.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
-body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
-a{color:#0088cc;text-decoration:none;}
-a:hover{color:#005580;text-decoration:underline;}
-.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
-.row:after{clear:both;}
-[class*="span"]{float:left;margin-left:20px;}
-.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
-.span12{width:940px;}
-.span11{width:860px;}
-.span10{width:780px;}
-.span9{width:700px;}
-.span8{width:620px;}
-.span7{width:540px;}
-.span6{width:460px;}
-.span5{width:380px;}
-.span4{width:300px;}
-.span3{width:220px;}
-.span2{width:140px;}
-.span1{width:60px;}
-.offset12{margin-left:980px;}
-.offset11{margin-left:900px;}
-.offset10{margin-left:820px;}
-.offset9{margin-left:740px;}
-.offset8{margin-left:660px;}
-.offset7{margin-left:580px;}
-.offset6{margin-left:500px;}
-.offset5{margin-left:420px;}
-.offset4{margin-left:340px;}
-.offset3{margin-left:260px;}
-.offset2{margin-left:180px;}
-.offset1{margin-left:100px;}
-.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
-.row-fluid:after{clear:both;}
-.row-fluid>[class*="span"]{float:left;margin-left:2.127659574%;}
-.row-fluid>[class*="span"]:first-child{margin-left:0;}
-.row-fluid > .span12{width:99.99999998999999%;}
-.row-fluid > .span11{width:91.489361693%;}
-.row-fluid > .span10{width:82.97872339599999%;}
-.row-fluid > .span9{width:74.468085099%;}
-.row-fluid > .span8{width:65.95744680199999%;}
-.row-fluid > .span7{width:57.446808505%;}
-.row-fluid > .span6{width:48.93617020799999%;}
-.row-fluid > .span5{width:40.425531911%;}
-.row-fluid > .span4{width:31.914893614%;}
-.row-fluid > .span3{width:23.404255317%;}
-.row-fluid > .span2{width:14.89361702%;}
-.row-fluid > .span1{width:6.382978723%;}
-.container{margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
-.container:after{clear:both;}
-.container-fluid{padding-left:20px;padding-right:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
-.container-fluid:after{clear:both;}
-p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
-.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
-h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
-h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
-h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
-h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;}
-h4,h5,h6{line-height:18px;}
-h4{font-size:14px;}h4 small{font-size:12px;}
-h5{font-size:12px;}
-h6{font-size:11px;color:#999999;text-transform:uppercase;}
-.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
-.page-header h1{line-height:1;}
-ul,ol{padding:0;margin:0 0 9px 25px;}
-ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
-ul{list-style:disc;}
-ol{list-style:decimal;}
-li{line-height:18px;}
-ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
-dl{margin-bottom:18px;}
-dt,dd{line-height:18px;}
-dt{font-weight:bold;line-height:17px;}
-dd{margin-left:9px;}
-.dl-horizontal dt{float:left;clear:left;width:120px;text-align:right;}
-.dl-horizontal dd{margin-left:130px;}
-hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
-strong{font-weight:bold;}
-em{font-style:italic;}
-.muted{color:#999999;}
-abbr[title]{border-bottom:1px dotted #ddd;cursor:help;}
-abbr.initialism{font-size:90%;text-transform:uppercase;}
-blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
-blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
-blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eeeeee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
-q:before,q:after,blockquote:before,blockquote:after{content:"";}
-address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;}
-small{font-size:100%;}
-cite{font-style:normal;}
-code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
-pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;word-wrap:break-word;}pre.prettyprint{margin-bottom:18px;}
-pre code{padding:0;color:inherit;background-color:transparent;border:0;}
-.pre-scrollable{max-height:340px;overflow-y:scroll;}
-form{margin:0 0 18px;}
-fieldset{padding:0;margin:0;border:0;}
-legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}legend small{font-size:13.5px;color:#999999;}
-label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;}
-input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
-label{display:block;margin-bottom:5px;color:#333333;}
-input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;border:1px solid #cccccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.uneditable-textarea{width:auto;height:auto;}
-label input,label textarea,label select{display:block;}
-input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;border:0 \9;}
-input[type="image"]{border:0;}
-input[type="file"]{width:auto;padding:initial;line-height:initial;border:initial;background-color:#ffffff;background-color:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;}
-select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;}
-input[type="file"]{line-height:18px \9;}
-select{width:220px;background-color:#ffffff;}
-select[multiple],select[size]{height:auto;}
-input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-textarea{height:auto;}
-input[type="hidden"]{display:none;}
-.radio,.checkbox{padding-left:18px;}
-.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;}
-.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
-.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
-.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
-input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;}
-input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);outline:0;outline:thin dotted \9;}
-input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
-.input-mini{width:60px;}
-.input-small{width:90px;}
-.input-medium{width:150px;}
-.input-large{width:210px;}
-.input-xlarge{width:270px;}
-.input-xxlarge{width:530px;}
-input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{float:none;margin-left:0;}
-input,textarea,.uneditable-input{margin-left:0;}
-input.span12, textarea.span12, .uneditable-input.span12{width:930px;}
-input.span11, textarea.span11, .uneditable-input.span11{width:850px;}
-input.span10, textarea.span10, .uneditable-input.span10{width:770px;}
-input.span9, textarea.span9, .uneditable-input.span9{width:690px;}
-input.span8, textarea.span8, .uneditable-input.span8{width:610px;}
-input.span7, textarea.span7, .uneditable-input.span7{width:530px;}
-input.span6, textarea.span6, .uneditable-input.span6{width:450px;}
-input.span5, textarea.span5, .uneditable-input.span5{width:370px;}
-input.span4, textarea.span4, .uneditable-input.span4{width:290px;}
-input.span3, textarea.span3, .uneditable-input.span3{width:210px;}
-input.span2, textarea.span2, .uneditable-input.span2{width:130px;}
-input.span1, textarea.span1, .uneditable-input.span1{width:50px;}
-input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#eeeeee;border-color:#ddd;cursor:not-allowed;}
-.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
-.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;}
-.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
-.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
-.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;}
-.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
-.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
-.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;}
-.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
-input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
-.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#eeeeee;border-top:1px solid #ddd;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";}
-.form-actions:after{clear:both;}
-.uneditable-input{display:block;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
-:-moz-placeholder{color:#999999;}
-::-webkit-input-placeholder{color:#999999;}
-.help-block,.help-inline{color:#555555;}
-.help-block{display:block;margin-bottom:9px;}
-.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
-.input-prepend,.input-append{margin-bottom:5px;}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{*margin-left:0;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{position:relative;z-index:2;}
-.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;}
-.input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;min-width:16px;height:18px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #ffffff;vertical-align:middle;background-color:#eeeeee;border:1px solid #ccc;}
-.input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;}
-.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
-.input-append input,.input-append select .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-append .uneditable-input{border-left-color:#eee;border-right-color:#ccc;}
-.input-append .add-on,.input-append .btn{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
-.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
-.search-query{padding-left:14px;padding-right:14px;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;}
-.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;margin-bottom:0;}
-.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
-.form-search label,.form-inline label{display:inline-block;}
-.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
-.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
-.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-left:0;margin-right:3px;}
-.control-group{margin-bottom:9px;}
-legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;}
-.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";}
-.form-horizontal .control-group:after{clear:both;}
-.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;}
-.form-horizontal .controls{margin-left:160px;*display:inline-block;*margin-left:0;*padding-left:20px;}
-.form-horizontal .help-block{margin-top:9px;margin-bottom:0;}
-.form-horizontal .form-actions{padding-left:160px;}
-table{max-width:100%;border-collapse:collapse;border-spacing:0;background-color:transparent;}
-.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
-.table th{font-weight:bold;}
-.table thead th{vertical-align:bottom;}
-.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
-.table tbody+tbody{border-top:2px solid #dddddd;}
-.table-condensed th,.table-condensed td{padding:4px 5px;}
-.table-bordered{border:1px solid #dddddd;border-left:0;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
-.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
-.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
-.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
-.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
-.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
-.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
-.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
-table .span1{float:none;width:44px;margin-left:0;}
-table .span2{float:none;width:124px;margin-left:0;}
-table .span3{float:none;width:204px;margin-left:0;}
-table .span4{float:none;width:284px;margin-left:0;}
-table .span5{float:none;width:364px;margin-left:0;}
-table .span6{float:none;width:444px;margin-left:0;}
-table .span7{float:none;width:524px;margin-left:0;}
-table .span8{float:none;width:604px;margin-left:0;}
-table .span9{float:none;width:684px;margin-left:0;}
-table .span10{float:none;width:764px;margin-left:0;}
-table .span11{float:none;width:844px;margin-left:0;}
-table .span12{float:none;width:924px;margin-left:0;}
-table .span13{float:none;width:1004px;margin-left:0;}
-table .span14{float:none;width:1084px;margin-left:0;}
-table .span15{float:none;width:1164px;margin-left:0;}
-table .span16{float:none;width:1244px;margin-left:0;}
-table .span17{float:none;width:1324px;margin-left:0;}
-table .span18{float:none;width:1404px;margin-left:0;}
-table .span19{float:none;width:1484px;margin-left:0;}
-table .span20{float:none;width:1564px;margin-left:0;}
-table .span21{float:none;width:1644px;margin-left:0;}
-table .span22{float:none;width:1724px;margin-left:0;}
-table .span23{float:none;width:1804px;margin-left:0;}
-table .span24{float:none;width:1884px;margin-left:0;}
-[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;}
-.icon-white{background-image:url("../img/glyphicons-halflings-white.png");}
-.icon-glass{background-position:0 0;}
-.icon-music{background-position:-24px 0;}
-.icon-search{background-position:-48px 0;}
-.icon-envelope{background-position:-72px 0;}
-.icon-heart{background-position:-96px 0;}
-.icon-star{background-position:-120px 0;}
-.icon-star-empty{background-position:-144px 0;}
-.icon-user{background-position:-168px 0;}
-.icon-film{background-position:-192px 0;}
-.icon-th-large{background-position:-216px 0;}
-.icon-th{background-position:-240px 0;}
-.icon-th-list{background-position:-264px 0;}
-.icon-ok{background-position:-288px 0;}
-.icon-remove{background-position:-312px 0;}
-.icon-zoom-in{background-position:-336px 0;}
-.icon-zoom-out{background-position:-360px 0;}
-.icon-off{background-position:-384px 0;}
-.icon-signal{background-position:-408px 0;}
-.icon-cog{background-position:-432px 0;}
-.icon-trash{background-position:-456px 0;}
-.icon-home{background-position:0 -24px;}
-.icon-file{background-position:-24px -24px;}
-.icon-time{background-position:-48px -24px;}
-.icon-road{background-position:-72px -24px;}
-.icon-download-alt{background-position:-96px -24px;}
-.icon-download{background-position:-120px -24px;}
-.icon-upload{background-position:-144px -24px;}
-.icon-inbox{background-position:-168px -24px;}
-.icon-play-circle{background-position:-192px -24px;}
-.icon-repeat{background-position:-216px -24px;}
-.icon-refresh{background-position:-240px -24px;}
-.icon-list-alt{background-position:-264px -24px;}
-.icon-lock{background-position:-287px -24px;}
-.icon-flag{background-position:-312px -24px;}
-.icon-headphones{background-position:-336px -24px;}
-.icon-volume-off{background-position:-360px -24px;}
-.icon-volume-down{background-position:-384px -24px;}
-.icon-volume-up{background-position:-408px -24px;}
-.icon-qrcode{background-position:-432px -24px;}
-.icon-barcode{background-position:-456px -24px;}
-.icon-tag{background-position:0 -48px;}
-.icon-tags{background-position:-25px -48px;}
-.icon-book{background-position:-48px -48px;}
-.icon-bookmark{background-position:-72px -48px;}
-.icon-print{background-position:-96px -48px;}
-.icon-camera{background-position:-120px -48px;}
-.icon-font{background-position:-144px -48px;}
-.icon-bold{background-position:-167px -48px;}
-.icon-italic{background-position:-192px -48px;}
-.icon-text-height{background-position:-216px -48px;}
-.icon-text-width{background-position:-240px -48px;}
-.icon-align-left{background-position:-264px -48px;}
-.icon-align-center{background-position:-288px -48px;}
-.icon-align-right{background-position:-312px -48px;}
-.icon-align-justify{background-position:-336px -48px;}
-.icon-list{background-position:-360px -48px;}
-.icon-indent-left{background-position:-384px -48px;}
-.icon-indent-right{background-position:-408px -48px;}
-.icon-facetime-video{background-position:-432px -48px;}
-.icon-picture{background-position:-456px -48px;}
-.icon-pencil{background-position:0 -72px;}
-.icon-map-marker{background-position:-24px -72px;}
-.icon-adjust{background-position:-48px -72px;}
-.icon-tint{background-position:-72px -72px;}
-.icon-edit{background-position:-96px -72px;}
-.icon-share{background-position:-120px -72px;}
-.icon-check{background-position:-144px -72px;}
-.icon-move{background-position:-168px -72px;}
-.icon-step-backward{background-position:-192px -72px;}
-.icon-fast-backward{background-position:-216px -72px;}
-.icon-backward{background-position:-240px -72px;}
-.icon-play{background-position:-264px -72px;}
-.icon-pause{background-position:-288px -72px;}
-.icon-stop{background-position:-312px -72px;}
-.icon-forward{background-position:-336px -72px;}
-.icon-fast-forward{background-position:-360px -72px;}
-.icon-step-forward{background-position:-384px -72px;}
-.icon-eject{background-position:-408px -72px;}
-.icon-chevron-left{background-position:-432px -72px;}
-.icon-chevron-right{background-position:-456px -72px;}
-.icon-plus-sign{background-position:0 -96px;}
-.icon-minus-sign{background-position:-24px -96px;}
-.icon-remove-sign{background-position:-48px -96px;}
-.icon-ok-sign{background-position:-72px -96px;}
-.icon-question-sign{background-position:-96px -96px;}
-.icon-info-sign{background-position:-120px -96px;}
-.icon-screenshot{background-position:-144px -96px;}
-.icon-remove-circle{background-position:-168px -96px;}
-.icon-ok-circle{background-position:-192px -96px;}
-.icon-ban-circle{background-position:-216px -96px;}
-.icon-arrow-left{background-position:-240px -96px;}
-.icon-arrow-right{background-position:-264px -96px;}
-.icon-arrow-up{background-position:-289px -96px;}
-.icon-arrow-down{background-position:-312px -96px;}
-.icon-share-alt{background-position:-336px -96px;}
-.icon-resize-full{background-position:-360px -96px;}
-.icon-resize-small{background-position:-384px -96px;}
-.icon-plus{background-position:-408px -96px;}
-.icon-minus{background-position:-433px -96px;}
-.icon-asterisk{background-position:-456px -96px;}
-.icon-exclamation-sign{background-position:0 -120px;}
-.icon-gift{background-position:-24px -120px;}
-.icon-leaf{background-position:-48px -120px;}
-.icon-fire{background-position:-72px -120px;}
-.icon-eye-open{background-position:-96px -120px;}
-.icon-eye-close{background-position:-120px -120px;}
-.icon-warning-sign{background-position:-144px -120px;}
-.icon-plane{background-position:-168px -120px;}
-.icon-calendar{background-position:-192px -120px;}
-.icon-random{background-position:-216px -120px;}
-.icon-comment{background-position:-240px -120px;}
-.icon-magnet{background-position:-264px -120px;}
-.icon-chevron-up{background-position:-288px -120px;}
-.icon-chevron-down{background-position:-313px -119px;}
-.icon-retweet{background-position:-336px -120px;}
-.icon-shopping-cart{background-position:-360px -120px;}
-.icon-folder-close{background-position:-384px -120px;}
-.icon-folder-open{background-position:-408px -120px;}
-.icon-resize-vertical{background-position:-432px -119px;}
-.icon-resize-horizontal{background-position:-456px -118px;}
-.dropdown{position:relative;}
-.dropdown-toggle{*margin-bottom:-3px;}
-.dropdown-toggle:active,.open .dropdown-toggle{outline:0;}
-.caret{display:inline-block;width:0;height:0;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000000;opacity:0.3;filter:alpha(opacity=30);content:"";}
-.dropdown .caret{margin-top:8px;margin-left:2px;}
-.dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100);}
-.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;padding:4px 0;margin:0;list-style:none;background-color:#ffffff;border-color:#ccc;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;}.dropdown-menu.pull-right{right:0;left:auto;}
-.dropdown-menu .divider{height:1px;margin:8px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;}
-.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#333333;white-space:nowrap;}
-.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;}
-.dropdown.open{*z-index:1000;}.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
-.dropdown.open .dropdown-menu{display:block;}
-.pull-right .dropdown-menu{left:auto;right:0;}
-.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"\2191";}
-.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;}
-.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
-.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
-.collapse{-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;position:relative;overflow:hidden;height:0;}.collapse.in{height:auto;}
-.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;opacity:0.4;filter:alpha(opacity=40);cursor:pointer;}
-.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(top, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);border:1px solid #cccccc;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);cursor:pointer;*margin-left:.3em;}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;}
-.btn:active,.btn.active{background-color:#cccccc \9;}
-.btn:first-child{*margin-left:0;}
-.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
-.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
-.btn.active,.btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;outline:0;}
-.btn.disabled,.btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
-.btn-large [class^="icon-"]{margin-top:1px;}
-.btn-small{padding:5px 9px;font-size:11px;line-height:16px;}
-.btn-small [class^="icon-"]{margin-top:-1px;}
-.btn-mini{padding:2px 6px;font-size:11px;line-height:14px;}
-.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);color:#ffffff;}
-.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
-.btn-primary{background-color:#0074cc;background-image:-moz-linear-gradient(top, #0088cc, #0055cc);background-image:-ms-linear-gradient(top, #0088cc, #0055cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image:-webkit-linear-gradient(top, #0088cc, #0055cc);background-image:-o-linear-gradient(top, #0088cc, #0055cc);background-image:linear-gradient(top, #0088cc, #0055cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);border-color:#0055cc #0055cc #003580;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0055cc;}
-.btn-primary:active,.btn-primary.active{background-color:#004099 \9;}
-.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;}
-.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
-.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;}
-.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
-.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;}
-.btn-success:active,.btn-success.active{background-color:#408140 \9;}
-.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;}
-.btn-info:active,.btn-info.active{background-color:#24748c \9;}
-.btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222222;}
-.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
-button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
-button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
-button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
-button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
-.btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";}
-.btn-group:after{clear:both;}
-.btn-group:first-child{*margin-left:0;}
-.btn-group+.btn-group{margin-left:5px;}
-.btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;}
-.btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
-.btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
-.btn-group .btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
-.btn-group .btn.large:last-child,.btn-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
-.btn-group .btn:hover,.btn-group .btn:focus,.btn-group .btn:active,.btn-group .btn.active{z-index:2;}
-.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
-.btn-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);*padding-top:3px;*padding-bottom:3px;}
-.btn-group .btn-mini.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:1px;*padding-bottom:1px;}
-.btn-group .btn-small.dropdown-toggle{*padding-top:4px;*padding-bottom:4px;}
-.btn-group .btn-large.dropdown-toggle{padding-left:12px;padding-right:12px;}
-.btn-group.open{*z-index:1000;}.btn-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
-.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);}
-.btn .caret{margin-top:7px;margin-left:0;}
-.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);}
-.btn-mini .caret{margin-top:5px;}
-.btn-small .caret{margin-top:6px;}
-.btn-large .caret{margin-top:6px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);}
-.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#c09853;}
-.alert-heading{color:inherit;}
-.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;}
-.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
-.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
-.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
-.alert-block{padding-top:14px;padding-bottom:14px;}
-.alert-block>p,.alert-block>ul{margin-bottom:0;}
-.alert-block p+p{margin-top:5px;}
-.nav{margin-left:0;margin-bottom:18px;list-style:none;}
-.nav>li>a{display:block;}
-.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;}
-.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
-.nav li+.nav-header{margin-top:9px;}
-.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
-.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
-.nav-list>li>a{padding:3px 15px;}
-.nav-list>.active>a,.nav-list>.active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
-.nav-list [class^="icon-"]{margin-right:2px;}
-.nav-list .divider{height:1px;margin:8px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;}
-.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";}
-.nav-tabs:after,.nav-pills:after{clear:both;}
-.nav-tabs>li,.nav-pills>li{float:left;}
-.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
-.nav-tabs{border-bottom:1px solid #ddd;}
-.nav-tabs>li{margin-bottom:-1px;}
-.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:18px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;}
-.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
-.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
-.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#ffffff;background-color:#0088cc;}
-.nav-stacked>li{float:none;}
-.nav-stacked>li>a{margin-right:0;}
-.nav-tabs.nav-stacked{border-bottom:0;}
-.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
-.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
-.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;}
-.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
-.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
-.nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px;}
-.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
-.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580;}
-.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;border-bottom-color:#333333;}
-.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;}
-.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;}
-.nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
-.tabs-stacked .open>a:hover{border-color:#999999;}
-.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";}
-.tabbable:after{clear:both;}
-.tab-content{display:table;width:100%;}
-.tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0;}
-.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
-.tab-content>.active,.pill-content>.active{display:block;}
-.tabs-below .nav-tabs{border-top:1px solid #ddd;}
-.tabs-below .nav-tabs>li{margin-top:-1px;margin-bottom:0;}
-.tabs-below .nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below .nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;}
-.tabs-below .nav-tabs .active>a,.tabs-below .nav-tabs .active>a:hover{border-color:transparent #ddd #ddd #ddd;}
-.tabs-left .nav-tabs>li,.tabs-right .nav-tabs>li{float:none;}
-.tabs-left .nav-tabs>li>a,.tabs-right .nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
-.tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
-.tabs-left .nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
-.tabs-left .nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
-.tabs-left .nav-tabs .active>a,.tabs-left .nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
-.tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
-.tabs-right .nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
-.tabs-right .nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
-.tabs-right .nav-tabs .active>a,.tabs-right .nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
-.navbar{*position:relative;*z-index:2;overflow:visible;margin-bottom:18px;}
-.navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
-.navbar .container{width:auto;}
-.btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222222;}
-.btn-navbar:active,.btn-navbar.active{background-color:#080808 \9;}
-.btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
-.btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
-.nav-collapse.collapse{height:auto;}
-.navbar{color:#999999;}.navbar .brand:hover{text-decoration:none;}
-.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;}
-.navbar .navbar-text{margin-bottom:0;line-height:40px;}
-.navbar .btn,.navbar .btn-group{margin-top:5px;}
-.navbar .btn-group .btn{margin-top:0;}
-.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";}
-.navbar-form:after{clear:both;}
-.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
-.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0;}
-.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
-.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;}
-.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;background-color:#626262;border:1px solid #151515;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query:-moz-placeholder{color:#cccccc;}
-.navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;}
-.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
-.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
-.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
-.navbar-fixed-top{top:0;}
-.navbar-fixed-bottom{bottom:0;}
-.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
-.navbar .nav.pull-right{float:right;}
-.navbar .nav>li{display:block;float:left;}
-.navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
-.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;}
-.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;}
-.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;}
-.navbar .nav.pull-right{margin-left:10px;margin-right:0;}
-.navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
-.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
-.navbar-fixed-bottom .dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;}
-.navbar-fixed-bottom .dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;}
-.navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
-.navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100);}
-.navbar .nav .open>.dropdown-toggle,.navbar .nav .active>.dropdown-toggle,.navbar .nav .open.active>.dropdown-toggle{background-color:transparent;}
-.navbar .nav .active>.dropdown-toggle:hover{color:#ffffff;}
-.navbar .nav.pull-right .dropdown-menu,.navbar .nav .dropdown-menu.pull-right{left:auto;right:0;}.navbar .nav.pull-right .dropdown-menu:before,.navbar .nav .dropdown-menu.pull-right:before{left:auto;right:12px;}
-.navbar .nav.pull-right .dropdown-menu:after,.navbar .nav .dropdown-menu.pull-right:after{left:auto;right:13px;}
-.breadcrumb{padding:7px 14px;margin:0 0 18px;list-style:none;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;}
-.breadcrumb .divider{padding:0 5px;color:#999999;}
-.breadcrumb .active a{color:#333333;}
-.pagination{height:36px;margin:18px 0;}
-.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
-.pagination li{display:inline;}
-.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;}
-.pagination a:hover,.pagination .active a{background-color:#f5f5f5;}
-.pagination .active a{color:#999999;cursor:default;}
-.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999999;background-color:transparent;cursor:default;}
-.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
-.pagination-centered{text-align:center;}
-.pagination-right{text-align:right;}
-.pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";}
-.pager:after{clear:both;}
-.pager li{display:inline;}
-.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
-.pager a:hover{text-decoration:none;background-color:#f5f5f5;}
-.pager .next a{float:right;}
-.pager .previous a{float:left;}
-.pager .disabled a,.pager .disabled a:hover{color:#999999;background-color:#fff;cursor:default;}
-.modal-open .dropdown-menu{z-index:2050;}
-.modal-open .dropdown.open{*z-index:2050;}
-.modal-open .popover{z-index:2060;}
-.modal-open .tooltip{z-index:2070;}
-.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;}
-.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);}
-.modal{position:fixed;top:50%;left:50%;z-index:1050;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
-.modal.fade.in{top:50%;}
-.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;}
-.modal-body{overflow-y:auto;max-height:400px;padding:15px;}
-.modal-form{margin-bottom:0;}
-.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";}
-.modal-footer:after{clear:both;}
-.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;}
-.modal-footer .btn-group .btn+.btn{margin-left:-1px;}
-.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
-.tooltip.top{margin-top:-2px;}
-.tooltip.right{margin-left:2px;}
-.tooltip.bottom{margin-top:2px;}
-.tooltip.left{margin-left:-2px;}
-.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
-.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
-.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
-.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.tooltip-arrow{position:absolute;width:0;height:0;}
-.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;}.popover.top{margin-top:-5px;}
-.popover.right{margin-left:5px;}
-.popover.bottom{margin-top:5px;}
-.popover.left{margin-left:-5px;}
-.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
-.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
-.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
-.popover .arrow{position:absolute;width:0;height:0;}
-.popover-inner{padding:3px;width:280px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
-.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;}
-.popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;}
-.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";}
-.thumbnails:after{clear:both;}
-.thumbnails>li{float:left;margin:0 0 18px 20px;}
-.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}
-a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
-.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
-.thumbnail .caption{padding:9px;}
-.label{padding:1px 4px 2px;font-size:10.998px;font-weight:bold;line-height:13px;color:#ffffff;vertical-align:middle;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.label:hover{color:#ffffff;text-decoration:none;}
-.label-important{background-color:#b94a48;}
-.label-important:hover{background-color:#953b39;}
-.label-warning{background-color:#f89406;}
-.label-warning:hover{background-color:#c67605;}
-.label-success{background-color:#468847;}
-.label-success:hover{background-color:#356635;}
-.label-info{background-color:#3a87ad;}
-.label-info:hover{background-color:#2d6987;}
-.label-inverse{background-color:#333333;}
-.label-inverse:hover{background-color:#1a1a1a;}
-.badge{padding:1px 9px 2px;font-size:12.025px;font-weight:bold;white-space:nowrap;color:#ffffff;background-color:#999999;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
-.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
-.badge-error{background-color:#b94a48;}
-.badge-error:hover{background-color:#953b39;}
-.badge-warning{background-color:#f89406;}
-.badge-warning:hover{background-color:#c67605;}
-.badge-success{background-color:#468847;}
-.badge-success:hover{background-color:#356635;}
-.badge-info{background-color:#3a87ad;}
-.badge-info:hover{background-color:#2d6987;}
-.badge-inverse{background-color:#333333;}
-.badge-inverse:hover{background-color:#1a1a1a;}
-@-webkit-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.progress .bar{width:0%;height:18px;color:#ffffff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
-.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
-.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}
-.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);}
-.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
-.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);}
-.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
-.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);}
-.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
-.progress-warning .bar{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);}
-.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
-.accordion{margin-bottom:18px;}
-.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.accordion-heading{border-bottom:0;}
-.accordion-heading .accordion-toggle{display:block;padding:8px 15px;}
-.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;}
-.carousel{position:relative;margin-bottom:18px;line-height:1;}
-.carousel-inner{overflow:hidden;width:100%;position:relative;}
-.carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;}
-.carousel .item>img{display:block;line-height:1;}
-.carousel .active,.carousel .next,.carousel .prev{display:block;}
-.carousel .active{left:0;}
-.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;}
-.carousel .next{left:100%;}
-.carousel .prev{left:-100%;}
-.carousel .next.left,.carousel .prev.right{left:0;}
-.carousel .active.left{left:-100%;}
-.carousel .active.right{left:100%;}
-.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;}
-.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);}
-.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);}
-.carousel-caption h4,.carousel-caption p{color:#ffffff;}
-.hero-unit{padding:60px;margin-bottom:30px;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
-.hero-unit p{font-size:18px;font-weight:200;line-height:27px;color:inherit;}
-.pull-right{float:right;}
-.pull-left{float:left;}
-.hide{display:none;}
-.show{display:block;}
-.invisible{visibility:hidden;}
diff --git a/api/resources/csses/font-awesome.css b/api/resources/csses/font-awesome.css
deleted file mode 100644
index 4697599c..00000000
--- a/api/resources/csses/font-awesome.css
+++ /dev/null
@@ -1,303 +0,0 @@
-/* Font Awesome
- the iconic font designed for use with Twitter Bootstrap
- -------------------------------------------------------
- The full suite of pictographic icons, examples, and documentation
- can be found at: http://fortawesome.github.com/Font-Awesome/
-
- License
- -------------------------------------------------------
- The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0:
- http://creativecommons.org/licenses/by/3.0/ A mention of
- 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable
- source code is considered acceptable attribution (most common on the web).
- If human readable source code is not available to the end user, a mention in
- an 'About' or 'Credits' screen is considered acceptable (most common in desktop
- or mobile software).
-
- Contact
- -------------------------------------------------------
- Email: dave@davegandy.com
- Twitter: http://twitter.com/fortaweso_me
- Work: http://lemonwi.se co-founder
-
- */
-@font-face {
- font-family: "FontAwesome";
- src: url('../font/fontawesome-webfont.eot');
- src: url('../font/fontawesome-webfont.eot?#iefix') format('eot'), url('../font/fontawesome-webfont.woff') format('woff'), url('../font/fontawesome-webfont.ttf') format('truetype'), url('../font/fontawesome-webfont.svg#FontAwesome') format('svg');
- font-weight: normal;
- font-style: normal;
-}
-
-/* Font Awesome styles
- ------------------------------------------------------- */
-[class^="icon-"]:before, [class*=" icon-"]:before {
- font-family: FontAwesome;
- font-weight: normal;
- font-style: normal;
- display: inline-block;
- text-decoration: inherit;
-}
-a [class^="icon-"], a [class*=" icon-"] {
- display: inline-block;
- text-decoration: inherit;
-}
-/* makes the font 33% larger relative to the icon container */
-.icon-large:before {
- vertical-align: top;
- font-size: 1.3333333333333333em;
-}
-.btn [class^="icon-"], .btn [class*=" icon-"] {
- /* keeps button heights with and without icons the same */
-
- line-height: .9em;
-}
-li [class^="icon-"], li [class*=" icon-"] {
- display: inline-block;
- width: 1.25em;
- text-align: center;
-}
-li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] {
- /* 1.5 increased font size for icon-large * 1.25 width */
-
- width: 1.875em;
-}
-li[class^="icon-"], li[class*=" icon-"] {
- margin-left: 0;
- list-style-type: none;
-}
-li[class^="icon-"]:before, li[class*=" icon-"]:before {
- text-indent: -2em;
- text-align: center;
-}
-li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before {
- text-indent: -1.3333333333333333em;
-}
-/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
- readers do not read off random characters that represent icons */
-.icon-glass:before { content: "\f000"; }
-.icon-music:before { content: "\f001"; }
-.icon-search:before { content: "\f002"; }
-.icon-envelope:before { content: "\f003"; }
-.icon-heart:before { content: "\f004"; }
-.icon-star:before { content: "\f005"; }
-.icon-star-empty:before { content: "\f006"; }
-.icon-user:before { content: "\f007"; }
-.icon-film:before { content: "\f008"; }
-.icon-th-large:before { content: "\f009"; }
-.icon-th:before { content: "\f00a"; }
-.icon-th-list:before { content: "\f00b"; }
-.icon-ok:before { content: "\f00c"; }
-.icon-remove:before { content: "\f00d"; }
-.icon-zoom-in:before { content: "\f00e"; }
-
-.icon-zoom-out:before { content: "\f010"; }
-.icon-off:before { content: "\f011"; }
-.icon-signal:before { content: "\f012"; }
-.icon-cog:before { content: "\f013"; }
-.icon-trash:before { content: "\f014"; }
-.icon-home:before { content: "\f015"; }
-.icon-file:before { content: "\f016"; }
-.icon-time:before { content: "\f017"; }
-.icon-road:before { content: "\f018"; }
-.icon-download-alt:before { content: "\f019"; }
-.icon-download:before { content: "\f01a"; }
-.icon-upload:before { content: "\f01b"; }
-.icon-inbox:before { content: "\f01c"; }
-.icon-play-circle:before { content: "\f01d"; }
-.icon-repeat:before { content: "\f01e"; }
-
-/* \f020 doesn't work in Safari. all shifted one down */
-.icon-refresh:before { content: "\f021"; }
-.icon-list-alt:before { content: "\f022"; }
-.icon-lock:before { content: "\f023"; }
-.icon-flag:before { content: "\f024"; }
-.icon-headphones:before { content: "\f025"; }
-.icon-volume-off:before { content: "\f026"; }
-.icon-volume-down:before { content: "\f027"; }
-.icon-volume-up:before { content: "\f028"; }
-.icon-qrcode:before { content: "\f029"; }
-.icon-barcode:before { content: "\f02a"; }
-.icon-tag:before { content: "\f02b"; }
-.icon-tags:before { content: "\f02c"; }
-.icon-book:before { content: "\f02d"; }
-.icon-bookmark:before { content: "\f02e"; }
-.icon-print:before { content: "\f02f"; }
-
-.icon-camera:before { content: "\f030"; }
-.icon-font:before { content: "\f031"; }
-.icon-bold:before { content: "\f032"; }
-.icon-italic:before { content: "\f033"; }
-.icon-text-height:before { content: "\f034"; }
-.icon-text-width:before { content: "\f035"; }
-.icon-align-left:before { content: "\f036"; }
-.icon-align-center:before { content: "\f037"; }
-.icon-align-right:before { content: "\f038"; }
-.icon-align-justify:before { content: "\f039"; }
-.icon-list:before { content: "\f03a"; }
-.icon-indent-left:before { content: "\f03b"; }
-.icon-indent-right:before { content: "\f03c"; }
-.icon-facetime-video:before { content: "\f03d"; }
-.icon-picture:before { content: "\f03e"; }
-
-.icon-pencil:before { content: "\f040"; }
-.icon-map-marker:before { content: "\f041"; }
-.icon-adjust:before { content: "\f042"; }
-.icon-tint:before { content: "\f043"; }
-.icon-edit:before { content: "\f044"; }
-.icon-share:before { content: "\f045"; }
-.icon-check:before { content: "\f046"; }
-.icon-move:before { content: "\f047"; }
-.icon-step-backward:before { content: "\f048"; }
-.icon-fast-backward:before { content: "\f049"; }
-.icon-backward:before { content: "\f04a"; }
-.icon-play:before { content: "\f04b"; }
-.icon-pause:before { content: "\f04c"; }
-.icon-stop:before { content: "\f04d"; }
-.icon-forward:before { content: "\f04e"; }
-
-.icon-fast-forward:before { content: "\f050"; }
-.icon-step-forward:before { content: "\f051"; }
-.icon-eject:before { content: "\f052"; }
-.icon-chevron-left:before { content: "\f053"; }
-.icon-chevron-right:before { content: "\f054"; }
-.icon-plus-sign:before { content: "\f055"; }
-.icon-minus-sign:before { content: "\f056"; }
-.icon-remove-sign:before { content: "\f057"; }
-.icon-ok-sign:before { content: "\f058"; }
-.icon-question-sign:before { content: "\f059"; }
-.icon-info-sign:before { content: "\f05a"; }
-.icon-screenshot:before { content: "\f05b"; }
-.icon-remove-circle:before { content: "\f05c"; }
-.icon-ok-circle:before { content: "\f05d"; }
-.icon-ban-circle:before { content: "\f05e"; }
-
-.icon-arrow-left:before { content: "\f060"; }
-.icon-arrow-right:before { content: "\f061"; }
-.icon-arrow-up:before { content: "\f062"; }
-.icon-arrow-down:before { content: "\f063"; }
-.icon-share-alt:before { content: "\f064"; }
-.icon-resize-full:before { content: "\f065"; }
-.icon-resize-small:before { content: "\f066"; }
-.icon-plus:before { content: "\f067"; }
-.icon-minus:before { content: "\f068"; }
-.icon-asterisk:before { content: "\f069"; }
-.icon-exclamation-sign:before { content: "\f06a"; }
-.icon-gift:before { content: "\f06b"; }
-.icon-leaf:before { content: "\f06c"; }
-.icon-fire:before { content: "\f06d"; }
-.icon-eye-open:before { content: "\f06e"; }
-
-.icon-eye-close:before { content: "\f070"; }
-.icon-warning-sign:before { content: "\f071"; }
-.icon-plane:before { content: "\f072"; }
-.icon-calendar:before { content: "\f073"; }
-.icon-random:before { content: "\f074"; }
-.icon-comment:before { content: "\f075"; }
-.icon-magnet:before { content: "\f076"; }
-.icon-chevron-up:before { content: "\f077"; }
-.icon-chevron-down:before { content: "\f078"; }
-.icon-retweet:before { content: "\f079"; }
-.icon-shopping-cart:before { content: "\f07a"; }
-.icon-folder-close:before { content: "\f07b"; }
-.icon-folder-open:before { content: "\f07c"; }
-.icon-resize-vertical:before { content: "\f07d"; }
-.icon-resize-horizontal:before { content: "\f07e"; }
-
-.icon-bar-chart:before { content: "\f080"; }
-.icon-twitter-sign:before { content: "\f081"; }
-.icon-facebook-sign:before { content: "\f082"; }
-.icon-camera-retro:before { content: "\f083"; }
-.icon-key:before { content: "\f084"; }
-.icon-cogs:before { content: "\f085"; }
-.icon-comments:before { content: "\f086"; }
-.icon-thumbs-up:before { content: "\f087"; }
-.icon-thumbs-down:before { content: "\f088"; }
-.icon-star-half:before { content: "\f089"; }
-.icon-heart-empty:before { content: "\f08a"; }
-.icon-signout:before { content: "\f08b"; }
-.icon-linkedin-sign:before { content: "\f08c"; }
-.icon-pushpin:before { content: "\f08d"; }
-.icon-external-link:before { content: "\f08e"; }
-
-.icon-signin:before { content: "\f090"; }
-.icon-trophy:before { content: "\f091"; }
-.icon-github-sign:before { content: "\f092"; }
-.icon-upload-alt:before { content: "\f093"; }
-.icon-lemon:before { content: "\f094"; }
-.icon-phone:before { content: "\f095"; }
-.icon-check-empty:before { content: "\f096"; }
-.icon-bookmark-empty:before { content: "\f097"; }
-.icon-phone-sign:before { content: "\f098"; }
-.icon-twitter:before { content: "\f099"; }
-.icon-facebook:before { content: "\f09a"; }
-.icon-github:before { content: "\f09b"; }
-.icon-unlock:before { content: "\f09c"; }
-.icon-credit-card:before { content: "\f09d"; }
-.icon-rss:before { content: "\f09e"; }
-
-.icon-hdd:before { content: "\f0a0"; }
-.icon-bullhorn:before { content: "\f0a1"; }
-.icon-bell:before { content: "\f0a2"; }
-.icon-certificate:before { content: "\f0a3"; }
-.icon-hand-right:before { content: "\f0a4"; }
-.icon-hand-left:before { content: "\f0a5"; }
-.icon-hand-up:before { content: "\f0a6"; }
-.icon-hand-down:before { content: "\f0a7"; }
-.icon-circle-arrow-left:before { content: "\f0a8"; }
-.icon-circle-arrow-right:before { content: "\f0a9"; }
-.icon-circle-arrow-up:before { content: "\f0aa"; }
-.icon-circle-arrow-down:before { content: "\f0ab"; }
-.icon-globe:before { content: "\f0ac"; }
-.icon-wrench:before { content: "\f0ad"; }
-.icon-tasks:before { content: "\f0ae"; }
-
-.icon-filter:before { content: "\f0b0"; }
-.icon-briefcase:before { content: "\f0b1"; }
-.icon-fullscreen:before { content: "\f0b2"; }
-
-.icon-group:before { content: "\f0c0"; }
-.icon-link:before { content: "\f0c1"; }
-.icon-cloud:before { content: "\f0c2"; }
-.icon-beaker:before { content: "\f0c3"; }
-.icon-cut:before { content: "\f0c4"; }
-.icon-copy:before { content: "\f0c5"; }
-.icon-paper-clip:before { content: "\f0c6"; }
-.icon-save:before { content: "\f0c7"; }
-.icon-sign-blank:before { content: "\f0c8"; }
-.icon-reorder:before { content: "\f0c9"; }
-.icon-list-ul:before { content: "\f0ca"; }
-.icon-list-ol:before { content: "\f0cb"; }
-.icon-strikethrough:before { content: "\f0cc"; }
-.icon-underline:before { content: "\f0cd"; }
-.icon-table:before { content: "\f0ce"; }
-
-.icon-magic:before { content: "\f0d0"; }
-.icon-truck:before { content: "\f0d1"; }
-.icon-pinterest:before { content: "\f0d2"; }
-.icon-pinterest-sign:before { content: "\f0d3"; }
-.icon-google-plus-sign:before { content: "\f0d4"; }
-.icon-google-plus:before { content: "\f0d5"; }
-.icon-money:before { content: "\f0d6"; }
-.icon-caret-down:before { content: "\f0d7"; }
-.icon-caret-up:before { content: "\f0d8"; }
-.icon-caret-left:before { content: "\f0d9"; }
-.icon-caret-right:before { content: "\f0da"; }
-.icon-columns:before { content: "\f0db"; }
-.icon-sort:before { content: "\f0dc"; }
-.icon-sort-down:before { content: "\f0dd"; }
-.icon-sort-up:before { content: "\f0de"; }
-
-.icon-envelope-alt:before { content: "\f0e0"; }
-.icon-linkedin:before { content: "\f0e1"; }
-.icon-undo:before { content: "\f0e2"; }
-.icon-legal:before { content: "\f0e3"; }
-.icon-dashboard:before { content: "\f0e4"; }
-.icon-comment-alt:before { content: "\f0e5"; }
-.icon-comments-alt:before { content: "\f0e6"; }
-.icon-bolt:before { content: "\f0e7"; }
-.icon-sitemap:before { content: "\f0e8"; }
-.icon-umbrella:before { content: "\f0e9"; }
-.icon-paste:before { content: "\f0ea"; }
-
-.icon-user-md:before { content: "\f200"; }
diff --git a/api/resources/images/Ace_ERD.png b/api/resources/images/Ace_ERD.png
new file mode 100644
index 00000000..78fb8dab
Binary files /dev/null and b/api/resources/images/Ace_ERD.png differ
diff --git a/api/resources/images/Ace_ERD.svg b/api/resources/images/Ace_ERD.svg
deleted file mode 100644
index ba386287..00000000
--- a/api/resources/images/Ace_ERD.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/api/resources/javascripts/jquery.js b/api/resources/javascripts/jquery.js
deleted file mode 100644
index 3ca5e0f5..00000000
--- a/api/resources/javascripts/jquery.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.7 jquery.com | jquery.org/license */
-(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"":"")+""),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;ca ",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p=""+"";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&&
-(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c ",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=" ",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="
";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/",""],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after"
-,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1>$2>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1>$2>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/
\ No newline at end of file
+
+
+
+
+
+
+
+
A set of methods for setting and retrieving the editor's scrollbar.
+
+
+
+
+
+
+
+
+
+
+
+
Creates a new ScrollBar. parent is the owner of the scroll bar.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ScrollBar .on(" scroll ", function( Object e))
+
+
+
+
+
+
+
+
Emitted when the scroll bar, well, scrolls.
+
+
Arguments e Object Required. Contains one property, "data", which indicates the current scroll top position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ScrollBar. getWidth ()
+
+
+
+
+
+
+
+
+
+
+
Returns the width of the scroll bar.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ScrollBar. setHeight (Number height )
+
+
+
+
+
+
+
+
Sets the height of the scroll bar, in pixels.
+
+
Arguments height Number Required. The new height
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ScrollBar. setInnerHeight (Number height )
+
+
+
+
+
+
+
+
Sets the inner height of the scroll bar, in pixels.
+
+
Arguments height Number Required. The new inner height
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ScrollBar. setScrollTop (Number scrollTop )
+
+
+
+
+
+
+
+
Sets the scroll top of the scroll bar.
+
+
Arguments scrollTop Number Required. The new scroll top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/search.html b/api/search.html
index a2e1f5f3..61616063 100644
--- a/api/search.html
+++ b/api/search.html
@@ -1,35 +1,295 @@
-
A class designed to handle all sorts of text searches within a Document .
-
Creates a new Search object. The following search options are avaliable:
-
Creates a new Search object. The following search options are avaliable:
+
+
+
+
+
+
+
+
A class designed to handle all sorts of text searches within a Document .
+
+
+
+
+
+
+
+
+
+
+
Creates a new Search object. The following search options are avaliable:
+
+
+
Creates a new Search object. The following search options are avaliable:
needle: The string or regular expression you're looking for
backwards: Whether to search backwards from where cursor currently is. Defaults to false.
wrap: Whether to wrap the search back to the beginning when it hits the end. Defaults to false.
caseSensitive: Whether the search ought to be case-sensitive. Defaults to false.
wholeWord: Whether the search matches only on whole words. Defaults to false.
-range: The Range to search within. Set this to null for the whole document
+range: The Range to search within. Set this to null for the whole document
regExp: Whether the search is a regular expression or not. Defaults to false.
-start: The starting Range or cursor position to begin the search
+start: The starting Range or cursor position to begin the search
skipCurrent: Whether or not to include the current line in the search. Default to false.
-
Arguments session EditSession Required. The session to search with
-
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
-
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
-
Arguments session EditSession Required. The session to search with
-
Searches for all occurances options.needle. If found, this method returns an array of Ranges where the text first occurs. If options.backwards is true, the search goes backwards in the session.
-
Searches for all occurances options.needle. If found, this method returns an array of Ranges where the text first occurs. If options.backwards is true, the search goes backwards in the session.
-
Arguments session EditSession Required. The session to search with
-
Returns an object containing all the search options.
-
Returns an object containing all the search options.
-
Searches for options.needle in input, and, if found, replaces it with replacement.
-
Searches for options.needle in input, and, if found, replaces it with replacement.
-
Arguments input String Required. The text to search in
-replacement String Required. The replacing text
-
Returns String If options.regExp is true, this function returns input with the replacement already made. Otherwise, this function just returns replacement.
+
+
+
+
+
+
+
+
+
+
+
+
+
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
+
+
+
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
+
+
Arguments session EditSession Required. The session to search with
+
+
+
+
+
+
+
+
+
+
+
+
Searches for all occurances options.needle. If found, this method returns an array of Ranges where the text first occurs. If options.backwards is true, the search goes backwards in the session.
+
+
+
Searches for all occurances options.needle. If found, this method returns an array of Ranges where the text first occurs. If options.backwards is true, the search goes backwards in the session.
+
+
Arguments session EditSession Required. The session to search with
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search. getOptions ()
+
+
+
+
+
+
+
+
+
+
Returns an object containing all the search options.
+
+
+
Returns an object containing all the search options.
+
+
+
+
+
+
+
+
+
+
+
+
Searches for options.needle in input, and, if found, replaces it with replacement.
+
+
+
Searches for options.needle in input, and, if found, replaces it with replacement.
+
+
Arguments input String Required. The text to search in
+replacement String Required. The replacing text
-If options.needle was not found, this function returns null.
+(String): If options.regExp is true, this function returns input with the replacement already made. Otherwise, this function just returns replacement.
+If options.needle was not found, this function returns null.
-
Sets the search options via the options parameter.
-
Sets the search options via the options parameter.
-
Arguments options Object Required. An object containing all the new search properties
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search. set (Object options )
+
+
+
+
+
+
+
+
+
+
Sets the search options via the options parameter.
+
+
+
Sets the search options via the options parameter.
+
+
Arguments options Object Required. An object containing all the new search properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/selection.html b/api/selection.html
index bb08acd7..4da8f771 100644
--- a/api/selection.html
+++ b/api/selection.html
@@ -1,123 +1,1781 @@
-
Contains the cursor position and the text selection of an edit session.
-
The row/columns used in the selection are in document coordinates representing ths coordinates as thez appear in the document before applying soft wrap and folding.
-
Creates a new Selection object.
-
Creates a new Selection object.
-
Arguments Selection .on(" changeCursor ", function( )) Emitted when the cursor position changes.
-
Emitted when the cursor position changes.
-
Selection .on(" changeSelection ", function( )) Emitted when the cursor selection changes.
-
Emitted when the cursor selection changes.
-
Adds a range to a selection by entering multiselect mode, if necessary.
-
Adds a range to a selection by entering multiselect mode, if necessary.
-
Arguments range Range Required. The new range to add
-$blockChangeEvents Boolean Required. Whether or not to block changing events
-
Selection. clearSelection ( )Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
-
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
-
Gets the current position of the cursor.
-
Gets the current position of the cursor.
-
Returns the Range for the selected text.
-
Returns the Range for the selected text.
-
Selection. getSelectionAnchor ( )Returns an object containing the row and column of the calling selection anchor.
-
Returns an object containing the row and column of the calling selection anchor.
-
Selection. getSelectionLead ( )Returns an object containing the row and column of the calling selection lead.
-
Returns an object containing the row and column of the calling selection lead.
-
Returns true if the selection is going backwards in the document.
-
Returns true if the selection is going backwards in the document.
-
Returns true if the selection is empty.
-
Returns true if the selection is empty.
-
Returns true if the selection is a multi-line.
-
Returns true if the selection is a multi-line.
-
Selection. mergeOverlappingRanges ( )Merges overlapping ranges ensuring consistency after changes
-
Merges overlapping ranges ensuring consistency after changes
-
Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
-
Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
-
Arguments rows Number Required. The number of rows to move by
-chars Number Required. The number of characters to move by
-
Selection. moveCursorDown ( )Moves the cursor down one row.
-
Moves the cursor down one row.
-
Selection. moveCursorFileEnd ( )Moves the cursor to the end of the file.
-
Moves the cursor to the end of the file.
-
Selection. moveCursorFileStart ( )Moves the cursor to the start of the file.
-
Moves the cursor to the start of the file.
-
Selection. moveCursorLeft ( )Moves the cursor left one column.
-
Moves the cursor left one column.
-
Selection. moveCursorLineEnd ( )Moves the cursor to the end of the line.
-
Moves the cursor to the end of the line.
-
Selection. moveCursorLineStart ( )Moves the cursor to the start of the line.
-
Moves the cursor to the start of the line.
-
Selection. moveCursorLongWordLeft ( )Moves the cursor to the word on the left.
-
Moves the cursor to the word on the left.
-
Selection. moveCursorLongWordRight ( )Moves the cursor to the word on the right.
-
Moves the cursor to the word on the right.
-
Selection. moveCursorRight ( )Moves the cursor right one column.
-
Moves the cursor right one column.
-
Moves the cursor to the row and column provided. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
-
Moves the cursor to the row and column provided. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
-
Arguments row Number Required. The row to move to
-column Number Required. The column to move to
-keepDesiredColumn Boolean Required. If true, the cursor move does not respect the previous column
-
Selection. moveCursorToPosition (Object position )Moves the selection to the position indicated by its row and column.
-
Moves the selection to the position indicated by its row and column.
-
Arguments position Object Required. The position to move to
-
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
-
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
-
Arguments row Number Required. The row to move to
-column Number Required. The column to move to
-keepDesiredColumn Boolean Required. If true, the cursor move does not respect the previous column
-
Moves the cursor up one row.
-
Moves the cursor up one row.
-
Selection. rectangularRangeBlock (Cursor screenCursor, Anchor screenAnchor, Boolean includeEmptyLines )Gets list of ranges composing rectangular block on the screen
-
Gets list of ranges composing rectangular block on the screen
-
Arguments screenCursor Cursor Required. The cursor to use
-screenAnchor Anchor Required. The anchor to use
-includeEmptyLines Boolean Required. If true, this includes ranges inside the block which are empty due to clipping
-
Selects all the text in the document.
-
Selects all the text in the document.
-
Selects a word, including its right whitespace.
-
Selects a word, including its right whitespace.
-
Moves the selection down one row.
-
Moves the selection down one row.
-
Selection. selectFileEnd ( )Moves the selection to the end of the file.
-
Moves the selection to the end of the file.
-
Selection. selectFileStart ( )Moves the selection to the start of the file.
-
Moves the selection to the start of the file.
-
Moves the selection left one column.
-
Moves the selection left one column.
-
Selects the entire line.
-
Selects the entire line.
-
Selection. selectLineEnd ( )Moves the selection to the end of the current line.
-
Moves the selection to the end of the current line.
-
Selection. selectLineStart ( )Moves the selection to the beginning of the current line.
-
Moves the selection to the beginning of the current line.
-
Moves the selection right one column.
-
Moves the selection right one column.
-
Moves the selection cursor to the indicated row and column.
-
Moves the selection cursor to the indicated row and column.
-
Arguments row Number Required. The row to select to
-column Number Required. The column to select to
-
Selection. selectToPosition (Object pos )Moves the selection cursor to the row and column indicated by pos.
-
Moves the selection cursor to the row and column indicated by pos.
-
Arguments pos Object Required. An object containing the row and column
-
Moves the selection up one row.
-
Moves the selection up one row.
-
Moves the selection to highlight the entire word.
-
Moves the selection to highlight the entire word.
-
Selection. selectWordLeft ( )Moves the selection to the first word on the left.
-
Moves the selection to the first word on the left.
-
Selection. selectWordRight ( )Moves the selection to the first word on the right.
-
Moves the selection to the first word on the right.
-
Sets the row and column position of the anchor. This function also emits the 'changeSelection' event.
-
Sets the row and column position of the anchor. This function also emits the 'changeSelection' event.
-
Arguments row Number Required. The new row
-column Number Required. The new column
-
Sets the selection to the provided range.
-
Sets the selection to the provided range.
-
Arguments range Range Required. The range of text to select
-reverse Boolean Required. Indicates if the range should go backwards (true) or not
-
Selection. shiftSelection (Number columns )Shifts the selection up (or down, if isBackwards() is true) the given number of columns.
-
Shifts the selection up (or down, if isBackwards() is true) the given number of columns.
-
Arguments columns Number Required. The number of columns to shift by
-
Selection. substractPoint (Range pos )Removes a Range containing pos (if it exists).
-
Removes a Range containing pos (if it exists).
-
Arguments pos Range Required. The position to remove, as a {row, column} object
-
\ No newline at end of file
+
+
+
+
+
+
+
+
Contains the cursor position and the text selection of an edit session.
+
The row/columns used in the selection are in document coordinates representing the coordinates as they appear in the document before applying soft wrap and folding.
+
+
+
+
+
+
+
+
+
+
+
Creates a new Selection object.
+
+
+
Creates a new Selection object.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection .on(" changeCursor ", function( ))
+
+
+
+
+
+
+
Emitted when the cursor position changes.
+
+
+
Emitted when the cursor position changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection .on(" changeSelection ", function( ))
+
+
+
+
+
+
+
Emitted when the cursor selection changes.
+
+
+
Emitted when the cursor selection changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. addRange (Range range, Boolean $blockChangeEvents )
+
+
+
+
+
+
+
Adds a range to a selection by entering multiselect mode, if necessary.
+
+
+
Adds a range to a selection by entering multiselect mode, if necessary.
+
+
Arguments range Range Required. The new range to add
+$blockChangeEvents Boolean Required. Whether or not to block changing events
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. clearSelection ()
+
+
+
+
+
+
+
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
+
+
+
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. fromOrientedRange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. getAllRanges ()
+
+
+
+
+
+
+
+
+
+
Returns a concatenation of all the ranges.
+
+
+
Returns a concatenation of all the ranges.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. getCursor ()
+
+
+
+
+
+
+
+
+
+
Gets the current position of the cursor.
+
+
+
Gets the current position of the cursor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. getLineRange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. getRange ()
+
+
+
+
+
+
+
+
+
+
Returns the Range for the selected text.
+
+
+
Returns the Range for the selected text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. getSelectionAnchor ()
+
+
+
+
+
+
+
+
+
+
Returns an object containing the row and column of the calling selection anchor.
+
+
+
Returns an object containing the row and column of the calling selection anchor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. getSelectionLead ()
+
+
+
+
+
+
+
+
+
+
Returns an object containing the row and column of the calling selection lead.
+
+
+
Returns an object containing the row and column of the calling selection lead.
+
+
+
+
+
+
+
+
+
+
+
+
Moves the selection to highlight the entire word.
+
+
+
Moves the selection to highlight the entire word.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. isBackwards ()
+
+
+
+
+
+
+
+
+
+
Returns true if the selection is going backwards in the document.
+
+
+
Returns true if the selection is going backwards in the document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. isEmpty ()
+
+
+
+
+
+
+
+
+
+
Returns true if the selection is empty.
+
+
+
Returns true if the selection is empty.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. isMultiLine ()
+
+
+
+
+
+
+
+
+
+
Returns true if the selection is a multi-line.
+
+
+
Returns true if the selection is a multi-line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. mergeOverlappingRanges ()
+
+
+
+
+
+
+
Merges overlapping ranges ensuring consistency after changes
+
+
+
Merges overlapping ranges ensuring consistency after changes
+
+
+
+
+
+
+
+
+
+
+
+
Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
+
+
+
Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
+
+
Arguments rows Number Required. The number of rows to move by
+chars Number Required. The number of characters to move by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorDown ()
+
+
+
+
+
+
+
Moves the cursor down one row.
+
+
+
Moves the cursor down one row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorFileEnd ()
+
+
+
+
+
+
+
Moves the cursor to the end of the file.
+
+
+
Moves the cursor to the end of the file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorFileStart ()
+
+
+
+
+
+
+
Moves the cursor to the start of the file.
+
+
+
Moves the cursor to the start of the file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorLeft ()
+
+
+
+
+
+
+
Moves the cursor left one column.
+
+
+
Moves the cursor left one column.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorLineEnd ()
+
+
+
+
+
+
+
Moves the cursor to the end of the line.
+
+
+
Moves the cursor to the end of the line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorLineStart ()
+
+
+
+
+
+
+
Moves the cursor to the start of the line.
+
+
+
Moves the cursor to the start of the line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorLongWordLeft ()
+
+
+
+
+
+
+
Moves the cursor to the word on the left.
+
+
+
Moves the cursor to the word on the left.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorLongWordRight ()
+
+
+
+
+
+
+
Moves the cursor to the word on the right.
+
+
+
Moves the cursor to the word on the right.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorRight ()
+
+
+
+
+
+
+
Moves the cursor right one column.
+
+
+
Moves the cursor right one column.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorShortWordLeft ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorShortWordRight ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Moves the cursor to the row and column provided. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
+
+
+
Moves the cursor to the row and column provided. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
+
+
Arguments row Number Required. The row to move to
+column Number Required. The column to move to
+keepDesiredColumn Boolean Required. If true, the cursor move does not respect the previous column
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorToPosition (Object position )
+
+
+
+
+
+
+
Moves the selection to the position indicated by its row and column.
+
+
+
Moves the selection to the position indicated by its row and column.
+
+
Arguments position Object Required. The position to move to
+
+
+
+
+
+
+
+
+
+
+
+
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
+
+
+
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
+
+
Arguments row Number Required. The row to move to
+column Number Required. The column to move to
+keepDesiredColumn Boolean Required. If true, the cursor move does not respect the previous column
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorUp ()
+
+
+
+
+
+
+
Moves the cursor up one row.
+
+
+
Moves the cursor up one row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorWordLeft ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. moveCursorWordRight ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. rectangularRangeBlock (Cursor screenCursor, Anchor screenAnchor, Boolean includeEmptyLines )
+
+
+
+
+
+
+
+
+
+
Gets list of ranges composing rectangular block on the screen
+
+
+
Gets list of ranges composing rectangular block on the screen
+
+
Arguments screenCursor Cursor Required. The cursor to use
+screenAnchor Anchor Required. The anchor to use
+includeEmptyLines Boolean Required. If true, this includes ranges inside the block which are empty due to clipping
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectAll ()
+
+
+
+
+
+
+
Selects all the text in the document.
+
+
+
Selects all the text in the document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectAWord ()
+
+
+
+
+
+
+
Selects a word, including its right whitespace.
+
+
+
Selects a word, including its right whitespace.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectDown ()
+
+
+
+
+
+
+
Moves the selection down one row.
+
+
+
Moves the selection down one row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectFileEnd ()
+
+
+
+
+
+
+
Moves the selection to the end of the file.
+
+
+
Moves the selection to the end of the file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectFileStart ()
+
+
+
+
+
+
+
Moves the selection to the start of the file.
+
+
+
Moves the selection to the start of the file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectLeft ()
+
+
+
+
+
+
+
Moves the selection left one column.
+
+
+
Moves the selection left one column.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectLine ()
+
+
+
+
+
+
+
Selects the entire line.
+
+
+
Selects the entire line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectLineEnd ()
+
+
+
+
+
+
+
Moves the selection to the end of the current line.
+
+
+
Moves the selection to the end of the current line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectLineStart ()
+
+
+
+
+
+
+
Moves the selection to the beginning of the current line.
+
+
+
Moves the selection to the beginning of the current line.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectRight ()
+
+
+
+
+
+
+
Moves the selection right one column.
+
+
+
Moves the selection right one column.
+
+
+
+
+
+
+
+
+
+
+
+
Moves the selection cursor to the indicated row and column.
+
+
+
Moves the selection cursor to the indicated row and column.
+
+
Arguments row Number Required. The row to select to
+column Number Required. The column to select to
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectToPosition (Object pos )
+
+
+
+
+
+
+
Moves the selection cursor to the row and column indicated by pos.
+
+
+
Moves the selection cursor to the row and column indicated by pos.
+
+
Arguments pos Object Required. An object containing the row and column
+
+
+
+
+
+
+
+
+
+
+
+
Moves the selection up one row.
+
+
+
Moves the selection up one row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectWord ()
+
+
+
+
+
+
+
Selects an entire word boundary.
+
+
+
Selects an entire word boundary.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectWordLeft ()
+
+
+
+
+
+
+
Moves the selection to the first word on the left.
+
+
+
Moves the selection to the first word on the left.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. selectWordRight ()
+
+
+
+
+
+
+
Moves the selection to the first word on the right.
+
+
+
Moves the selection to the first word on the right.
+
+
+
+
+
+
+
+
+
+
+
+
Sets the row and column position of the anchor. This function also emits the 'changeSelection' event.
+
+
+
Sets the row and column position of the anchor. This function also emits the 'changeSelection' event.
+
+
Arguments row Number Required. The new row
+column Number Required. The new column
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. setSelectionRange (Range range, Boolean reverse )
+
+
+
+
+
+
+
Sets the selection to the provided range.
+
+
+
Sets the selection to the provided range.
+
+
Arguments range Range Required. The range of text to select
+reverse Boolean Required. Indicates if the range should go backwards (true) or not
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. shiftSelection (Number columns )
+
+
+
+
+
+
+
Shifts the selection up (or down, if isBackwards() is true) the given number of columns.
+
+
+
Shifts the selection up (or down, if isBackwards() is true) the given number of columns.
+
+
Arguments columns Number Required. The number of columns to shift by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. splitIntoLines ()
+
+
+
+
+
+
+
Splits all the ranges into lines.
+
+
+
Splits all the ranges into lines.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. substractPoint (Range pos )
+
+
+
+
+
+
+
Removes a Range containing pos (if it exists).
+
+
+
Removes a Range containing pos (if it exists).
+
+
Arguments pos Range Required. The position to remove, as a {row, column} object
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. toggleBlockSelection ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. toOrientedRange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selection. toSingleRange ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/api/split.html b/api/split.html
index 44c46036..fd75edce 100644
--- a/api/split.html
+++ b/api/split.html
@@ -1,36 +1,640 @@
-
Arguments container Document Required. The document to associate with the split
-theme String Required. The name of the initial theme
-splits Number Required. The number of initial splits
-
Blurs the current editor.
-
Blurs the current editor.
-
Focuses the current editor.
-
Focuses the current editor.
-
Executes callback on all of the available editors.
-
Executes callback on all of the available editors.
-
Arguments callback Function Required. A callback function to execute
-scope String Required.
-
Returns the current editor.
-
Returns the current editor.
-
Returns the editor identified by the index idx.
-
Returns the editor identified by the index idx.
-
Arguments idx Number Required. The index of the editor you want
-
Returns the orientation.
-
Returns the orientation.
-
Returns the number of splits.
-
Returns the number of splits.
-
Split. setFontSize (Number size )Sets the font size, in pixels, for all the available editors.
-
Sets the font size, in pixels, for all the available editors.
-
Arguments size Number Required. The new font size
-
Split. setKeyboardHandler (String keybinding )Split. setOrientation (Number oriantation )Sets the orientation.
-
Arguments Sets a new EditSession for the indicated editor.
-
Arguments session EditSession Required. The new edit session
-idx Number Required. The editor's index you're interested in
-
Split. setSplits (Number splits )
Arguments splits Number Required. The new number of splits
-
Sets a theme for each of the available editors.
-
Sets a theme for each of the available editors.
-
Arguments theme String Required. The name of the theme to set
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Blurs the current editor.
+
+
+
Blurs the current editor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Focuses the current editor.
+
+
+
Focuses the current editor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Arguments callback Function Required. A callback function to execute
+scope String Required. The default scope for the callback
+Executes callback on all of the available editors.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. getCurrentEditor ()
+
+
+
+
+
+
+
+
+
+
Returns the current editor.
+
+
+
Returns the current editor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. getEditor (Number idx )
+
+
+
+
+
+
+
+
+
+
Arguments idx Number Required. The index of the editor you want
+Returns the editor identified by the index idx.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. getOrientation ()
+
+
+
+
+
+
+
+
+
+
Returns the orientation.
+
+
+
Returns the orientation.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. getSplits ()
+
+
+
+
+
+
+
+
+
+
Returns the number of splits.
+
+
+
Returns the number of splits.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. setFontSize (Number size )
+
+
+
+
+
+
+
+
+
+
Arguments size Number Required. The new font size
+Sets the font size, in pixels, for all the available editors.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. setKeyboardHandler (String keybinding )
+
+
+
+
+
+
+
+
+
+
Arguments keybinding String Required. Sets the keyboard handler for the editor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. setOrientation (Number orientation )
+
+
+
+
+
+
+
Sets the orientation.
+
+
+
Sets the orientation.
+
+
Arguments orientation Number Required. The new orientation value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Arguments session EditSession Required. The new edit session
+idx Number Required. The editor's index you're interested in
+Sets a new EditSession for the indicated editor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. setTheme (String theme )
+
+
+
+
+
+
+
+
+
+
Arguments theme String Required. The name of the theme to set
+Sets a theme for each of the available editors.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Split. UndoManagerProxy ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/token_iterator.html b/api/token_iterator.html
index a6de2ef9..7c025da0 100644
--- a/api/token_iterator.html
+++ b/api/token_iterator.html
@@ -1,18 +1,248 @@
-
This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.
-
Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.
-
Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.
-
Arguments session EditSession Required. The session to associate with
-initialRow Number Required. The row to start the tokenizing at
-initialColumn Number Required. The column to start the tokenizing at
-
TokenIterator. getCurrentToken ( )Returns the current tokenized string.
-
Returns the current tokenized string.
-
TokenIterator. getCurrentTokenColumn ( )Returns the current column.
-
Returns the current column.
-
TokenIterator. getCurrentTokenRow ( )Returns the current row.
-
Returns the current row.
-
TokenIterator. stepBackward ( )Tokenizes all the items from the current point to the row prior in the document.
-
Tokenizes all the items from the current point to the row prior in the document.
-
Returns String If the current point is not at the top of the file, this function returns null. Otherwise, it returns an array of the tokenized strings.
-
TokenIterator. stepForward ( )Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
-
Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
-
\ No newline at end of file
+
+
+
+
+
+
+
+
This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.
+
+
+
+
+
+
+
+
+
+
+
Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.
+
+
+
Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.
+
+
Arguments session EditSession Required. The session to associate with
+initialRow Number Required. The row to start the tokenizing at
+initialColumn Number Required. The column to start the tokenizing at
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TokenIterator. getCurrentToken ()
+
+
+
+
+
+
+
+
+
+
Returns the current tokenized string.
+
+
+
Returns the current tokenized string.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TokenIterator. getCurrentTokenColumn ()
+
+
+
+
+
+
+
+
+
+
Returns the current column.
+
+
+
Returns the current column.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TokenIterator. getCurrentTokenRow ()
+
+
+
+
+
+
+
+
+
+
Returns the current row.
+
+
+
Returns the current row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TokenIterator. stepBackward ()
+
+
+
+
+
+
+
+
+
+
Tokenizes all the items from the current point to the row prior in the document.
+
+
+
Tokenizes all the items from the current point to the row prior in the document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TokenIterator. stepForward ()
+
+
+
+
+
+
+
+
+
+
Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
+
+
+
Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/tokenizer.html b/api/tokenizer.html
index 5ca489e9..b45bd58d 100644
--- a/api/tokenizer.html
+++ b/api/tokenizer.html
@@ -1,8 +1,122 @@
-
Constructs a new tokenizer based on the given rules and flags.
-
Constructs a new tokenizer based on the given rules and flags.
-
Arguments rules Object Required. The highlighting rules
-flag String Required. Any additional regular expression flags to pass (like "i" for case insensitive)
-
Tokenizer. getLineTokens ( )Returns an object containing two properties: tokens, which contains all the tokens; and state, the current state.
-
Returns an object containing two properties: tokens, which contains all the tokens; and state, the current state.
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constructs a new tokenizer based on the given rules and flags.
+
+
+
Constructs a new tokenizer based on the given rules and flags.
+
+
Arguments rules Object Required. The highlighting rules
+flag String Required. Any additional regular expression flags to pass (like "i" for case insensitive)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tokenizer. getLineTokens (Object line, Object startState )
+
+
+
+
+
+
+
+
+
+
Returns an object containing two properties: tokens, which contains all the tokens; and state, the current state.
+
+
+
Returns an object containing two properties: tokens, which contains all the tokens; and state, the current state.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/undomanager.html b/api/undomanager.html
index da876c91..fafd4131 100644
--- a/api/undomanager.html
+++ b/api/undomanager.html
@@ -1,23 +1,271 @@
-
This object maintains the undo stack for an EditSession .
-
Resets the current undo state and creates a new UndoManager.
-
Resets the current undo state and creates a new UndoManager.
-
UndoManager. execute (Object options )Provides a means for implementing your own undo manager. options has one property, args, an Array , with two elements:
-
Provides a means for implementing your own undo manager. options has one property, args, an Array , with two elements:
+
+
+
+
+
+
+
+
This object maintains the undo stack for an EditSession .
+
+
+
+
+
+
+
+
+
+
+
Resets the current undo state and creates a new UndoManager.
+
+
+
Resets the current undo state and creates a new UndoManager.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UndoManager. execute (Object options )
+
+
+
+
+
+
+
Provides a means for implementing your own undo manager. options has one property, args, an Array , with two elements:
+
+
+
Provides a means for implementing your own undo manager. options has one property, args, an Array , with two elements:
args[0] is an array of deltas
args[1] is the document to associate with
-
Arguments options Object Required. Contains additional properties
-
Returns true if there are redo operations left to perform.
-
Returns true if there are redo operations left to perform.
-
Returns true if there are undo operations left to perform.
-
Returns true if there are undo operations left to perform.
-
UndoManager. redo (Boolean dontSelect )Perform a redo operation on the document, reimplementing the last change.
-
Perform a redo operation on the document, reimplementing the last change.
-
Arguments dontSelect Boolean Required. If true, doesn't select the range of where the change occured
-
Destroys the stack of undo and redo redo operations.
-
Destroys the stack of undo and redo redo operations.
-
UndoManager. undo (Boolean dontSelect )Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
-
Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
-
Arguments dontSelect Boolean Required. If true, doesn't select the range of where the change occured
-
\ No newline at end of file
+
+
Arguments options Object Required. Contains additional properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UndoManager. hasRedo ()
+
+
+
+
+
+
+
+
+
+
Returns true if there are redo operations left to perform.
+
+
+
Returns true if there are redo operations left to perform.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UndoManager. hasUndo ()
+
+
+
+
+
+
+
+
+
+
Returns true if there are undo operations left to perform.
+
+
+
Returns true if there are undo operations left to perform.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UndoManager. redo (Boolean dontSelect )
+
+
+
+
+
+
+
Perform a redo operation on the document, reimplementing the last change.
+
+
+
Perform a redo operation on the document, reimplementing the last change.
+
+
Arguments dontSelect Boolean Required. If true, doesn't select the range of where the change occured
+
+
+
+
+
+
+
+
+
+
+
+
Destroys the stack of undo and redo redo operations.
+
+
+
Destroys the stack of undo and redo redo operations.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UndoManager. undo (Boolean dontSelect )
+
+
+
+
+
+
+
+
+
+
Perform an undo operation on the document, reverting the last change.
+
+
+
Perform an undo operation on the document, reverting the last change.
+
+
Arguments dontSelect Boolean Required. If true, doesn't select the range of where the change occured
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/virtual_renderer.html b/api/virtual_renderer.html
index b61cb4b5..952e6ae6 100644
--- a/api/virtual_renderer.html
+++ b/api/virtual_renderer.html
@@ -1,153 +1,2190 @@
-
The class that is responsible for drawing everything you see on the screen!
-
Constructs a new VirtualRenderer within the container specified, applying the given theme.
-
Constructs a new VirtualRenderer within the container specified, applying the given theme.
-
Arguments container DOMElement Required. The root element of the editor
-theme String Required. The starting theme
-
VirtualRenderer. addGutterDecoration (row, className )VirtualRenderer. adjustWrapLimit ( )Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
-
Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
-
VirtualRenderer. destroy ( )Destroys the text and cursor layers for this renderer.
-
Destroys the text and cursor layers for this renderer.
-
VirtualRenderer. getAnimatedScroll ( )Returns whether an animated scroll happens or not.
-
VirtualRenderer. getContainerElement ( )Returns the root element containing this renderer.
-
Returns the root element containing this renderer.
-
VirtualRenderer. getFirstFullyVisibleRow ( )Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
-
Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
-
VirtualRenderer. getFirstVisibleRow ( )Returns the index of the first visible row.
-
Returns the index of the first visible row.
-
VirtualRenderer. getHScrollBarAlwaysVisible ( )Returns whether the horizontal scrollbar is set to be always visible.
-
VirtualRenderer. getLastFullyVisibleRow ( )Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
-
Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
-
VirtualRenderer. getLastVisibleRow ( )Returns the index of the last visible row.
-
Returns the index of the last visible row.
-
VirtualRenderer. getMouseEventTarget ( )Returns the element that the mouse events are attached to
-
Returns the element that the mouse events are attached to
-
VirtualRenderer. getPrintMarginColumn ( )Returns whether the print margin column is being shown or not.
-
Returns whether the print margin column is being shown or not.
-
VirtualRenderer. getScrollBottomRow ( )Returns the last visible row, regardless of whether it's fully visible or not.
-
VirtualRenderer. getScrollLeft ( )Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
-
VirtualRenderer. getScrollTop ( )Returns the value of the distance between the top of the editor and the topmost part of the visible content.
-
VirtualRenderer. getScrollTopRow ( )Returns the first visible row, regardless of whether it's fully visible or not.
-
VirtualRenderer. getShowGutter ( )Returns true if the gutter is being shown.
-
Returns true if the gutter is being shown.
-
VirtualRenderer. getShowInvisibles ( )Returns whether invisible characters are being shown or not.
-
Returns whether invisible characters are being shown or not.
-
VirtualRenderer. getShowPrintMargin ( )Returns whetherthe print margin is being shown or not.
-
Returns whetherthe print margin is being shown or not.
-
VirtualRenderer. getTextAreaContainer ( )Returns the element to which the hidden text area is added.
-
Returns the element to which the hidden text area is added.
-
VirtualRenderer. getTheme ( )Returns the path of the current theme.
-
Returns the path of the current theme.
-
VirtualRenderer. hideComposition ( )Hides the current composition.
-
Hides the current composition.
-
VirtualRenderer. hideCursor ( )VirtualRenderer. isScrollableBy (Number deltaX, Number deltaY )Returns true if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
-
Arguments deltaX Number Required. The x value to scroll by
-deltaY Number Required. The y value to scroll by
-
Triggers a resize of the editor.
-
Triggers a resize of the editor.
-
Arguments force Boolean Required. If true, recomputes the size, even if the height and width haven't changed
-gutterWidth Number Required. The width of the gutter in pixels
-width Number Required. The width of the editor in pixels
-height Number Required. The hiehgt of the editor, in pixels
-
VirtualRenderer. removeGutterDecoration (row, className )Scrolls the editor across both x- and y-axes.
-
Arguments deltaX Number Required. The x value to scroll by
-deltaY Number Required. The y value to scroll by
-
VirtualRenderer. scrollCursorIntoView (cursor, offset )Scrolls the cursor into the first visibile area of the editor
-
Gracefully scrolls the editor to the row indicated.
-
Arguments line Number Required. A line number
-center Boolean Required. If true, centers the editor the to indicated line
-animate Boolean Required. If true animates scrolling
-callback Function Required. Function to be called after the animation has finished
-
VirtualRenderer. scrollToRow (Number row )Gracefully scrolls the top of the editor to the row indicated.
-
Arguments VirtualRenderer. scrollToX (Number scrollLeft )Scrolls the editor to the x pixel indicated.
-
Arguments scrollLeft Number Required. The position to scroll to
-
VirtualRenderer. scrollToY (Number scrollTop )Scrolls the editor to the y pixel indicated.
-
Arguments scrollTop Number Required. The position to scroll to
-
VirtualRenderer. setAnimatedScroll (Boolean shouldAnimate )Identifies whether you want to have an animated scroll or not.
-
Arguments shouldAnimate Boolean Required. Set to true to show animated scrolls
-
VirtualRenderer. setAnnotations (Array annotations )Sets annotations for the gutter.
-
Sets annotations for the gutter.
-
Arguments annotations Array Required. An array containing annotations
-
VirtualRenderer. setCompositionText (String text )Sets the inner text of the current composition to text.
-
Sets the inner text of the current composition to text.
-
Arguments text String Required. A string of text to use
-
VirtualRenderer. setHScrollBarAlwaysVisible (Boolean alwaysVisible )Identifies whether you want to show the horizontal scrollbar or not.
-
Arguments alwaysVisible Boolean Required. Set to true to make the horizontal scroll bar visible
-
VirtualRenderer. setPadding (Number padding )Sets the padding for all the layers.
-
Sets the padding for all the layers.
-
Arguments padding Number Required. A new padding value (in pixels)
-
VirtualRenderer. setPrintMarginColumn (Boolean showPrintMargin )Identifies whether you want to show the print margin column or not.
-
Identifies whether you want to show the print margin column or not.
-
Arguments showPrintMargin Boolean Required. Set to true to show the print margin column
-
VirtualRenderer. setSession (session )VirtualRenderer. setShowGutter (Boolean show )Identifies whether you want to show the gutter or not.
-
Identifies whether you want to show the gutter or not.
-
Arguments show Boolean Required. Set to true to show the gutter
-
VirtualRenderer. setShowInvisibles (Boolean showInvisibles )Identifies whether you want to show invisible characters or not.
-
Identifies whether you want to show invisible characters or not.
-
Arguments showInvisibles Boolean Required. Set to true to show invisibles
-
VirtualRenderer. setShowPrintMargin (Boolean showPrintMargin )Identifies whether you want to show the print margin or not.
-
Identifies whether you want to show the print margin or not.
-
Arguments showPrintMargin Boolean Required. Set to true to show the print margin
-
VirtualRenderer. setStyle (String style )Adds a new class, style, to the editor.
-
Adds a new class, style, to the editor.
-
Arguments style String Required. A class name
-
VirtualRenderer. setTheme (String theme )Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
-
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
-
Arguments theme String Required. The path to a theme
-
VirtualRenderer. showComposition (Number position )VirtualRenderer. showCursor ( )VirtualRenderer. textToScreenCoordinates (Number row, Number column )Returns an object containing the pageX and pageY coordinates of the document position.
-
Returns an object containing the pageX and pageY coordinates of the document position.
-
Arguments row Number Required. The document row position
-column Number Required. The document column position
-
VirtualRenderer. unsetStyle (String style )Removes the class style from the editor.
-
Removes the class style from the editor.
-
Arguments style String Required. A class name
-
VirtualRenderer. updateBackMarkers ( )Schedules an update to all the back markers in the document.
-
Schedules an update to all the back markers in the document.
-
VirtualRenderer. updateBreakpoints ( )VirtualRenderer. updateCursor ( )Updates the cursor icon.
-
Updates the cursor icon.
-
VirtualRenderer. updateFontSize ( )VirtualRenderer. updateFrontMarkers ( )Schedules an update to all the front markers in the document.
-
Schedules an update to all the front markers in the document.
-
VirtualRenderer. updateFull (Boolean force )Triggers a full update of all the layers, for all the rows.
-
Triggers a full update of all the layers, for all the rows.
-
Arguments force Boolean Required. If true, forces the changes through
-
VirtualRenderer. updateLines (Number firstRow, Number lastRow )Triggers a partial update of the text, from the range given by the two parameters.
-
Triggers a partial update of the text, from the range given by the two parameters.
-
Arguments firstRow Number Required. The first row to update
-lastRow Number Required. The last row to update
-
VirtualRenderer. updateText ( )Triggers a full update of the text, for all the rows.
-
Triggers a full update of the text, for all the rows.
-
VirtualRenderer. visualizeBlur ( )Blurs the current container.
-
Blurs the current container.
-
VirtualRenderer. visualizeFocus ( )Focuses the current container.
-
Focuses the current container.
-
\ No newline at end of file
+
+
+
+
+
+
+
+
The class that is responsible for drawing everything you see on the screen!
+
+
+
+
+
+
+
+
+
+
+
Constructs a new VirtualRenderer within the container specified, applying the given theme.
+
+
+
Constructs a new VirtualRenderer within the container specified, applying the given theme.
+
+
Arguments container DOMElement Required. The root element of the editor
+theme String Required. The starting theme
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. _loadTheme ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. addGutterDecoration (Object row, Object className )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. adjustWrapLimit ()
+
+
+
+
+
+
+
Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
+
+
+
Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. alignCursor ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. animateScrolling ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. destroy ()
+
+
+
+
+
+
+
Destroys the text and cursor layers for this renderer.
+
+
+
Destroys the text and cursor layers for this renderer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getAnimatedScroll ()
+
+
+
+
+
+
+
+
+
+
+
Returns whether an animated scroll happens or not.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getContainerElement ()
+
+
+
+
+
+
+
+
+
+
Returns the root element containing this renderer.
+
+
+
Returns the root element containing this renderer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getDisplayIndentGuides ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getFadeFoldWidgets ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getFirstFullyVisibleRow ()
+
+
+
+
+
+
+
+
+
+
Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+
+
+
Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getFirstVisibleRow ()
+
+
+
+
+
+
+
+
+
+
Returns the index of the first visible row.
+
+
+
Returns the index of the first visible row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getHighlightGutterLine ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getHScrollBarAlwaysVisible ()
+
+
+
+
+
+
+
+
+
+
+
Returns whether the horizontal scrollbar is set to be always visible.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getLastFullyVisibleRow ()
+
+
+
+
+
+
+
+
+
+
Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+
+
+
Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getLastVisibleRow ()
+
+
+
+
+
+
+
+
+
+
Returns the index of the last visible row.
+
+
+
Returns the index of the last visible row.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getMouseEventTarget ()
+
+
+
+
+
+
+
+
+
+
Returns the element that the mouse events are attached to
+
+
+
Returns the element that the mouse events are attached to
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getPrintMarginColumn ()
+
+
+
+
+
+
+
+
+
+
Returns whether the print margin column is being shown or not.
+
+
+
Returns whether the print margin column is being shown or not.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getScrollBottomRow ()
+
+
+
+
+
+
+
+
+
+
+
Returns the last visible row, regardless of whether it's fully visible or not.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getScrollLeft ()
+
+
+
+
+
+
+
+
+
+
+
Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getScrollTop ()
+
+
+
+
+
+
+
+
+
+
+
Returns the value of the distance between the top of the editor and the topmost part of the visible content.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getScrollTopRow ()
+
+
+
+
+
+
+
+
+
+
+
Returns the first visible row, regardless of whether it's fully visible or not.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getShowGutter ()
+
+
+
+
+
+
+
+
+
+
Returns true if the gutter is being shown.
+
+
+
Returns true if the gutter is being shown.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getShowInvisibles ()
+
+
+
+
+
+
+
+
+
+
Returns whether invisible characters are being shown or not.
+
+
+
Returns whether invisible characters are being shown or not.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getShowPrintMargin ()
+
+
+
+
+
+
+
+
+
+
Returns whether the print margin is being shown or not.
+
+
+
Returns whether the print margin is being shown or not.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getTextAreaContainer ()
+
+
+
+
+
+
+
+
+
+
Returns the element to which the hidden text area is added.
+
+
+
Returns the element to which the hidden text area is added.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. getTheme ()
+
+
+
+
+
+
+
+
+
+
Returns the path of the current theme.
+
+
+
Returns the path of the current theme.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. hideComposition ()
+
+
+
+
+
+
+
Hides the current composition.
+
+
+
Hides the current composition.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. hideCursor ()
+
+
+
+
+
+
+
Hides the cursor icon.
+
+
+
Hides the cursor icon.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. isScrollableBy (Number deltaX, Number deltaY )
+
+
+
+
+
+
+
+
+
+
+
Returns true if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
+
+
Arguments deltaX Number Required. The x value to scroll by
+deltaY Number Required. The y value to scroll by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. onChangeTabSize ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. onGutterResize ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Triggers a resize of the editor.
+
+
+
Triggers a resize of the editor.
+
+
Arguments force Boolean Required. If true, recomputes the size, even if the height and width haven't changed
+gutterWidth Number Required. The width of the gutter in pixels
+width Number Required. The width of the editor in pixels
+height Number Required. The hiehgt of the editor, in pixels
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. pixelToScreenCoordinates ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. removeGutterDecoration (Object row, Object className )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. screenToTextCoordinates ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Scrolls the editor across both x- and y-axes.
+
+
Arguments deltaX Number Required. The x value to scroll by
+deltaY Number Required. The y value to scroll by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. scrollCursorIntoView (Object cursor, Object offset )
+
+
+
+
+
+
+
+
Scrolls the cursor into the first visibile area of the editor
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. scrollSelectionIntoView ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Gracefully scrolls the editor to the row indicated.
+
+
Arguments line Number Required. A line number
+center Boolean Required. If true, centers the editor the to indicated line
+animate Boolean Required. If true animates scrolling
+callback Function Required. Function to be called after the animation has finished
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. scrollToRow (Number row )
+
+
+
+
+
+
+
+
Gracefully scrolls from the top of the editor to the row indicated.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. scrollToX (Number scrollLeft )
+
+
+
+
+
+
+
+
+
+
+
Scrolls the editor across the x-axis to the pixel indicated.
+
+
Arguments scrollLeft Number Required. The position to scroll to
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. scrollToY (Number scrollTop )
+
+
+
+
+
+
+
+
+
+
+
Scrolls the editor to the y pixel indicated.
+
+
Arguments scrollTop Number Required. The position to scroll to
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setAnimatedScroll (Boolean shouldAnimate )
+
+
+
+
+
+
+
+
Identifies whether you want to have an animated scroll or not.
+
+
Arguments shouldAnimate Boolean Required. Set to true to show animated scrolls
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setAnnotations (Array annotations )
+
+
+
+
+
+
+
Sets annotations for the gutter.
+
+
+
Sets annotations for the gutter.
+
+
Arguments annotations Array Required. An array containing annotations
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setCompositionText (String text )
+
+
+
+
+
+
+
+
+
+
Arguments text String Required. A string of text to use
+Sets the inner text of the current composition to text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setDisplayIndentGuides ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setFadeFoldWidgets ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setHighlightGutterLine ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setHScrollBarAlwaysVisible (Boolean alwaysVisible )
+
+
+
+
+
+
+
+
Identifies whether you want to show the horizontal scrollbar or not.
+
+
Arguments alwaysVisible Boolean Required. Set to true to make the horizontal scroll bar visible
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setPadding (Number padding )
+
+
+
+
+
+
+
Sets the padding for all the layers.
+
+
+
Sets the padding for all the layers.
+
+
Arguments padding Number Required. A new padding value (in pixels)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setPrintMarginColumn (Boolean showPrintMargin )
+
+
+
+
+
+
+
Identifies whether you want to show the print margin column or not.
+
+
+
Identifies whether you want to show the print margin column or not.
+
+
Arguments showPrintMargin Boolean Required. Set to true to show the print margin column
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setSession (Object session )
+
+
+
+
+
+
+
+
Associates the renderer with an EditSession .
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setShowGutter (Boolean show )
+
+
+
+
+
+
+
Identifies whether you want to show the gutter or not.
+
+
+
Identifies whether you want to show the gutter or not.
+
+
Arguments show Boolean Required. Set to true to show the gutter
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setShowInvisibles (Boolean showInvisibles )
+
+
+
+
+
+
+
Identifies whether you want to show invisible characters or not.
+
+
+
Identifies whether you want to show invisible characters or not.
+
+
Arguments showInvisibles Boolean Required. Set to true to show invisibles
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setShowPrintMargin (Boolean showPrintMargin )
+
+
+
+
+
+
+
Identifies whether you want to show the print margin or not.
+
+
+
Identifies whether you want to show the print margin or not.
+
+
Arguments showPrintMargin Boolean Required. Set to true to show the print margin
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setStyle ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. setTheme (String theme )
+
+
+
+
+
+
+
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
+
+
+
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
+
+
Arguments theme String Required. The path to a theme
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. showCursor ()
+
+
+
+
+
+
+
Shows the cursor icon.
+
+
+
Shows the cursor icon.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. textToScreenCoordinates (Number row, Number column )
+
+
+
+
+
+
+
+
+
+
Returns an object containing the pageX and pageY coordinates of the document position.
+
+
+
Returns an object containing the pageX and pageY coordinates of the document position.
+
+
Arguments row Number Required. The document row position
+column Number Required. The document column position
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. unsetStyle (String style )
+
+
+
+
+
+
+
Removes the class style from the editor.
+
+
+
Removes the class style from the editor.
+
+
Arguments style String Required. A class name
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateBackMarkers ()
+
+
+
+
+
+
+
Schedules an update to all the back markers in the document.
+
+
+
Schedules an update to all the back markers in the document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateBreakpoints (Object rows )
+
+
+
+
+
+
+
+
Redraw breakpoints.
+
+
Arguments
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateCharacterSize ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateCursor ()
+
+
+
+
+
+
+
Updates the cursor icon.
+
+
+
Updates the cursor icon.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateFontSize ()
+
+
+
+
+
+
+
Updates the font size.
+
+
+
Updates the font size.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateFrontMarkers ()
+
+
+
+
+
+
+
Schedules an update to all the front markers in the document.
+
+
+
Schedules an update to all the front markers in the document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateFull (Boolean force )
+
+
+
+
+
+
+
Triggers a full update of all the layers, for all the rows.
+
+
+
Triggers a full update of all the layers, for all the rows.
+
+
Arguments force Boolean Required. If true, forces the changes through
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateLines (Number firstRow, Number lastRow )
+
+
+
+
+
+
+
Triggers a partial update of the text, from the range given by the two parameters.
+
+
+
Triggers a partial update of the text, from the range given by the two parameters.
+
+
Arguments firstRow Number Required. The first row to update
+lastRow Number Required. The last row to update
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. updateText ()
+
+
+
+
+
+
+
Triggers a full update of the text, for all the rows.
+
+
+
Triggers a full update of the text, for all the rows.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. visualizeBlur ()
+
+
+
+
+
+
+
Blurs the current container.
+
+
+
Blurs the current container.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VirtualRenderer. visualizeFocus ()
+
+
+
+
+
+
+
Focuses the current container.
+
+
+
Focuses the current container.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build b/build
index 86abb023..a4e495d8 160000
--- a/build
+++ b/build
@@ -1 +1 @@
-Subproject commit 86abb02339499ac96f95649ad5e088e66b6b9a9c
+Subproject commit a4e495d8901876c6bafe3870a35cb8e32c827e97
diff --git a/build_support/editor_textarea.html b/build_support/bookmarklet.html
similarity index 62%
rename from build_support/editor_textarea.html
rename to build_support/bookmarklet.html
index 9d878a1e..88355f78 100644
--- a/build_support/editor_textarea.html
+++ b/build_support/bookmarklet.html
@@ -20,7 +20,7 @@ function foo() {
var bar = true;
}
SourceUrl:
-
+
Build Link
@@ -49,63 +49,60 @@ function foo() {
+
+
+
+
+
+
+
diff --git a/demo/autoresize.html b/demo/autoresize.html
new file mode 100644
index 00000000..b0464ecd
--- /dev/null
+++ b/demo/autoresize.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Editor
+
+
+
+autoresizing editor
+
+minHeight = 2 lines
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/chromevox.html b/demo/chromevox.html
new file mode 100644
index 00000000..9aa65bae
--- /dev/null
+++ b/demo/chromevox.html
@@ -0,0 +1,39 @@
+
+
+
+
+ ACE ChromeVox demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/emmet.html b/demo/emmet.html
new file mode 100644
index 00000000..bd0d4abe
--- /dev/null
+++ b/demo/emmet.html
@@ -0,0 +1,43 @@
+
+
+
+
+ ACE Emmet demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/ie7.html b/demo/ie7.html
new file mode 100644
index 00000000..f5db8667
--- /dev/null
+++ b/demo/ie7.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+ ACE Editor StatusBar Demo
+
+
+
+
+
+require("ace/ext/old_ie");
+// now ace will work even on ie7!
+var editor = ace.edit("editor");
+
+
+
+
+
+
+
+
+
diff --git a/demo/keyboard_shortcuts.html b/demo/keyboard_shortcuts.html
new file mode 100644
index 00000000..3d01f559
--- /dev/null
+++ b/demo/keyboard_shortcuts.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+ Editor
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/kitchen-sink/demo.js b/demo/kitchen-sink/demo.js
index 29be01be..33b2dbc0 100644
--- a/demo/kitchen-sink/demo.js
+++ b/demo/kitchen-sink/demo.js
@@ -33,7 +33,15 @@ define(function(require, exports, module) {
"use strict";
require("ace/lib/fixoldbrowsers");
-require("ace/config").init();
+
+require("ace/multi_select");
+require("ace/ext/spellcheck");
+require("./inline_editor");
+require("./dev_util");
+require("./file_drop");
+
+var config = require("ace/config");
+config.init();
var env = {};
var dom = require("ace/lib/dom");
@@ -46,16 +54,18 @@ var theme = require("ace/theme/textmate");
var EditSession = require("ace/edit_session").EditSession;
var UndoManager = require("ace/undomanager").UndoManager;
-var vim = require("ace/keyboard/vim").handler;
-var emacs = require("ace/keyboard/emacs").handler;
var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
var Renderer = require("ace/virtual_renderer").VirtualRenderer;
var Editor = require("ace/editor").Editor;
-var MultiSelect = require("ace/multi_select").MultiSelect;
+
+var whitespace = require("ace/ext/whitespace");
+
+
var doclist = require("./doclist");
-var modelist = require("./modelist");
+var modelist = require("ace/ext/modelist");
+var themelist = require("ace/ext/themelist");
var layout = require("./layout");
var TokenTooltip = require("./token_tooltip").TokenTooltip;
var util = require("./util");
@@ -64,8 +74,18 @@ var fillDropdown = util.fillDropdown;
var bindCheckbox = util.bindCheckbox;
var bindDropdown = util.bindDropdown;
+var ElasticTabstopsLite = require("ace/ext/elastic_tabstops_lite").ElasticTabstopsLite;
+
+var IncrementalSearch = require("ace/incremental_search").IncrementalSearch;
+
+
+var workerModule = require("ace/worker/worker_client");
+if (location.href.indexOf("noworker") !== -1) {
+ workerModule.WorkerClient = workerModule.UIWorkerClient;
+}
+
/*********** create editor ***************************/
-var container = document.getElementById("editor");
+var container = document.getElementById("editor-container");
// Splitting.
var Split = require("ace/split").Split;
@@ -77,21 +97,23 @@ split.on("focus", function(editor) {
});
env.split = split;
window.env = env;
-window.ace = env.editor;
-env.editor.setAnimatedScroll(true);
-// add multiple cursor support to editor
-require("ace/multi_select").MultiSelect(env.editor);
var consoleEl = dom.createElement("div");
container.parentNode.appendChild(consoleEl);
consoleEl.style.cssText = "position:fixed; bottom:1px; right:0;\
-border:1px solid #baf; zIndex:100";
+border:1px solid #baf; z-index:100";
var cmdLine = new layout.singleLineEditor(consoleEl);
cmdLine.editor = env.editor;
env.editor.cmdLine = cmdLine;
+env.editor.showCommandLine = function(val) {
+ this.cmdLine.focus();
+ if (typeof val == "string")
+ this.cmdLine.setValue(val, 1);
+};
+
/**
* This demonstrates how you can define commands and bind shortcuts to them.
*/
@@ -111,37 +133,80 @@ env.editor.commands.addCommands([{
},
readOnly: true
}, {
- name: "find",
- bindKey: {win: "Ctrl-F", mac: "Command-F"},
+ name: "snippet",
+ bindKey: {win: "Alt-C", mac: "Command-Alt-C"},
exec: function(editor, needle) {
if (typeof needle == "object") {
- var arg = this.name + " " + editor.getCopyText();
- editor.cmdLine.setValue(arg, 1);
+ editor.cmdLine.setValue("snippet ", 1);
editor.cmdLine.focus();
return;
}
- editor.find(needle);
+ var s = snippetManager.getSnippetByName(needle, editor);
+ if (s)
+ snippetManager.insertSnippet(editor, s.content);
},
readOnly: true
}, {
name: "focusCommandLine",
- bindKey: "shift-esc",
+ bindKey: "shift-esc|ctrl-`",
exec: function(editor, needle) { editor.cmdLine.focus(); },
readOnly: true
+}, {
+ name: "nextFile",
+ bindKey: "Ctrl-tab",
+ exec: function(editor) { doclist.cycleOpen(editor, 1); },
+ readOnly: true
+}, {
+ name: "previousFile",
+ bindKey: "Ctrl-shift-tab",
+ exec: function(editor) { doclist.cycleOpen(editor, -1); },
+ readOnly: true
}, {
name: "execute",
bindKey: "ctrl+enter",
exec: function(editor) {
try {
- var r = eval(editor.getCopyText()||editor.getValue());
+ var r = window.eval(editor.getCopyText() || editor.getValue());
} catch(e) {
r = e;
}
- editor.cmdLine.setValue(r + "")
+ editor.cmdLine.setValue(r + "");
},
readOnly: true
+}, {
+ name: "showKeyboardShortcuts",
+ bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
+ exec: function(editor) {
+ config.loadModule("ace/ext/keybinding_menu", function(module) {
+ module.init(editor);
+ editor.showKeyboardShortcuts();
+ });
+ }
+}, {
+ name: "increaseFontSize",
+ bindKey: "Ctrl-=|Ctrl-+",
+ exec: function(editor) {
+ var size = parseInt(editor.getFontSize(), 10) || 12;
+ editor.setFontSize(size + 1);
+ }
+}, {
+ name: "decreaseFontSize",
+ bindKey: "Ctrl+-|Ctrl-_",
+ exec: function(editor) {
+ var size = parseInt(editor.getFontSize(), 10) || 12;
+ editor.setFontSize(Math.max(size - 1 || 1));
+ }
+}, {
+ name: "resetFontSize",
+ bindKey: "Ctrl+0|Ctrl-Numpad0",
+ exec: function(editor) {
+ editor.setFontSize(12);
+ }
}]);
+
+env.editor.commands.addCommands(whitespace.commands);
+
cmdLine.commands.bindKeys({
"Shift-Return|Ctrl-Return|Alt-Return": function(cmdLine) { cmdLine.insert("\n"); },
"Esc|Shift-Esc": function(cmdLine){ cmdLine.editor.focus(); },
@@ -159,14 +224,37 @@ var commands = env.editor.commands;
commands.addCommand({
name: "save",
bindKey: {win: "Ctrl-S", mac: "Command-S"},
- exec: function() {alert("Fake Save File");}
+ exec: function(arg) {
+ var session = env.editor.session;
+ var name = session.name.match(/[^\/]+$/);
+ localStorage.setItem(
+ "saved_file:" + name,
+ session.getValue()
+ );
+ env.editor.cmdLine.setValue("saved "+ name);
+ }
+});
+
+commands.addCommand({
+ name: "load",
+ bindKey: {win: "Ctrl-O", mac: "Command-O"},
+ exec: function(arg) {
+ var session = env.editor.session;
+ var name = session.name.match(/[^\/]+$/);
+ var value = localStorage.getItem("saved_file:" + name);
+ if (typeof value == "string") {
+ session.setValue(value);
+ env.editor.cmdLine.setValue("loaded "+ name);
+ } else {
+ env.editor.cmdLine.setValue("no previuos value saved for "+ name);
+ }
+ }
});
var keybindings = {
- // Null = use "default" keymapping
- ace: null,
- vim: vim,
- emacs: emacs,
+ ace: null, // Null = use "default" keymapping
+ vim: require("ace/keyboard/vim").handler,
+ emacs: "ace/keyboard/emacs",
// This is a way to define simple keyboard remappings
custom: new HashHandler({
"gotoright": "Tab",
@@ -208,6 +296,7 @@ var showGutterEl = document.getElementById("show_gutter");
var showPrintMarginEl = document.getElementById("show_print_margin");
var highlightSelectedWordE = document.getElementById("highlight_selected_word");
var showHScrollEl = document.getElementById("show_hscroll");
+var showVScrollEl = document.getElementById("show_vscroll");
var animateScrollEl = document.getElementById("animate_scroll");
var softTabEl = document.getElementById("soft_tab");
var behavioursEl = document.getElementById("enable_behaviours");
@@ -221,16 +310,44 @@ bindDropdown("mode", function(value) {
env.editor.session.modeName = value;
});
+doclist.history = doclist.docs.map(function(doc) {
+ return doc.name;
+});
+doclist.history.index = 0;
+doclist.cycleOpen = function(editor, dir) {
+ var h = this.history;
+ h.index += dir;
+ if (h.index >= h.length)
+ h.index = 0;
+ else if (h.index <= 0)
+ h.index = h.length - 1;
+ var s = h[h.index];
+ docEl.value = s;
+ docEl.onchange();
+};
+doclist.addToHistory = function(name) {
+ var h = this.history;
+ var i = h.indexOf(name);
+ if (i != h.index) {
+ if (i != -1)
+ h.splice(i, 1);
+ h.index = h.push(name);
+ }
+};
+
bindDropdown("doc", function(name) {
doclist.loadDoc(name, function(session) {
if (!session)
return;
+ doclist.addToHistory(session.name);
session = env.split.setSession(session);
+ whitespace.detectIndentation(session);
updateUIEditorOptions();
env.editor.focus();
});
});
+
function updateUIEditorOptions() {
var editor = env.editor;
var session = editor.session;
@@ -254,20 +371,26 @@ function updateUIEditorOptions() {
saveOption(behavioursEl, editor.getBehavioursEnabled());
}
+themelist.themes.forEach(function(x){ x.value = x.theme });
+fillDropdown(themeEl, {
+ Bright: themelist.themes.filter(function(x){return !x.isDark}),
+ Dark: themelist.themes.filter(function(x){return x.isDark}),
+});
+
event.addListener(themeEl, "mouseover", function(e){
- this.desiredValue = e.target.value;
- if (!this.$timer)
- this.$timer = setTimeout(this.updateTheme);
+ themeEl.desiredValue = e.target.value;
+ if (!themeEl.$timer)
+ themeEl.$timer = setTimeout(themeEl.updateTheme);
});
event.addListener(themeEl, "mouseout", function(e){
- this.desiredValue = null;
- if (!this.$timer)
- this.$timer = setTimeout(this.updateTheme, 20);
+ themeEl.desiredValue = null;
+ if (!themeEl.$timer)
+ themeEl.$timer = setTimeout(themeEl.updateTheme, 20);
});
themeEl.updateTheme = function(){
- env.split.setTheme(themeEl.desiredValue || themeEl.selectedValue);
+ env.split.setTheme((themeEl.desiredValue || themeEl.selectedValue));
themeEl.$timer = null;
};
@@ -292,28 +415,11 @@ bindDropdown("folding", function(value) {
});
bindDropdown("soft_wrap", function(value) {
- var session = env.editor.session;
- var renderer = env.editor.renderer;
- switch (value) {
- case "off":
- session.setUseWrapMode(false);
- renderer.setPrintMarginColumn(80);
- break;
- case "free":
- session.setUseWrapMode(true);
- session.setWrapLimitRange(null, null);
- renderer.setPrintMarginColumn(80);
- break;
- default:
- session.setUseWrapMode(true);
- var col = parseInt(value, 10);
- session.setWrapLimitRange(col, col);
- renderer.setPrintMarginColumn(col);
- }
+ env.editor.setOption("wrap", value);
});
bindCheckbox("select_style", function(checked) {
- env.editor.setSelectionStyle(checked ? "line" : "text");
+ env.editor.setOption("selectionStyle", checked ? "line" : "text");
});
bindCheckbox("highlight_active", function(checked) {
@@ -341,7 +447,11 @@ bindCheckbox("highlight_selected_word", function(checked) {
});
bindCheckbox("show_hscroll", function(checked) {
- env.editor.renderer.setHScrollBarAlwaysVisible(checked);
+ env.editor.setOption("hScrollBarAlwaysVisible", checked);
+});
+
+bindCheckbox("show_vscroll", function(checked) {
+ env.editor.setOption("vScrollBarAlwaysVisible", checked);
});
bindCheckbox("animate_scroll", function(checked) {
@@ -359,32 +469,53 @@ bindCheckbox("enable_behaviours", function(checked) {
bindCheckbox("fade_fold_widgets", function(checked) {
env.editor.setFadeFoldWidgets(checked);
});
+bindCheckbox("read_only", function(checked) {
+ env.editor.setReadOnly(checked);
+});
+bindCheckbox("scrollPastEnd", function(checked) {
+ env.editor.setOption("scrollPastEnd", checked);
+});
-var secondSession = null;
bindDropdown("split", function(value) {
var sp = env.split;
if (value == "none") {
- if (sp.getSplits() == 2) {
- secondSession = sp.getEditor(1).session;
- }
sp.setSplits(1);
} else {
var newEditor = (sp.getSplits() == 1);
- if (value == "below") {
- sp.setOrientation(sp.BELOW);
- } else {
- sp.setOrientation(sp.BESIDE);
- }
+ sp.setOrientation(value == "below" ? sp.BELOW : sp.BESIDE);
sp.setSplits(2);
if (newEditor) {
- var session = secondSession || sp.getEditor(0).session;
+ var session = sp.getEditor(0).session;
var newSession = sp.setSession(session, 1);
newSession.name = session.name;
}
}
});
+
+bindCheckbox("elastic_tabstops", function(checked) {
+ env.editor.setOption("useElasticTabstops", checked);
+});
+
+var iSearchCheckbox = bindCheckbox("isearch", function(checked) {
+ env.editor.setOption("useIncrementalSearch", checked);
+});
+
+env.editor.addEventListener('incrementalSearchSettingChanged', function(event) {
+ iSearchCheckbox.checked = event.isEnabled;
+});
+
+
+function synchroniseScrolling() {
+ var s1 = env.split.$editors[0].session;
+ var s2 = env.split.$editors[1].session;
+ s1.on('changeScrollTop', function(pos) {s2.setScrollTop(pos)});
+ s2.on('changeScrollTop', function(pos) {s1.setScrollTop(pos)});
+ s1.on('changeScrollLeft', function(pos) {s2.setScrollLeft(pos)});
+ s2.on('changeScrollLeft', function(pos) {s1.setScrollLeft(pos)});
+}
+
bindCheckbox("highlight_token", function(checked) {
var editor = env.editor;
if (editor.tokenTooltip && !checked) {
@@ -395,37 +526,60 @@ bindCheckbox("highlight_token", function(checked) {
}
});
-/************** dragover ***************************/
-event.addListener(container, "dragover", function(e) {
- return event.preventDefault(e);
-});
-
-event.addListener(container, "drop", function(e) {
- var file;
- try {
- file = e.dataTransfer.files[0];
- if (window.FileReader) {
- var reader = new FileReader();
- reader.onload = function() {
- var mode = getModeFromPath(file.name);
-
- env.editor.session.doc.setValue(reader.result);
- modeEl.value = mode.name;
- env.editor.session.setMode(mode.mode);
- env.editor.session.modeName = mode.name;
- };
- reader.readAsText(file);
- }
- return event.preventDefault(e);
- } catch(err) {
- return event.stopEvent(e);
- }
-});
-
-
-
-var StatusBar = require("./statusbar").StatusBar;
+var StatusBar = require("ace/ext/statusbar").StatusBar;
new StatusBar(env.editor, cmdLine.container);
+
+var Emmet = require("ace/ext/emmet");
+net.loadScript("https://cloud9ide.github.io/emmet-core/emmet.js", function() {
+ Emmet.setCore(window.emmet);
+ env.editor.setOption("enableEmmet", true);
});
+
+// require("ace/placeholder").PlaceHolder;
+
+var snippetManager = require("ace/snippets").snippetManager;
+
+env.editSnippets = function() {
+ var sp = env.split;
+ if (sp.getSplits() == 2) {
+ sp.setSplits(1);
+ return;
+ }
+ sp.setSplits(1);
+ sp.setSplits(2);
+ sp.setOrientation(sp.BESIDE);
+ var editor = sp.$editors[1];
+ var id = sp.$editors[0].session.$mode.$id || "";
+ var m = snippetManager.files[id];
+ if (!doclist["snippets/" + id]) {
+ var text = m.snippetText;
+ var s = doclist.initDoc(text, "", {});
+ s.setMode("ace/mode/snippets");
+ doclist["snippets/" + id] = s;
+ }
+ editor.on("blur", function() {
+ m.snippetText = editor.getValue();
+ snippetManager.unregister(m.snippets);
+ m.snippets = snippetManager.parseSnippetFile(m.snippetText, m.scope);
+ snippetManager.register(m.snippets);
+ });
+ sp.$editors[0].once("changeMode", function() {
+ sp.setSplits(1);
+ });
+ editor.setSession(doclist["snippets/" + id], 1);
+ editor.focus();
+};
+
+require("ace/ext/language_tools");
+env.editor.setOptions({
+ enableBasicAutocompletion: true,
+ enableLiveAutocompletion: false,
+ enableSnippets: true
+});
+
+var beautify = require("ace/ext/beautify");
+env.editor.commands.addCommands(beautify.commands);
+
+});
diff --git a/demo/kitchen-sink/dev_util.js b/demo/kitchen-sink/dev_util.js
new file mode 100644
index 00000000..f466285d
--- /dev/null
+++ b/demo/kitchen-sink/dev_util.js
@@ -0,0 +1,217 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+var dom = require("ace/lib/dom");
+var Range = require("ace/range").Range;
+function warn() {
+ var s = (new Error()).stack || "";
+ s = s.split("\n");
+ if (s[1] == "Error") s.shift(); // remove error description on chrome
+ s.shift(); // remove warn
+ s.shift(); // remove the getter
+ s = s.join("\n");
+ // allow easy access to ace in console, but not in ace code
+ if (!/at Object.InjectedScript.|@debugger eval|snippets:\/{3}|\(:\d+:\d+\)/.test(s)) {
+ console.error("trying to access to global variable");
+ }
+}
+function def(o, key, get) {
+ try {
+ Object.defineProperty(o, key, {
+ configurable: true,
+ get: get,
+ set: function(val) {
+ delete o[key];
+ o[key] = val;
+ }
+ });
+ } catch(e) {
+ console.error(e);
+ }
+}
+def(window, "ace", function(){ warn(); return window.env.editor });
+def(window, "editor", function(){ warn(); return window.env.editor });
+def(window, "session", function(){ warn(); return window.env.editor.session });
+def(window, "split", function(){ warn(); return window.env.split });
+
+
+def(window, "devUtil", function(){ warn(); return exports });
+exports.showTextArea = function(argument) {
+ dom.importCssString("\
+ .ace_text-input {\
+ position: absolute;\
+ z-index: 10!important;\
+ width: 6em!important;\
+ height: 1em;\
+ opacity: 1!important;\
+ background: rgba(0, 92, 255, 0.11);\
+ border: none;\
+ font: inherit;\
+ padding: 0 1px;\
+ margin: 0 -1px;\
+ text-indent: 0em;\
+ }\
+ ");
+};
+
+exports.addGlobals = function() {
+ window.oop = require("ace/lib/oop");
+ window.dom = require("ace/lib/dom");
+ window.Range = require("ace/range").Range;
+ window.Editor = require("ace/editor").Editor;
+ window.assert = require("ace/test/asyncjs/assert");
+ window.asyncjs = require("ace/test/asyncjs/async");
+ window.UndoManager = require("ace/undomanager").UndoManager;
+ window.EditSession = require("ace/edit_session").EditSession;
+ window.MockRenderer = require("ace/test/mockrenderer").MockRenderer;
+ window.EventEmitter = require("ace/lib/event_emitter").EventEmitter;
+
+ window.getSelection = getSelection;
+ window.setSelection = setSelection;
+ window.testSelection = testSelection;
+};
+
+function getSelection(editor) {
+ var data = editor.multiSelect.toJSON();
+ if (!data.length) data = [data];
+ data = data.map(function(x) {
+ var a, c;
+ if (x.isBackwards) {
+ a = x.end;
+ c = x.start;
+ } else {
+ c = x.end;
+ a = x.start;
+ }
+ return Range.comparePoints(a, c)
+ ? [a.row, a.column, c.row, c.column]
+ : [a.row, a.column];
+ });
+ return data.length > 1 ? data : data[0];
+}
+function setSelection(editor, data) {
+ if (typeof data[0] == "number")
+ data = [data];
+ editor.selection.fromJSON(data.map(function(x) {
+ var start = {row: x[0], column: x[1]};
+ var end = x.length == 2 ? start : {row: x[2], column: x[3]};
+ var isBackwards = Range.comparePoints(start, end) > 0;
+ return isBackwards ? {
+ start: end,
+ end: start,
+ isBackwards: true
+ } : {
+ start: start,
+ end: end,
+ isBackwards: true
+ };
+ }));
+}
+function testSelection(editor, data) {
+ assert.equal(getSelection(editor) + "", data + "");
+}
+
+exports.recordTestCase = function() {
+ exports.addGlobals();
+ var editor = window.editor;
+ var testcase = window.testcase = [];
+ var assert;
+
+ testcase.push({
+ type: "setValue",
+ data: editor.getValue()
+ }, {
+ type: "setSelection",
+ data: getSelection(editor)
+ });
+ editor.commands.on("afterExec", function(e) {
+ testcase.push({
+ type: "exec",
+ data: e
+ });
+ testcase.push({
+ type: "value",
+ data: editor.getValue()
+ });
+ testcase.push({
+ type: "selection",
+ data: getSelection(editor)
+ });
+ });
+ editor.on("mouseup", function() {
+ testcase.push({
+ type: "setSelection",
+ data: getSelection(editor)
+ });
+ });
+
+ testcase.toString = function() {
+ var lastValue = "";
+ // var lastSelection = ""
+ var str = this.map(function(x) {
+ var data = x.data;
+ switch (x.type) {
+ case "exec":
+ return 'editor.execCommand("'
+ + data.command.name
+ + (data.args ? '", ' + JSON.stringify(data.args) : '"')
+ + ')';
+ case "setSelection":
+ return 'setSelection(editor, ' + JSON.stringify(data) + ')';
+ case "setValue":
+ if (lastValue != data) {
+ lastValue = data;
+ return 'editor.setValue(' + JSON.stringify(data) + ', -1)';
+ }
+ return;
+ case "selection":
+ return 'testSelection(editor, ' + JSON.stringify(data) + ')';
+ case "value":
+ if (lastValue != data) {
+ lastValue = data;
+ return 'assert.equal('
+ + 'editor.getValue(),'
+ + JSON.stringify(data)
+ + ')';
+ }
+ return;
+ }
+ }).filter(Boolean).join("\n");
+
+ return getSelection + "\n"
+ + testSelection + "\n"
+ + setSelection + "\n"
+ + "\n" + str + "\n";
+ };
+};
+
+
+});
diff --git a/demo/kitchen-sink/doclist.js b/demo/kitchen-sink/doclist.js
index 3543cb7a..a4848d50 100644
--- a/demo/kitchen-sink/doclist.js
+++ b/demo/kitchen-sink/doclist.js
@@ -35,7 +35,7 @@ var EditSession = require("ace/edit_session").EditSession;
var UndoManager = require("ace/undomanager").UndoManager;
var net = require("ace/lib/net");
-var modelist = require("./modelist");
+var modelist = require("ace/ext/modelist");
/*********** demo documents ***************************/
var fileCache = {};
@@ -47,13 +47,15 @@ function initDoc(file, path, doc) {
session.setUndoManager(new UndoManager());
doc.session = session;
doc.path = path;
+ session.name = doc.name;
if (doc.wrapped) {
session.setUseWrapMode(true);
session.setWrapLimitRange(80, 80);
}
- var mode = modelist.getModeFromPath(path);
+ var mode = modelist.getModeForPath(path);
session.modeName = mode.name;
session.setMode(mode.mode);
+ return session;
}
@@ -64,75 +66,51 @@ function makeHuge(txt) {
}
var docs = {
- "docs/AsciiDoc.asciidoc": "AsciiDoc",
- "docs/javascript.js": "JavaScript",
- "docs/clojure.clj": "Clojure",
- "docs/coffeescript.coffee": "Coffeescript",
- "docs/coldfusion.cfm": "ColdFusion",
- "docs/cpp.cpp": "C/C++",
- "docs/csharp.cs": "C#",
- "docs/css.css": "CSS",
- "docs/dart.dart": "Dart",
- "docs/diff.diff": "Diff",
- "docs/glsl.glsl": "Glsl",
- "docs/golang.go": "Go",
- "docs/groovy.groovy": "Groovy",
- "docs/haml.haml": "Haml",
- "docs/Haxe.hx": "haXe",
- "docs/html.html": "HTML",
- "docs/jade.jade": "Jade",
- "docs/java.java": "Java",
- "docs/jsp.jsp": "JSP",
- "docs/json.json": "JSON",
- "docs/jsx.jsx": "JSX",
+ "docs/javascript.js": {order: 1, name: "JavaScript"},
+
"docs/latex.tex": {name: "LaTeX", wrapped: true},
- "docs/less.less": "LESS",
- "docs/lisp.lisp": "Lisp",
- "docs/liquid.liquid": "Liquid",
- "docs/lua.lua": "Lua",
- "docs/lucene.lucene": "Lucene",
- "docs/luapage.lp": "LuaPage",
- "docs/Makefile": "Makefile",
"docs/markdown.md": {name: "Markdown", wrapped: true},
- "docs/objectivec.m": {name: "Objective-C"},
- "docs/ocaml.ml": "OCaml",
- "docs/OpenSCAD.scad": "OpenSCAD",
- "docs/perl.pl": "Perl",
+ "docs/mushcode.mc": {name: "MUSHCode", wrapped: true},
"docs/pgsql.pgsql": {name: "pgSQL", wrapped: true},
- "docs/php.php": "PHP",
"docs/plaintext.txt": {name: "Plain Text", prepare: makeHuge, wrapped: true},
- "docs/powershell.ps1": "Powershell",
- "docs/python.py": "Python",
- "docs/r.r": "R",
- "docs/rdoc.Rd": "RDoc",
- "docs/rhtml.rhtml": "RHTML",
- "docs/ruby.rb": "Ruby",
- "docs/abap.abap": "SAP - ABAP",
- "docs/scala.scala": "Scala",
- "docs/scss.scss": "SCSS",
- "docs/sh.sh": "SH",
- "docs/stylus.styl": "Stylus",
"docs/sql.sql": {name: "SQL", wrapped: true},
- "docs/svg.svg": "SVG",
- "docs/tcl.tcl": "Tcl",
- "docs/tex.tex": "Tex",
+
"docs/textile.textile": {name: "Textile", wrapped: true},
- "docs/typescript.ts": "Typescript",
- "docs/xml.xml": "XML",
- "docs/xquery.xq": "XQuery",
- "docs/yaml.yaml": "YAML",
- "docs/c9search.c9search_results": "C9 Search Results"
+
+ "docs/c9search.c9search_results": "C9 Search Results",
+ "docs/mel.mel": "MEL",
+ "docs/Nix.nix": "Nix"
};
var ownSource = {
/* filled from require*/
};
-var hugeDocs = {
+var hugeDocs = require.toUrl ? {
"build/src/ace.js": "",
"build/src-min/ace.js": ""
+} : {
+ "src/ace.js": "",
+ "src-min/ace.js": ""
};
+modelist.modes.forEach(function(m) {
+ var ext = m.extensions.split("|")[0];
+ if (ext[0] === "^") {
+ path = ext.substr(1);
+ } else {
+ var path = m.name + "." + ext;
+ }
+ path = "docs/" + path;
+ if (!docs[path]) {
+ docs[path] = {name: m.caption};
+ } else if (typeof docs[path] == "object" && !docs[path].name) {
+ docs[path].name = m.caption;
+ }
+});
+
+
+
if (window.require && window.require.s) try {
for (var path in window.require.s.contexts._.defined) {
if (path.indexOf("!") != -1)
@@ -143,6 +121,13 @@ if (window.require && window.require.s) try {
}
} catch(e) {}
+function sort(list) {
+ return list.sort(function(a, b) {
+ var cmp = (b.order || 0) - (a.order || 0);
+ return cmp || a.name && a.name.localeCompare(b.name);
+ });
+}
+
function prepareDocList(docs) {
var list = [];
for (var path in docs) {
@@ -184,13 +169,44 @@ function loadDoc(name, callback) {
});
}
+function saveDoc(name, callback) {
+ var doc = fileCache[name] || name;
+ if (!doc || !doc.session)
+ return callback("Unknown document: " + name);
+
+ var path = doc.path;
+ var parts = path.split("/");
+ if (parts[0] == "docs")
+ path = "demo/kitchen-sink/" + path;
+ else if (parts[0] == "ace")
+ path = "lib/" + path;
+
+ upload(path, doc.session.getValue(), callback);
+}
+
+function upload(url, data, callback) {
+ url = net.qualifyURL(url);
+ if (!/https?:/.test(url))
+ return callback(new Error("Unsupported url scheme"));
+ var xhr = new XMLHttpRequest();
+ xhr.open("PUT", url, true);
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ callback(!/^2../.test(xhr.status));
+ }
+ };
+ xhr.send(data);
+};
+
+
module.exports = {
fileCache: fileCache,
- docs: prepareDocList(docs),
+ docs: sort(prepareDocList(docs)),
ownSource: prepareDocList(ownSource),
hugeDocs: prepareDocList(hugeDocs),
initDoc: initDoc,
- loadDoc: loadDoc
+ loadDoc: loadDoc,
+ saveDoc: saveDoc,
};
module.exports.all = {
"Mode Examples": module.exports.docs,
diff --git a/demo/kitchen-sink/docs/.gitignore b/demo/kitchen-sink/docs/.gitignore
new file mode 100644
index 00000000..56ec8fd9
--- /dev/null
+++ b/demo/kitchen-sink/docs/.gitignore
@@ -0,0 +1,11 @@
+# A sample .gitignore file.
+
+.buildlog
+.DS_Store
+.svn
+
+# Negated patterns:
+!foo.bar
+
+# Also ignore user settings...
+/.settings
diff --git a/demo/kitchen-sink/docs/Dockerfile b/demo/kitchen-sink/docs/Dockerfile
new file mode 100644
index 00000000..70270cbf
--- /dev/null
+++ b/demo/kitchen-sink/docs/Dockerfile
@@ -0,0 +1,53 @@
+#
+# example Dockerfile for http://docs.docker.io/en/latest/examples/postgresql_service/
+#
+
+FROM ubuntu
+MAINTAINER SvenDowideit@docker.com
+
+# Add the PostgreSQL PGP key to verify their Debian packages.
+# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
+RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
+
+# Add PostgreSQL's repository. It contains the most recent stable release
+# of PostgreSQL, ``9.3``.
+RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
+
+# Update the Ubuntu and PostgreSQL repository indexes
+RUN apt-get update
+
+# Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3
+# There are some warnings (in red) that show up during the build. You can hide
+# them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive
+RUN apt-get -y -q install python-software-properties software-properties-common
+RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
+
+# Note: The official Debian and Ubuntu images automatically ``apt-get clean``
+# after each ``apt-get``
+
+# Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed``
+USER postgres
+
+# Create a PostgreSQL role named ``docker`` with ``docker`` as the password and
+# then create a database `docker` owned by the ``docker`` role.
+# Note: here we use ``&&\`` to run commands one after the other - the ``\``
+# allows the RUN command to span multiple lines.
+RUN /etc/init.d/postgresql start &&\
+ psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\
+ createdb -O docker docker
+
+# Adjust PostgreSQL configuration so that remote connections to the
+# database are possible.
+RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
+
+# And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf``
+RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf
+
+# Expose the PostgreSQL port
+EXPOSE 5432
+
+# Add VOLUMEs to allow backup of config, logs and databases
+VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
+
+# Set the default command to run when starting the container
+CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"]
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/Jack.jack b/demo/kitchen-sink/docs/Jack.jack
new file mode 100644
index 00000000..15acf743
--- /dev/null
+++ b/demo/kitchen-sink/docs/Jack.jack
@@ -0,0 +1,247 @@
+vars it, p
+
+p = {label, value|
+ print("\n" + label)
+ print(inspect(value))
+}
+-- Create an array from 0 to 15
+p("range", i-collect(range(5)))
+
+-- Create an array from 0 to 15 and break up in chunks of 4
+p("chunked range", i-collect(i-chunk(4, range(16))))
+
+-- Check if all or none items in stream pass test.
+p("all < 60 in range(60)", i-all?({i|i<60}, range(60)))
+p("any < 60 in range(60)", i-any?({i|i>60}, range(60)))
+p("all < 60 in range(70)", i-all?({i|i<60}, range(70)))
+p("any < 60 in range(70)", i-any?({i|i>60}, range(70)))
+
+-- Zip three different collections together
+p("zipped", i-collect(i-zip(
+ range(10),
+ [1,2,3,4,5],
+ i-map({i|i*i}, range(10))
+)))
+
+vars names, person, i, doubles, lengths, cubeRange
+names = ["Thorin", "Dwalin", "Balin", "Bifur", "Bofur", "Bombur", "Oin",
+ "Gloin", "Ori", "Nori", "Dori", "Fili", "Kili", "Bilbo", "Gandalf"]
+
+for name in names {
+ if name != "Bilbo" && name != "Gandalf" {
+ print(name)
+ }
+}
+
+person = {name: "Tim", age: 30}
+for key, value in person {
+ print(key + " = " + value)
+}
+
+i = 0
+while i < 10 {
+ i = i + 1
+ print(i)
+}
+
+print("range")
+for i in range(10) {
+ print(i + 1)
+}
+for i in range(10) {
+ print(10 - i)
+}
+
+-- Dynamic object that gives the first 10 doubles
+doubles = {
+ @len: {| 10 }
+ @get: {key|
+ if key is Integer { key * key }
+ }
+}
+print("#doubles", #doubles)
+
+print("Doubles")
+for k, v in doubles {
+ print([k, v])
+}
+
+-- Dynamic object that has names list as keys and string lenth as values
+lengths = {
+ @keys: {| names }
+ @get: {key|
+ if key is String { #key }
+ }
+}
+
+print ("Lengths")
+for k, v in lengths {
+ print([k, v])
+}
+
+
+cubeRange = {n|
+ vars i, v
+ i = 0
+ {
+ @call: {|
+ v = i
+ i = i + 1
+ if v < n { v * v * v }
+ }
+ }
+}
+
+print("Cubes")
+for k, v in cubeRange(5) {
+ print([k, v])
+}
+print("String")
+for k, v in "Hello World" {
+ print([k, v])
+}
+
+
+print([i for i in range(10)])
+print([i for i in range(20) if i % 3])
+
+
+
+-- Example showing how to do parallel work using split..and
+base = {bootstrap, target-dir|
+ split {
+ copy("res", target-dir)
+ } and {
+ if newer("src/*.less", target-dir + "/style.css") {
+ lessc("src/" + bootstrap + ".less", target-dir + "/style.css")
+ }
+ } and {
+ build("src/" + bootstrap + ".js", target-dir + "/app.js")
+ }
+}
+
+
+vars Dragon, pet
+
+Dragon = {name|
+ vars asleep, stuff-in-belly, stuff-in-intestine,
+ feed, walk, put-to-bed, toss, rock,
+ hungry?, poopy?, passage-of-time
+
+ asleep = false
+ stuff-in-belly = 10 -- He's full.
+ stuff-in-intestine = 0 -- He doesn't need to go.
+
+ print(name + ' is born.')
+
+ feed = {|
+ print('You feed ' + name + '.')
+ stuff-in-belly = 10
+ passage-of-time()
+ }
+
+ walk = {|
+ print('You walk ' + name + ".")
+ stuff-in-intestine = 0
+ passage-of-time
+ }
+
+ put-to-bed = {|
+ print('You put ' + name + ' to bed.')
+ asleep = true
+ for i in range(3) {
+ if asleep {
+ passage-of-time()
+ }
+ if asleep {
+ print(name + ' snores, filling the room with smoke.')
+ }
+ }
+ if asleep {
+ asleep = false
+ print(name + ' wakes up slowly.')
+ }
+ }
+
+ toss = {|
+ print('You toss ' + name + ' up into the air.')
+ print('He giggles, which singes your eyebrows.')
+ passage-of-time()
+ }
+
+ rock = {|
+ print('You rock ' + name + ' gently.')
+ asleep = true
+ print('He briefly dozes off...')
+ passage-of-time()
+ if asleep {
+ asleep = false
+ print('...but wakes when you stop.')
+ }
+ }
+
+ hungry? = {|
+ stuff-in-belly <= 2
+ }
+
+ poopy? = {|
+ stuff-in-intestine >= 8
+ }
+
+ passage-of-time = {|
+ if stuff-in-belly > 0 {
+ -- Move food from belly to intestine
+ stuff-in-belly = stuff-in-belly - 1
+ stuff-in-intestine = stuff-in-intestine + 1
+ } else { -- Our dragon is starving!
+ if asleep {
+ asleep = false
+ print('He wakes up suddenly!')
+ }
+ print(name + ' is starving! In desperation, he ate YOU!')
+ abort "died"
+ }
+
+ if stuff-in-intestine >= 10 {
+ stuff-in-intestine = 0
+ print('Whoops! ' + name + ' had an accident...')
+ }
+
+ if hungry?() {
+ if asleep {
+ asleep = false
+ print('He wakes up suddenly!')
+ }
+ print(name + "'s stomach grumbles...")
+ }
+
+ if poopy?() {
+ if asleep {
+ asleep = false
+ print('He wakes up suddenly!')
+ }
+ print(name + ' does the potty dance...')
+ }
+ }
+
+ -- Export the public interface to this closure object.
+ {
+ feed: feed
+ walk: walk
+ put-to-bed: put-to-bed
+ toss: toss
+ rock: rock
+ }
+
+}
+
+pet = Dragon('Norbert')
+pet.feed()
+pet.toss()
+pet.walk()
+pet.put-to-bed()
+pet.rock()
+pet.put-to-bed()
+pet.put-to-bed()
+pet.put-to-bed()
+pet.put-to-bed()
diff --git a/demo/kitchen-sink/docs/Nix.nix b/demo/kitchen-sink/docs/Nix.nix
new file mode 100644
index 00000000..9476db3b
--- /dev/null
+++ b/demo/kitchen-sink/docs/Nix.nix
@@ -0,0 +1,57 @@
+{
+ # Name of our deployment
+ network.description = "HelloWorld";
+ # Enable rolling back to previous versions of our infrastructure
+ network.enableRollback = true;
+
+ # It consists of a single server named 'helloserver'
+ helloserver =
+ # Every server gets passed a few arguments, including a reference
+ # to nixpkgs (pkgs)
+ { config, pkgs, ... }:
+ let
+ # We import our custom packages from ./default passing pkgs as argument
+ packages = import ./default.nix { pkgs = pkgs; };
+ # This is the nodejs version specified in default.nix
+ nodejs = packages.nodejs;
+ # And this is the application we'd like to deploy
+ app = packages.app;
+ in
+ {
+ # We'll be running our application on port 8080, because a regular
+ # user cannot bind to port 80
+ # Then, using some iptables magic we'll forward traffic designated to port 80 to 8080
+ networking.firewall.enable = true;
+ # We will open up port 22 (SSH) as well otherwise we're locking ourselves out
+ networking.firewall.allowedTCPPorts = [ 80 8080 22 ];
+ networking.firewall.allowPing = true;
+
+ # Port forwarding using iptables
+ networking.firewall.extraCommands = ''
+ iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
+ '';
+
+ # To run our node.js program we're going to use a systemd service
+ # We can configure the service to automatically start on boot and to restart
+ # the process in case it crashes
+ systemd.services.helloserver = {
+ description = "Hello world application";
+ # Start the service after the network is available
+ after = [ "network.target" ];
+ # We're going to run it on port 8080 in production
+ environment = { PORT = "8080"; };
+ serviceConfig = {
+ # The actual command to run
+ ExecStart = "${nodejs}/bin/node ${app}/server.js";
+ # For security reasons we'll run this process as a special 'nodejs' user
+ User = "nodejs";
+ Restart = "always";
+ };
+ };
+
+ # And lastly we ensure the user we run our application as is created
+ users.extraUsers = {
+ nodejs = { };
+ };
+ };
+}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/abap.abap b/demo/kitchen-sink/docs/abap.abap
new file mode 100644
index 00000000..f66bfdfa
--- /dev/null
+++ b/demo/kitchen-sink/docs/abap.abap
@@ -0,0 +1,36 @@
+***************************************
+** Program: EXAMPLE **
+** Author: Joe Byte, 07-Jul-2007 **
+***************************************
+
+REPORT BOOKINGS.
+
+* Read flight bookings from the database
+SELECT * FROM FLIGHTINFO
+ WHERE CLASS = 'Y' "Y = economy
+ OR CLASS = 'C'. "C = business
+(...)
+
+REPORT TEST.
+WRITE 'Hello World'.
+
+USERPROMPT = 'Please double-click on a line in the output list ' &
+ 'to see the complete details of the transaction.'.
+
+
+DATA LAST_EOM TYPE D. "last end-of-month date
+
+* Start from today's date
+ LAST_EOM = SY-DATUM.
+* Set characters 6 and 7 (0-relative) of the YYYYMMDD string to "01",
+* giving the first day of the current month
+ LAST_EOM+6(2) = '01'.
+* Subtract one day
+ LAST_EOM = LAST_EOM - 1.
+
+ WRITE: 'Last day of previous month was', LAST_EOM.
+
+DATA : BEGIN OF I_VBRK OCCURS 0,
+ VBELN LIKE VBRK-VBELN,
+ ZUONR LIKE VBRK-ZUONR,
+ END OF I_VBRK.
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/abc.abc b/demo/kitchen-sink/docs/abc.abc
new file mode 100644
index 00000000..d8ac326e
--- /dev/null
+++ b/demo/kitchen-sink/docs/abc.abc
@@ -0,0 +1,171 @@
+%abc-2.1
+H:This file contains some example English tunes
+% note that the comments (like this one) are to highlight usages
+% and would not normally be included in such detail
+O:England % the origin of all tunes is England
+
+X:1 % tune no 1
+T:Dusty Miller, The % title
+T:Binny's Jig % an alternative title
+C:Trad. % traditional
+R:DH % double hornpipe
+M:3/4 % meter
+K:G % key
+B>cd BAG|FA Ac BA|B>cd BAG|DG GB AG:|
+Bdd gfg|aA Ac BA|Bdd gfa|gG GB AG:|
+BG G/2G/2G BG|FA Ac BA|BG G/2G/2G BG|DG GB AG:|
+W:Hey, the dusty miller, and his dusty coat;
+W:He will win a shilling, or he spend a groat.
+W:Dusty was the coat, dusty was the colour;
+W:Dusty was the kiss, that I got frae the miller.
+
+X:2
+T:Old Sir Simon the King
+C:Trad.
+S:Offord MSS % from Offord manuscript
+N:see also Playford % reference note
+M:9/8
+R:SJ % slip jig
+N:originally in C % transcription note
+K:G
+D|GFG GAG G2D|GFG GAG F2D|EFE EFE EFG|A2G F2E D2:|
+D|GAG GAB d2D|GAG GAB c2D|[1 EFE EFE EFG|[A2G] F2E D2:|\ % no line-break in score
+M:12/8 % change of meter
+[2 E2E EFE E2E EFG|\ % no line-break in score
+M:9/8 % change of meter
+A2G F2E D2|]
+
+X:3
+T:William and Nancy
+T:New Mown Hay
+T:Legacy, The
+C:Trad.
+O:England; Gloucs; Bledington % place of origin
+B:Sussex Tune Book % can be found in these books
+B:Mally's Cotswold Morris vol.1 2
+D:Morris On % can be heard on this record
+P:(AB)2(AC)2A % play the parts in this order
+M:6/8
+K:G
+[P:A] D|"G"G2G GBd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
+[P:B] d|"G"e2d B2d|"C"gfe "G"d2d| "G"e2d B2d|"C"gfe "D7"d2c|
+ "G"B2B Bcd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
+% changes of meter, using inline fields
+[T:Slows][M:4/4][L:1/4][P:C]"G"d2|"C"e2 "G"d2|B2 d2|"Em"gf "A7"e2|"D7"d2 "G"d2|\
+ "C"e2 "G"d2|[M:3/8][L:1/8] "G"B2 d |[M:6/8] "C"gfe "D7"d2c|
+ "G"B2B Bcd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
+
+X:4
+T:South Downs Jig
+R:jig
+S:Robert Harbron
+M:6/8
+L:1/8
+K:G
+|: d | dcA G3 | EFG AFE | DEF GAB | cde d2d |
+dcA G3 | EFG AFE | DEF GAB | cAF G2 :|
+B | Bcd e2c | d2B c2A | Bcd e2c | [M:9/8]d2B c2B A3 |
+[M:6/8]DGF E3 | cBA FED | DEF GAB |1 cAF G2 :|2 cAF G3 |]
+
+X:5
+T:Atholl Brose
+% in this example, which reproduces Highland Bagpipe gracing,
+% the large number of grace notes mean that it is more convenient to be specific about
+% score line-breaks (using the $ symbol), rather than using code line breaks to indicate them
+I:linebreak $
+K:D
+{gcd}c<{e}A {gAGAG}A2 {gef}e>A {gAGAG}Ad|
+{gcd}c<{e}A {gAGAG}A>e {ag}a>f {gef}e>d|
+{gcd}c<{e}A {gAGAG}A2 {gef}e>A {gAGAG}Ad|
+{g}c/d/e {g}G>{d}B {gf}gG {dc}d>B:|$
+{g}ce {ag}a>e {gf}g>e|
+{g}ce {ag}a2 {GdG}a>d|
+{g}ce {ag}a>e {gf}g>f|
+{gef}e>d {gf}g>d {gBd}B<{e}G {dc}d>B|
+{g}ce {ag}a>e {gf}g>e|
+{g}ce {ag}a2 {GdG}ad|
+{g}c<{GdG}e {gf}ga {f}g>e {g}f>d|
+{g}e/f/g {Gdc}d>c {gBd}B<{e}G {dc}d2|]
+
+X:6
+T:Untitled Reel
+C:Trad.
+K:D
+eg|a2ab ageg|agbg agef|g2g2 fgag|f2d2 d2:|\
+ed|cecA B2ed|cAcA E2ed|cecA B2ed|c2A2 A2:|
+K:G
+AB|cdec BcdB|ABAF GFE2|cdec BcdB|c2A2 A2:|
+
+X:7
+T:Kitchen Girl
+C:Trad.
+K:D
+[c4a4] [B4g4]|efed c2cd|e2f2 gaba|g2e2 e2fg|
+a4 g4|efed cdef|g2d2 efed|c2A2 A4:|
+K:G
+ABcA BAGB|ABAG EDEG|A2AB c2d2|e3f edcB|ABcA BAGB|
+ABAG EGAB|cBAc BAG2|A4 A4:|
+
+%abc-2.1
+%%pagewidth 21cm
+%%pageheight 29.7cm
+%%topspace 0.5cm
+%%topmargin 1cm
+%%botmargin 0cm
+%%leftmargin 1cm
+%%rightmargin 1cm
+%%titlespace 0cm
+%%titlefont Times-Bold 32
+%%subtitlefont Times-Bold 24
+%%composerfont Times 16
+%%vocalfont Times-Roman 14
+%%staffsep 60pt
+%%sysstaffsep 20pt
+%%musicspace 1cm
+%%vocalspace 5pt
+%%measurenb 0
+%%barsperstaff 5
+%%scale 0.7
+X: 1
+T: Canzonetta a tre voci
+C: Claudio Monteverdi (1567-1643)
+M: C
+L: 1/4
+Q: "Andante mosso" 1/4 = 110
+%%score [1 2 3]
+V: 1 clef=treble name="Soprano"sname="A"
+V: 2 clef=treble name="Alto" sname="T"
+V: 3 clef=bass middle=d name="Tenor" sname="B"
+%%MIDI program 1 75 % recorder
+%%MIDI program 2 75
+%%MIDI program 3 75
+K: Eb
+% 1 - 4
+[V: 1] |:z4 |z4 |f2ec |_ddcc |
+w: Son que-sti~i cre-spi cri-ni~e
+w: Que-sti son gli~oc-chi che mi-
+[V: 2] |:c2BG|AAGc|(F/G/A/B/)c=A|B2AA |
+w: Son que-sti~i cre-spi cri-ni~e que - - - - sto~il vi-so e
+w: Que-sti son~gli oc-chi che mi-ran - - - - do fi-so mi-
+[V: 3] |:z4 |f2ec|_ddcf |(B/c/_d/e/)ff|
+w: Son que-sti~i cre-spi cri-ni~e que - - - - sto~il
+w: Que-sti son~gli oc-chi che mi-ran - - - - do
+% 5 - 9
+[V: 1] cAB2 |cAAA |c3B|G2!fermata!Gz ::e4|
+w: que-sto~il vi-so ond' io ri-man-go~uc-ci-so. Deh,
+w: ran-do fi-so, tut-to re-stai con-qui-so.
+[V: 2] AAG2 |AFFF |A3F|=E2!fermata!Ez::c4|
+w: que-sto~il vi-so ond' io ri-man-go~uc-ci-so. Deh,
+w: ran-do fi-so tut-to re-stai con-qui-so.
+[V: 3] (ag/f/e2)|A_ddd|A3B|c2!fermata!cz ::A4|
+w: vi - - - so ond' io ti-man-go~uc-ci-so. Deh,
+w: fi - - - so tut-to re-stai con-qui-so.
+% 10 - 15
+[V: 1] f_dec |B2c2|zAGF |\
+w: dim-me-lo ben mi-o, che que-sto\
+=EFG2 |1F2z2:|2F8|] % more notes
+w: sol de-si-o_. % more lyrics
+[V: 2] ABGA |G2AA|GF=EF |(GF3/2=E//D//E)|1F2z2:|2F8|]
+w: dim-me-lo ben mi-o, che que-sto sol de-si - - - - o_.
+[V: 3] _dBc>d|e2AF|=EFc_d|c4 |1F2z2:|2F8|]
+w: dim-me-lo ben mi-o, che que-sto sol de-si-o_.
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/actionscript.as b/demo/kitchen-sink/docs/actionscript.as
new file mode 100644
index 00000000..ffe21fbf
--- /dev/null
+++ b/demo/kitchen-sink/docs/actionscript.as
@@ -0,0 +1,51 @@
+package code
+{
+ /*****************************************
+ * based on textmate actionscript bundle
+ ****************************************/
+
+ import fl.events.SliderEvent;
+
+ public class Foo extends MovieClip
+ {
+ //*************************
+ // Properties:
+
+ public var activeSwatch:MovieClip;
+
+ // Color offsets
+ public var c1:Number = 0; // R
+
+ //*************************
+ // Constructor:
+
+ public function Foo()
+ {
+ // Respond to mouse events
+ swatch1_btn.addEventListener(MouseEvent.CLICK,swatchHandler,false,0,false);
+ previewBox_btn.addEventListener(MouseEvent.MOUSE_DOWN,dragPressHandler);
+
+ // Respond to drag events
+ red_slider.addEventListener(SliderEvent.THUMB_DRAG,sliderHandler);
+
+ // Draw a frame later
+ addEventListener(Event.ENTER_FRAME,draw);
+ }
+
+ protected function clickHandler(event:MouseEvent):void
+ {
+ car.transform.colorTransform = new ColorTransform(0,0,0,1,c1,c2,c3);
+ }
+
+ protected function changeRGBHandler(event:Event):void
+ {
+ c1 = Number(c1_txt.text);
+
+ if(!(c1>=0)){
+ c1 = 0;
+ }
+
+ updateSliders();
+ }
+ }
+}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/ada.ada b/demo/kitchen-sink/docs/ada.ada
new file mode 100644
index 00000000..90e027f0
--- /dev/null
+++ b/demo/kitchen-sink/docs/ada.ada
@@ -0,0 +1,5 @@
+with Ada.Text_IO; use Ada.Text_IO;
+procedure Hello is
+begin
+ Put_Line("Hello, world!");
+end Hello;
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/AsciiDoc.asciidoc b/demo/kitchen-sink/docs/asciidoc.asciidoc
similarity index 100%
rename from demo/kitchen-sink/docs/AsciiDoc.asciidoc
rename to demo/kitchen-sink/docs/asciidoc.asciidoc
diff --git a/demo/kitchen-sink/docs/assembly_x86.asm b/demo/kitchen-sink/docs/assembly_x86.asm
new file mode 100644
index 00000000..01e8305c
--- /dev/null
+++ b/demo/kitchen-sink/docs/assembly_x86.asm
@@ -0,0 +1,18 @@
+section .text
+ global main ;must be declared for using gcc
+
+main: ;tell linker entry point
+
+ mov edx, len ;message length
+ mov ecx, msg ;message to write
+ mov ebx, 1 ;file descriptor (stdout)
+ mov eax, 4 ;system call number (sys_write)
+ int 0x80 ;call kernel
+
+ mov eax, 1 ;system call number (sys_exit)
+ int 0x80 ;call kernel
+
+section .data
+
+msg db 'Hello, world!',0xa ;our dear string
+len equ $ - msg ;length of our dear string
diff --git a/demo/kitchen-sink/docs/autohotkey.ahk b/demo/kitchen-sink/docs/autohotkey.ahk
new file mode 100644
index 00000000..73687e67
--- /dev/null
+++ b/demo/kitchen-sink/docs/autohotkey.ahk
@@ -0,0 +1,35 @@
+#NoEnv
+SetBatchLines -1
+
+CoordMode Mouse, Screen
+OnExit GuiClose
+
+zoom := 9
+
+computeSize(){
+ global as_x
+ as_x := Round(ws_x/zoom/2 - 0.5)
+ if (zoom>1) {
+ pix := Round(zoom)
+ } ele {
+ pix := 1
+ }
+ ToolTip Message %as_x% %zoom% %ws_x% %hws_x%
+}
+
+hdc_frame := DllCall("GetDC", UInt, MagnifierID)
+
+; comment
+DrawCross(byRef x="", rX,rY,z, dc){
+ ;specify the style, thickness and color of the cross lines
+ h_pen := DllCall( "gdi32.dll\CreatePen", Int, 0, Int, 1, UInt, 0x0000FF)
+}
+
+;Ctrl ^; Shift +; Win #; Alt !
+^NumPadAdd::
+^WheelUp::
+^;:: ;comment
+ If(zoom < ws_x and ( A_ThisHotKey = "^WheelUp" or A_ThisHotKey ="^NumPadAdd") )
+ zoom *= 1.189207115 ; sqrt(sqrt(2))
+ Gosub,setZoom
+return
diff --git a/demo/kitchen-sink/docs/batchfile.bat b/demo/kitchen-sink/docs/batchfile.bat
new file mode 100644
index 00000000..c066a9e9
--- /dev/null
+++ b/demo/kitchen-sink/docs/batchfile.bat
@@ -0,0 +1,15 @@
+:: batch file highlighting in Ace!
+@echo off
+
+CALL set var1=%cd%
+echo unhide everything in %var1%!
+
+:: FOR loop in bat is super strange!
+FOR /f "tokens=*" %%G IN ('dir /A:D /b') DO (
+echo %var1%%%G
+attrib -r -a -h -s "%var1%%%G" /D /S
+)
+
+pause
+
+REM that's all
diff --git a/demo/kitchen-sink/docs/c9search.c9search_results b/demo/kitchen-sink/docs/c9search.c9search_results
index bf0fdb87..0ad9ccd4 100644
--- a/demo/kitchen-sink/docs/c9search.c9search_results
+++ b/demo/kitchen-sink/docs/c9search.c9search_results
@@ -1,4 +1,4 @@
-Searching for 'var' in /workspace/configs
+Searching for var in/.c9/metadata/workspace/pluginsregexp, case sensitive, whole word
configs/default.js:
1: var fs = require("fs");
diff --git a/demo/kitchen-sink/docs/c_cpp.cpp b/demo/kitchen-sink/docs/c_cpp.cpp
new file mode 100644
index 00000000..a2ebdaa2
--- /dev/null
+++ b/demo/kitchen-sink/docs/c_cpp.cpp
@@ -0,0 +1,44 @@
+// compound assignment operators
+
+#include
+
+#include \
+
+
+#include \
+ \
+
+
+#include \
+ \
+ "iostream"
+
+#include
+#include "boost/asio/io_service.hpp"
+
+#include \
+ \
+ "iostream" \
+ "string" \
+
+
+using namespace std;
+
+int main ()
+{
+ int a, b=3; /* foobar */
+ a = b;
+ a+=2; // equivalent to a=a+2
+ cout << a;
+ #if VERBOSE >= 2
+ prints("trace message");
+ #endif
+ return 0;
+}
+
+/* Print an error message and get out */
+#define ABORT \
+ do { \
+ print( "Abort\n" ); \
+ exit(8); \
+} while (0) /* Note: No semicolon */
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/cirru.cirru b/demo/kitchen-sink/docs/cirru.cirru
new file mode 100644
index 00000000..244833df
--- /dev/null
+++ b/demo/kitchen-sink/docs/cirru.cirru
@@ -0,0 +1,42 @@
+-- https://github.com/Cirru/cirru-gopher/blob/master/code/scope.cr,
+
+set a (int 2)
+
+print (self)
+
+set c (child)
+
+under c
+ under parent
+ print a
+
+print $ get c a
+
+set c x (int 3)
+print $ get c x
+
+set just-print $ code
+ print a
+
+print just-print
+
+eval (self) just-print
+eval just-print
+
+print (string "string with space")
+print (string "escapes \n \"\\")
+
+brackets ((((()))))
+
+"eval" $ string "eval"
+
+print (add $ (int 1) (int 2))
+
+print $ unwrap $
+ map (a $ int 1) (b $ int 2)
+
+print a
+ int 1
+ , b c
+ int 2
+ , d
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/cobol.CBL b/demo/kitchen-sink/docs/cobol.CBL
new file mode 100644
index 00000000..30404ce4
--- /dev/null
+++ b/demo/kitchen-sink/docs/cobol.CBL
@@ -0,0 +1 @@
+TODO
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/coffeescript.coffee b/demo/kitchen-sink/docs/coffee.coffee
similarity index 100%
rename from demo/kitchen-sink/docs/coffeescript.coffee
rename to demo/kitchen-sink/docs/coffee.coffee
diff --git a/demo/kitchen-sink/docs/cpp.cpp b/demo/kitchen-sink/docs/cpp.cpp
deleted file mode 100644
index 1a2843db..00000000
--- a/demo/kitchen-sink/docs/cpp.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// compound assignment operators
-
-#include
-using namespace std;
-
-int main ()
-{
- int a, b=3; /* foobar */
- a = b;
- a+=2; // equivalent to a=a+2
- cout << a;
- return 0;
-}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/css.css b/demo/kitchen-sink/docs/css.css
index a4c3b4fd..6d2d71f5 100644
--- a/demo/kitchen-sink/docs/css.css
+++ b/demo/kitchen-sink/docs/css.css
@@ -1,28 +1,18 @@
.text-layer {
- font-family: Monaco, "Courier New", monospace;
- font-size: 12px;
+ font: 12px Monaco, "Courier New", monospace;
cursor: text;
}
.blinker {
- animation-duration: 1s;
- animation-name: blink;
- animation-iteration-count: infinite;
- animation-direction: alternate;
- animation-timing-function: linear;
+ animation: blink 1s linear infinite alternate;
}
@keyframes blink {
- 0% {
+ 0%, 40% {
opacity: 0;
}
- 40% {
- opacity: 0;
- }
- 40.5% {
- opacity: 1
- }
- 100% {
+
+ 40.5%, 100% {
opacity: 1
}
}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/curly.curly b/demo/kitchen-sink/docs/curly.curly
new file mode 100644
index 00000000..c42d6790
--- /dev/null
+++ b/demo/kitchen-sink/docs/curly.curly
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+ {{author_name}}
+
+
diff --git a/demo/kitchen-sink/docs/d.d b/demo/kitchen-sink/docs/d.d
new file mode 100644
index 00000000..57069067
--- /dev/null
+++ b/demo/kitchen-sink/docs/d.d
@@ -0,0 +1,14 @@
+#!/usr/bin/env rdmd
+// Computes average line length for standard input.
+import std.stdio;
+
+void main() {
+ ulong lines = 0;
+ double sumLength = 0;
+ foreach (line; stdin.byLine()) {
+ ++lines;
+ sumLength += line.length;
+ }
+ writeln("Average line length: ",
+ lines ? sumLength / lines : 0);
+}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/dart.dart b/demo/kitchen-sink/docs/dart.dart
index 8700c8cd..735a20b3 100644
--- a/demo/kitchen-sink/docs/dart.dart
+++ b/demo/kitchen-sink/docs/dart.dart
@@ -1,58 +1,19 @@
-main() {
- print('Hello World!');
+// Go ahead and modify this example.
+
+import "dart:html";
+
+// Computes the nth Fibonacci number.
+int fibonacci(int n) {
+ if (n < 2) return n;
+ return fibonacci(n - 1) + fibonacci(n - 2);
}
+// Displays a Fibonacci number.
+void main() {
+ int i = 20;
+ String message = "fibonacci($i) = ${fibonacci(i)}";
-int fib(int n) => (n > 1) ? (fib(n - 1) + fib(n - 2)) : n;
-main() {
- print('fib(20) = ${fib(20)}');
+ // This example uses HTML to display the result and it will appear
+ // in a nested HTML frame (an iframe).
+ document.body.append(new HeadingElement.h1()..appendText(message));
}
-/*asd
-asdad
-*/
-0.67
-77
-.86
-
-#import("http://dartwatch.com/myOtherLibrary.dart");
-#import("myOtherLibrary.dart", prefix:"lib1");
-
-"""asdasdads
-asdadsadsasd
-asdasdasdad"""
-
-'23424'
-
-0x234
-
-foo is bar
-
-int x = 4 << 10
-// Create a class for Point.
-class Point {
-
- // Final variables cannot be changed once they are assigned.
- // Create two instance variables.
- final num x, y;
-
- // A constructor, with syntactic sugar for setting instance variables.
- Point(this.x, this.y);
-
- // A named constructor with an initializer list.
- Point.origin() : x = 0, y = 0;
-
- // A method.
- num distanceTo(Point other) {
- var dx = x - other.x;
- var dy = y - other.y;
- return sqrt(dx * dx + dy * dy);
- }
-}
-
- // Check for null.
-var unicorn;
-assert(unicorn == null);
-
-// Check for NaN.
-var iMeantToDoThis = 0/0;
-assert(iMeantToDoThis.isNaN());
diff --git a/demo/kitchen-sink/docs/dot.dot b/demo/kitchen-sink/docs/dot.dot
new file mode 100644
index 00000000..1e13be7e
--- /dev/null
+++ b/demo/kitchen-sink/docs/dot.dot
@@ -0,0 +1,110 @@
+// Original source: http://www.graphviz.org/content/lion_share
+##"A few people in the field of genetics are using dot to draw "marriage node diagram" pedigree drawings. Here is one I have done of a test pedigree from the FTREE pedigree drawing package (Lion Share was a racehorse)." Contributed by David Duffy.
+
+##Command to get the layout: "dot -Tpng thisfile > thisfile.png"
+
+digraph Ped_Lion_Share {
+# page = "8.2677165,11.692913" ;
+ratio = "auto" ;
+mincross = 2.0 ;
+label = "Pedigree Lion_Share" ;
+
+"001" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"002" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"003" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"004" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"005" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"006" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"007" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"009" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"014" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"015" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"016" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"ZZ01" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"ZZ02" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"017" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"012" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"008" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"011" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"013" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"010" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"023" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"020" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"021" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"018" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"025" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"019" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"022" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"024" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"027" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
+"026" [shape=box , regular=1,style=filled,fillcolor=white ] ;
+"028" [shape=box , regular=1,style=filled,fillcolor=grey ] ;
+"marr0001" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"001" -> "marr0001" [dir=none,weight=1] ;
+"007" -> "marr0001" [dir=none,weight=1] ;
+"marr0001" -> "017" [dir=none, weight=2] ;
+"marr0002" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"001" -> "marr0002" [dir=none,weight=1] ;
+"ZZ02" -> "marr0002" [dir=none,weight=1] ;
+"marr0002" -> "012" [dir=none, weight=2] ;
+"marr0003" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"002" -> "marr0003" [dir=none,weight=1] ;
+"003" -> "marr0003" [dir=none,weight=1] ;
+"marr0003" -> "008" [dir=none, weight=2] ;
+"marr0004" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"002" -> "marr0004" [dir=none,weight=1] ;
+"006" -> "marr0004" [dir=none,weight=1] ;
+"marr0004" -> "011" [dir=none, weight=2] ;
+"marr0005" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"002" -> "marr0005" [dir=none,weight=1] ;
+"ZZ01" -> "marr0005" [dir=none,weight=1] ;
+"marr0005" -> "013" [dir=none, weight=2] ;
+"marr0006" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"004" -> "marr0006" [dir=none,weight=1] ;
+"009" -> "marr0006" [dir=none,weight=1] ;
+"marr0006" -> "010" [dir=none, weight=2] ;
+"marr0007" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"005" -> "marr0007" [dir=none,weight=1] ;
+"015" -> "marr0007" [dir=none,weight=1] ;
+"marr0007" -> "023" [dir=none, weight=2] ;
+"marr0008" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"005" -> "marr0008" [dir=none,weight=1] ;
+"016" -> "marr0008" [dir=none,weight=1] ;
+"marr0008" -> "020" [dir=none, weight=2] ;
+"marr0009" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"005" -> "marr0009" [dir=none,weight=1] ;
+"012" -> "marr0009" [dir=none,weight=1] ;
+"marr0009" -> "021" [dir=none, weight=2] ;
+"marr0010" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"008" -> "marr0010" [dir=none,weight=1] ;
+"017" -> "marr0010" [dir=none,weight=1] ;
+"marr0010" -> "018" [dir=none, weight=2] ;
+"marr0011" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"011" -> "marr0011" [dir=none,weight=1] ;
+"023" -> "marr0011" [dir=none,weight=1] ;
+"marr0011" -> "025" [dir=none, weight=2] ;
+"marr0012" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"013" -> "marr0012" [dir=none,weight=1] ;
+"014" -> "marr0012" [dir=none,weight=1] ;
+"marr0012" -> "019" [dir=none, weight=2] ;
+"marr0013" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"010" -> "marr0013" [dir=none,weight=1] ;
+"021" -> "marr0013" [dir=none,weight=1] ;
+"marr0013" -> "022" [dir=none, weight=2] ;
+"marr0014" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"019" -> "marr0014" [dir=none,weight=1] ;
+"020" -> "marr0014" [dir=none,weight=1] ;
+"marr0014" -> "024" [dir=none, weight=2] ;
+"marr0015" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"022" -> "marr0015" [dir=none,weight=1] ;
+"025" -> "marr0015" [dir=none,weight=1] ;
+"marr0015" -> "027" [dir=none, weight=2] ;
+"marr0016" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"024" -> "marr0016" [dir=none,weight=1] ;
+"018" -> "marr0016" [dir=none,weight=1] ;
+"marr0016" -> "026" [dir=none, weight=2] ;
+"marr0017" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
+"026" -> "marr0017" [dir=none,weight=1] ;
+"027" -> "marr0017" [dir=none,weight=1] ;
+"marr0017" -> "028" [dir=none, weight=2] ;
+}
diff --git a/demo/kitchen-sink/docs/eiffel.e b/demo/kitchen-sink/docs/eiffel.e
new file mode 100644
index 00000000..943cdb35
--- /dev/null
+++ b/demo/kitchen-sink/docs/eiffel.e
@@ -0,0 +1,30 @@
+note
+ description: "Represents a person."
+
+class
+ PERSON
+
+create
+ make, make_unknown
+
+feature {NONE} -- Creation
+
+ make (a_name: like name)
+ -- Create a person with `a_name' as `name'.
+ do
+ name := a_name
+ ensure
+ name = a_name
+ end
+
+ make_unknown
+ do ensure
+ name = Void
+ end
+
+feature -- Access
+
+ name: detachable STRING
+ -- Full name or Void if unknown.
+
+end
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/ejs.ejs b/demo/kitchen-sink/docs/ejs.ejs
new file mode 100644
index 00000000..aaf497a9
--- /dev/null
+++ b/demo/kitchen-sink/docs/ejs.ejs
@@ -0,0 +1,31 @@
+
+
+
+ Cloud9 Rocks!
+
+
+
+
+
+ Name
+ Size
+
+ <% if (!isRoot) { %>
+
+ ..
+
+
+ <% } %>
+ <% entries.forEach(function(entry) { %>
+
+
+
+ <%= entry.name %>
+
+ <%= entry.size %>
+
+ <% }) %>
+
+
+
+
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/elixir.ex b/demo/kitchen-sink/docs/elixir.ex
new file mode 100644
index 00000000..bb6a45f1
--- /dev/null
+++ b/demo/kitchen-sink/docs/elixir.ex
@@ -0,0 +1,42 @@
+defmodule HelloModule do
+ @moduledoc """
+ This is supposed to be `markdown`.
+ __Yes__ this is [mark](http://down.format)
+
+ # Truly
+
+ ## marked
+
+ * with lists
+ * more
+ * and more
+
+ Even.with(code)
+ blocks |> with |> samples
+
+ _Docs are first class citizens in Elixir_ (Jose Valim)
+ """
+
+ # A "Hello world" function
+ def some_fun do
+ IO.puts "Juhu Kinners!"
+ end
+ # A private function
+ defp priv do
+ is_regex ~r"""
+ This is a regex
+ spanning several
+ lines.
+ """
+ x = elem({ :a, :b, :c }, 0) #=> :a
+ end
+end
+
+test_fun = fn(x) ->
+ cond do
+ x > 10 ->
+ :greater_than_ten
+ true ->
+ :maybe_ten
+ end
+end
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/elm.elm b/demo/kitchen-sink/docs/elm.elm
new file mode 100644
index 00000000..eef70b2a
--- /dev/null
+++ b/demo/kitchen-sink/docs/elm.elm
@@ -0,0 +1,12 @@
+{- Ace {- 4 -} Elm -}
+main = lift clock (every second)
+
+clock t = collage 400 400 [ filled lightGrey (ngon 12 110)
+ , outlined (solid grey) (ngon 12 110)
+ , hand orange 100 t
+ , hand charcoal 100 (t/60)
+ , hand charcoal 60 (t/720) ]
+
+hand clr len time =
+ let angle = degrees (90 - 6 * inSeconds time)
+ in traced (solid clr) <| segment (0,0) (len * cos angle, len * sin angle)
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/erlang.erl b/demo/kitchen-sink/docs/erlang.erl
new file mode 100644
index 00000000..705642b3
--- /dev/null
+++ b/demo/kitchen-sink/docs/erlang.erl
@@ -0,0 +1,20 @@
+ %% A process whose only job is to keep a counter.
+ %% First version
+ -module(counter).
+ -export([start/0, codeswitch/1]).
+
+ start() -> loop(0).
+
+ loop(Sum) ->
+ receive
+ {increment, Count} ->
+ loop(Sum+Count);
+ {counter, Pid} ->
+ Pid ! {counter, Sum},
+ loop(Sum);
+ code_switch ->
+ ?MODULE:codeswitch(Sum)
+ % Force the use of 'codeswitch/1' from the latest MODULE version
+ end.
+
+ codeswitch(Sum) -> loop(Sum).
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/forth.frt b/demo/kitchen-sink/docs/forth.frt
new file mode 100644
index 00000000..dc85cd7b
--- /dev/null
+++ b/demo/kitchen-sink/docs/forth.frt
@@ -0,0 +1,41 @@
+: HELLO ( -- ) CR ." Hello, world!" ;
+
+HELLO
+Hello, world!
+
+: [CHAR] CHAR POSTPONE LITERAL ; IMMEDIATE
+
+0 value ii 0 value jj
+0 value KeyAddr 0 value KeyLen
+create SArray 256 allot \ state array of 256 bytes
+: KeyArray KeyLen mod KeyAddr ;
+
+: get_byte + c@ ;
+: set_byte + c! ;
+: as_byte 255 and ;
+: reset_ij 0 TO ii 0 TO jj ;
+: i_update 1 + as_byte TO ii ;
+: j_update ii SArray get_byte + as_byte TO jj ;
+: swap_s_ij
+ jj SArray get_byte
+ ii SArray get_byte jj SArray set_byte
+ ii SArray set_byte
+;
+
+: rc4_init ( KeyAddr KeyLen -- )
+ 256 min TO KeyLen TO KeyAddr
+ 256 0 DO i i SArray set_byte LOOP
+ reset_ij
+ BEGIN
+ ii KeyArray get_byte jj + j_update
+ swap_s_ij
+ ii 255 < WHILE
+ ii i_update
+ REPEAT
+ reset_ij
+;
+: rc4_byte
+ ii i_update jj j_update
+ swap_s_ij
+ ii SArray get_byte jj SArray get_byte + as_byte SArray get_byte xor
+;
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/ftl.ftl b/demo/kitchen-sink/docs/ftl.ftl
new file mode 100644
index 00000000..faa573f5
--- /dev/null
+++ b/demo/kitchen-sink/docs/ftl.ftl
@@ -0,0 +1,46 @@
+<#ftl encoding="utf-8" />
+<#setting locale="en_US" />
+<#import "library" as lib />
+<#--
+ FreeMarker comment
+ ${abc} <#assign a=12 />
+-->
+
+
+
+
+
+
+ ${title!"FreeMarker"}
+
+
+
+
+ Hello ${name!""}
+
+ Today is: ${.now?date}
+
+ <#assign x = 13>
+ <#if x > 12 && x lt 14>x equals 13: ${x}#if>
+
+
+ <#list items as item>
+ ${item_index}: ${item.name!?split("\n")[0]}
+ #list>
+
+
+ User directive: <@lib.function attr1=true attr2='value' attr3=-42.12>Test@lib.function>
+ <@anotherOne />
+
+ <#if variable?exists>
+ Deprecated
+ <#elseif variable??>
+ Better
+ <#else>
+ Default
+ #if>
+
+
+
+
+
diff --git a/demo/kitchen-sink/docs/gcode.gcode b/demo/kitchen-sink/docs/gcode.gcode
new file mode 100644
index 00000000..5f47bca3
--- /dev/null
+++ b/demo/kitchen-sink/docs/gcode.gcode
@@ -0,0 +1,31 @@
+O003 (DIAMOND SQUARE)
+N2 G54 G90 G49 G80
+N3 M6 T1 (1.ENDMILL)
+N4 M3 S1800
+N5 G0 X-.6 Y2.050
+N6 G43 H1 Z.1
+N7 G1 Z-.3 F50.
+N8 G41 D1 Y1.45
+N9 G1 X0 F20.
+N10 G2 J-1.45
+(CUTTER COMP CANCEL)
+N11 G1 Z-.2 F50.
+N12 Y-.990
+N13 G40
+N14 G0 X-.6 Y1.590
+N15 G0 Z.1
+N16 M5 G49 G28 G91 Z0
+N17 CALL O9456
+N18 #500=0.004
+N19 #503=[#500+#501]
+N20 VC45=0.0006
+VS4=0.0007
+N21 G90 G10 L20 P3 X5.Y4. Z6.567
+N22 G0 X5000
+N23 IF [#1 LT 0.370] GOTO 49
+N24 X-0.678 Y+.990
+N25 G84.3 X-0.1
+N26 #4=#5*COS[45]
+N27 #4=#5*SIN[45]
+N28 VZOFZ=652.9658
+%
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/gherkin.feature b/demo/kitchen-sink/docs/gherkin.feature
new file mode 100644
index 00000000..52cd811e
--- /dev/null
+++ b/demo/kitchen-sink/docs/gherkin.feature
@@ -0,0 +1,28 @@
+@these @are @tags
+Feature: Serve coffee
+ Coffee should not be served until paid for
+ Coffee should not be served until the button has been pressed
+ If there is no coffee left then money should be refunded
+
+ Scenario Outline: Eating
+ Given there are cucumbers
+ When I eat cucumbers
+ Then I should have cucumbers
+
+ Examples:
+ | start | eat | left |
+ | 12 | 5 | 7 |
+ | 20 | 5 | 15 |
+
+ Scenario: Buy last coffee
+ Given there are 1 coffees left in the machine
+ And I have deposited 1$
+ When I press the coffee button
+ Then I should be served a "coffee"
+
+ # this a comment
+
+ """
+ this is a
+ pystring
+ """
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/handlebars.hbs b/demo/kitchen-sink/docs/handlebars.hbs
new file mode 100644
index 00000000..bb096a1a
--- /dev/null
+++ b/demo/kitchen-sink/docs/handlebars.hbs
@@ -0,0 +1,8 @@
+{{!-- Ace + :-}} --}}
+
+
diff --git a/demo/kitchen-sink/docs/haskell.hs b/demo/kitchen-sink/docs/haskell.hs
new file mode 100644
index 00000000..5c0defc2
--- /dev/null
+++ b/demo/kitchen-sink/docs/haskell.hs
@@ -0,0 +1,20 @@
+-- Type annotation (optional)
+fib :: Int -> Integer
+
+-- With self-referencing data
+fib n = fibs !! n
+ where fibs = 0 : scanl (+) 1 fibs
+ -- 0,1,1,2,3,5,...
+
+-- Same, coded directly
+fib n = fibs !! n
+ where fibs = 0 : 1 : next fibs
+ next (a : t@(b:_)) = (a+b) : next t
+
+-- Similar idea, using zipWith
+fib n = fibs !! n
+ where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
+
+-- Using a generator function
+fib n = fibs (0,1) !! n
+ where fibs (a,b) = a : fibs (b,a+b)
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/htaccess b/demo/kitchen-sink/docs/htaccess
new file mode 100644
index 00000000..a9f5a27c
--- /dev/null
+++ b/demo/kitchen-sink/docs/htaccess
@@ -0,0 +1,10 @@
+Redirect /linux http://www.linux.org
+Redirect 301 /kernel http://www.linux.org
+
+# comment
+RewriteEngine on
+
+RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*
+RewriteRule ^/$ /homepage.max.html [L]
+
+RewriteRule ^/$ /homepage.std.html [L]
diff --git a/demo/kitchen-sink/docs/html.html b/demo/kitchen-sink/docs/html.html
index a3a566ff..81398bef 100644
--- a/demo/kitchen-sink/docs/html.html
+++ b/demo/kitchen-sink/docs/html.html
@@ -1,3 +1,4 @@
+
diff --git a/demo/kitchen-sink/docs/html_ruby.erb b/demo/kitchen-sink/docs/html_ruby.erb
new file mode 100644
index 00000000..f75835ca
--- /dev/null
+++ b/demo/kitchen-sink/docs/html_ruby.erb
@@ -0,0 +1,26 @@
+Listing Books
+
+
+
+ Title
+ Summary
+
+
+
+
+
+<% @books.each do |book| %>
+
+ <%# comment %>
+ <%= book.title %>
+ <%= book.content %>
+ <%= link_to 'Show', book %>
+ <%= link_to 'Edit', edit_book_path(book) %>
+ <%= link_to 'Remove', book, :confirm => 'Are you sure?', :method => :delete %>
+
+<% end %>
+
+
+
+
+<%= link_to 'New book', new_book_path %>
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/ini.ini b/demo/kitchen-sink/docs/ini.ini
new file mode 100644
index 00000000..45f83c9a
--- /dev/null
+++ b/demo/kitchen-sink/docs/ini.ini
@@ -0,0 +1,4 @@
+[.ShellClassInfo]
+IconResource=..\logo.png
+[ViewState]
+FolderType=Generic
diff --git a/demo/kitchen-sink/docs/io.io b/demo/kitchen-sink/docs/io.io
new file mode 100644
index 00000000..4b80b6c2
--- /dev/null
+++ b/demo/kitchen-sink/docs/io.io
@@ -0,0 +1,6 @@
+// computes factorial of a number
+factorial := method(n,
+ if(n == 0, return 1)
+ res := 1
+ Range 1 to(n) foreach(i, res = res * i)
+)
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/jsoniq.jq b/demo/kitchen-sink/docs/jsoniq.jq
new file mode 100644
index 00000000..30404ce4
--- /dev/null
+++ b/demo/kitchen-sink/docs/jsoniq.jq
@@ -0,0 +1 @@
+TODO
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/julia.jl b/demo/kitchen-sink/docs/julia.jl
new file mode 100644
index 00000000..f558ae22
--- /dev/null
+++ b/demo/kitchen-sink/docs/julia.jl
@@ -0,0 +1,15 @@
+for op = (:+, :*, :&, :|, :$)
+ @eval ($op)(a,b,c) = ($op)(($op)(a,b),c)
+end
+
+v = α';
+function g(x,y)
+ return x * y
+ x + y
+end
+
+cd("data") do
+ open("outfile", "w") do f
+ write(f, data)
+ end
+end
diff --git a/demo/kitchen-sink/docs/lean.lean b/demo/kitchen-sink/docs/lean.lean
new file mode 100644
index 00000000..40e82753
--- /dev/null
+++ b/demo/kitchen-sink/docs/lean.lean
@@ -0,0 +1,9 @@
+import logic
+section
+ variables (A : Type) (p q : A → Prop)
+
+ example : (∀x : A, p x ∧ q x) → ∀y : A, p y :=
+ assume H : ∀x : A, p x ∧ q x,
+ take y : A,
+ show p y, from and.elim_left (H y)
+end
diff --git a/demo/kitchen-sink/docs/livescript.ls b/demo/kitchen-sink/docs/livescript.ls
new file mode 100644
index 00000000..ce082b4c
--- /dev/null
+++ b/demo/kitchen-sink/docs/livescript.ls
@@ -0,0 +1,245 @@
+# Defines an editing mode for [Ace](http://ace.ajax.org).
+#
+# Open [test/ace.html](../test/ace.html) to test.
+
+require, exports, module <-! define \ace/mode/ls
+
+identifier = /(?![\d\s])[$\w\xAA-\uFFDC](?:(?!\s)[$\w\xAA-\uFFDC]|-[A-Za-z])*/$
+
+exports.Mode = class LiveScriptMode extends require(\ace/mode/text)Mode
+ ->
+ @$tokenizer =
+ new (require \ace/tokenizer)Tokenizer LiveScriptMode.Rules
+ if require \ace/mode/matching_brace_outdent
+ @$outdent = new that.MatchingBraceOutdent
+
+ indenter = // (?
+ : [({[=:]
+ | [-~]>
+ | \b (?: e(?:lse|xport) | d(?:o|efault) | t(?:ry|hen) | finally |
+ import (?:\s* all)? | const | var |
+ let | new | catch (?:\s* #identifier)? )
+ ) \s* $ //
+
+ getNextLineIndent: (state, line, tab) ->
+ indent = @$getIndent line
+ {tokens} = @$tokenizer.getLineTokens line, state
+ unless tokens.length and tokens[*-1]type is \comment
+ indent += tab if state is \start and indenter.test line
+ indent
+
+ toggleCommentLines: (state, doc, startRow, endRow) ->
+ comment = /^(\s*)#/; range = new (require \ace/range)Range 0 0 0 0
+ for i from startRow to endRow
+ if out = comment.test line = doc.getLine i
+ then line.=replace comment, \$1
+ else line.=replace /^\s*/ \$
+ range.end.row = range.start.row = i
+ range.end.column = line.length + 1
+ doc.replace range, line
+ 1 - out * 2
+
+ checkOutdent: (state, line, input) -> @$outdent?checkOutdent line, input
+
+ autoOutdent: (state, doc, row) -> @$outdent?autoOutdent doc, row
+
+### Highlight Rules
+
+keywordend = /(?![$\w]|-[A-Za-z]|\s*:(?![:=]))/$
+stringfill = token: \string, regex: '.+'
+
+LiveScriptMode.Rules =
+ start:
+ * token: \keyword
+ regex: //(?
+ :t(?:h(?:is|row|en)|ry|ypeof!?)
+ |c(?:on(?:tinue|st)|a(?:se|tch)|lass)
+ |i(?:n(?:stanceof)?|mp(?:ort(?:\s+all)?|lements)|[fs])
+ |d(?:e(?:fault|lete|bugger)|o)
+ |f(?:or(?:\s+own)?|inally|unction)
+ |s(?:uper|witch)
+ |e(?:lse|x(?:tends|port)|val)
+ |a(?:nd|rguments)
+ |n(?:ew|ot)
+ |un(?:less|til)
+ |w(?:hile|ith)
+ |o[fr]|return|break|let|var|loop
+ )//$ + keywordend
+
+ * token: \constant.language
+ regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
+
+ * token: \invalid.illegal
+ regex: '(?
+ :p(?:ackage|r(?:ivate|otected)|ublic)
+ |i(?:mplements|nterface)
+ |enum|static|yield
+ )' + keywordend
+
+ * token: \language.support.class
+ regex: '(?
+ :R(?:e(?:gExp|ferenceError)|angeError)
+ |S(?:tring|yntaxError)
+ |E(?:rror|valError)
+ |Array|Boolean|Date|Function|Number|Object|TypeError|URIError
+ )' + keywordend
+
+ * token: \language.support.function
+ regex: '(?
+ :is(?:NaN|Finite)
+ |parse(?:Int|Float)
+ |Math|JSON
+ |(?:en|de)codeURI(?:Component)?
+ )' + keywordend
+
+ * token: \variable.language
+ regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
+
+ * token: \identifier
+ regex: identifier + /\s*:(?![:=])/$
+
+ * token: \variable
+ regex: identifier
+
+ * token: \keyword.operator
+ regex: /(?:\.{3}|\s+\?)/$
+
+ * token: \keyword.variable
+ regex: /(?:@+|::|\.\.)/$
+ next : \key
+
+ * token: \keyword.operator
+ regex: /\.\s*/$
+ next : \key
+
+ * token: \string
+ regex: /\\\S[^\s,;)}\]]*/$
+
+ * token: \string.doc
+ regex: \'''
+ next : \qdoc
+
+ * token: \string.doc
+ regex: \"""
+ next : \qqdoc
+
+ * token: \string
+ regex: \'
+ next : \qstring
+
+ * token: \string
+ regex: \"
+ next : \qqstring
+
+ * token: \string
+ regex: \`
+ next : \js
+
+ * token: \string
+ regex: '<\\['
+ next : \words
+
+ * token: \string.regex
+ regex: \//
+ next : \heregex
+
+ * token: \comment.doc
+ regex: '/\\*'
+ next : \comment
+
+ * token: \comment
+ regex: '#.*'
+
+ * token: \string.regex
+ regex: //
+ /(?: [^ [ / \n \\ ]*
+ (?: (?: \\.
+ | \[ [^\]\n\\]* (?:\\.[^\]\n\\]*)* \]
+ ) [^ [ / \n \\ ]*
+ )*
+ )/ [gimy$]{0,4}
+ //$
+ next : \key
+
+ * token: \constant.numeric
+ regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*
+ |(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*
+ |(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)
+ (?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
+
+ * token: \lparen
+ regex: '[({[]'
+
+ * token: \rparen
+ regex: '[)}\\]]'
+ next : \key
+
+ * token: \keyword.operator
+ regex: \\\S+
+
+ * token: \text
+ regex: \\\s+
+
+ heregex:
+ * token: \string.regex
+ regex: '.*?//[gimy$?]{0,4}'
+ next : \start
+ * token: \string.regex
+ regex: '\\s*#{'
+ * token: \comment.regex
+ regex: '\\s+(?:#.*)?'
+ * token: \string.regex
+ regex: '\\S+'
+
+ key:
+ * token: \keyword.operator
+ regex: '[.?@!]+'
+ * token: \identifier
+ regex: identifier
+ next : \start
+ * token: \text
+ regex: '.'
+ next : \start
+
+ comment:
+ * token: \comment.doc
+ regex: '.*?\\*/'
+ next : \start
+ * token: \comment.doc
+ regex: '.+'
+
+ qdoc:
+ token: \string
+ regex: ".*?'''"
+ next : \key
+ stringfill
+
+ qqdoc:
+ token: \string
+ regex: '.*?"""'
+ next : \key
+ stringfill
+
+ qstring:
+ token: \string
+ regex: /[^\\']*(?:\\.[^\\']*)*'/$
+ next : \key
+ stringfill
+
+ qqstring:
+ token: \string
+ regex: /[^\\"]*(?:\\.[^\\"]*)*"/$
+ next : \key
+ stringfill
+
+ js:
+ token: \string
+ regex: /[^\\`]*(?:\\.[^\\`]*)*`/$
+ next : \key
+ stringfill
+
+ words:
+ token: \string
+ regex: '.*?\\]>'
+ next : \key
+ stringfill
diff --git a/demo/kitchen-sink/docs/logiql.logic b/demo/kitchen-sink/docs/logiql.logic
new file mode 100644
index 00000000..910862d7
--- /dev/null
+++ b/demo/kitchen-sink/docs/logiql.logic
@@ -0,0 +1,16 @@
+// ancestors
+parentof("douglas", "john").
+parentof("john", "bob").
+parentof("bob", "ebbon").
+
+parentof("douglas", "jane").
+parentof("jane", "jan").
+
+ancestorof(A, B) <- parentof(A, B).
+ancestorof(A, C) <- ancestorof(A, B), parentof(B,C).
+
+grandparentof(A, B) <- parentof(A, C), parentof(C, B).
+
+cousins(A,B) <- grandparentof(C,A), grandparentof(C,B).
+
+parentof[`arg](A, B) -> int[32](A), !string(B).
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/lsl.lsl b/demo/kitchen-sink/docs/lsl.lsl
new file mode 100644
index 00000000..baf06f08
--- /dev/null
+++ b/demo/kitchen-sink/docs/lsl.lsl
@@ -0,0 +1,75 @@
+/*
+ Testing syntax highlighting
+ of Ace Editor
+ for the Linden Scripting Language
+*/
+
+integer someIntNormal = 3672;
+integer someIntHex = 0x00000000;
+integer someIntMath = PI_BY_TWO;
+
+integer event = 5673; // invalid.illegal
+
+key someKeyTexture = TEXTURE_DEFAULT;
+string someStringSpecial = EOF;
+
+some_user_defined_function_without_return_type(string inputAsString)
+{
+ llSay(PUBLIC_CHANNEL, inputAsString);
+}
+
+string user_defined_function_returning_a_string(key inputAsKey)
+{
+ return (string)inputAsKey;
+}
+
+default
+{
+ state_entry()
+ {
+ key someKey = NULL_KEY;
+ someKey = llGetOwner();
+
+ string someString = user_defined_function_returning_a_string(someKey);
+
+ some_user_defined_function_without_return_type(someString);
+ }
+
+ touch_start(integer num_detected)
+ {
+ list agentsInRegion = llGetAgentList(AGENT_LIST_REGION, []);
+ integer numOfAgents = llGetListLength(agentsInRegion);
+
+ integer index; // defaults to 0
+ for (; index <= numOfAgents - 1; index++) // for each agent in region
+ {
+ llRegionSayTo(llList2Key(agentsInRegion, index), PUBLIC_CHANNEL, "Hello, Avatar!");
+ }
+ }
+
+ touch_end(integer num_detected)
+ {
+ someIntNormal = 3672;
+ someIntHex = 0x00000000;
+ someIntMath = PI_BY_TWO;
+
+ event = 5673; // invalid.illegal
+
+ someKeyTexture = TEXTURE_DEFAULT;
+ someStringSpecial = EOF;
+
+ llSetInventoryPermMask("some item", MASK_NEXT, PERM_ALL); // reserved.godmode
+
+ llWhisper(PUBLIC_CHANNEL, "Leaving \"default\" now...");
+ state other;
+ }
+}
+
+state other
+{
+ state_entry()
+ {
+ llWhisper(PUBLIC_CHANNEL, "Entered \"state other\", returning to \"default\" again...");
+ state default;
+ }
+}
diff --git a/demo/kitchen-sink/docs/lua.lua b/demo/kitchen-sink/docs/lua.lua
index 381b782c..6c927197 100644
--- a/demo/kitchen-sink/docs/lua.lua
+++ b/demo/kitchen-sink/docs/lua.lua
@@ -34,3 +34,5 @@ print([===[
table.maxn is deprecated, use # instead.
--]=]--
print(table.maxn{1,2,[4]=4,[8]=8) -- outputs 8 instead of 2
+
+print(5 --[[ blah ]])
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/mask.mask b/demo/kitchen-sink/docs/mask.mask
new file mode 100644
index 00000000..85a9e6c2
--- /dev/null
+++ b/demo/kitchen-sink/docs/mask.mask
@@ -0,0 +1,52 @@
+/* Mask Syntax Demo */
+
+div > ' Test ~[name]';
+
+define :userProfile {
+ header {
+ h4 > @title;
+ button.close;
+ }
+}
+
+:userProfile {
+ @title > ' Hello ~[: username.toUpperCase()]'
+}
+
+style {
+ html, body {
+ background: url('name.png') 0 0 no-repeat;
+ }
+}
+
+button {
+ event click (e) {
+ this.textContent = `name ${e.clientX} !`;
+ }
+}
+
+md > """
+
+- div
+- span
+
+Hello
+
+[one](http://google.com)
+
+""";
+
+
+header .foo > 'Heading'
+
+button .baz x-signal='click: test' disabled > "
+ Hello,
+ world
+ \"Buddy\"
+"
+
+var a = {
+ name: `name ${window.innerWidth}`
+};
+
+span .foo > "~[bind: a.name]"
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/matlab.matlab b/demo/kitchen-sink/docs/matlab.matlab
new file mode 100644
index 00000000..b2ca44d5
--- /dev/null
+++ b/demo/kitchen-sink/docs/matlab.matlab
@@ -0,0 +1,17 @@
+%{
+ %{
+ Ace Matlab demo
+ %}
+%}
+
+classdef hello
+ methods
+ function greet(this)
+ disp('Hello!') % say hi
+ end
+ end
+end
+
+% transpose
+a = [ 'x''y', "x\n\
+ y", 1' ]' + 2'
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/mel.mel b/demo/kitchen-sink/docs/mel.mel
new file mode 100644
index 00000000..63dc14d6
--- /dev/null
+++ b/demo/kitchen-sink/docs/mel.mel
@@ -0,0 +1,33 @@
+// animated duplicates, instances script
+proc animatedDuplication (int $rangeStart, int $rangeEnd, int $numOfDuplicates, int $duplicateOrInstance)
+{
+ int $range_start = $rangeStart;
+ int $range_end = $rangeEnd;
+ int $num_of_duplicates = $numOfDuplicates;
+ int $step_size = ($range_end - $range_start) / $num_of_duplicates;
+ int $i = 0;
+ int $temp;
+
+ currentTime $range_start; // set to range start
+
+ string $selectedObjects[]; // to store selected objects
+ $selectedObjects = `ls -sl`; // store selected objects
+ select $selectedObjects;
+
+ while ($i <= $num_of_duplicates)
+ {
+ $temp = $range_start + ($step_size * $i);
+ currentTime ($temp);
+ // seleced the objects to duplicate or instance
+ select $selectedObjects;
+ if($duplicateOrInstance == 0)
+ {
+ duplicate;
+ }
+ else
+ {
+ instance;
+ }
+ $i++;
+ }
+}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/mushcode.mc b/demo/kitchen-sink/docs/mushcode.mc
new file mode 100644
index 00000000..6861f955
--- /dev/null
+++ b/demo/kitchen-sink/docs/mushcode.mc
@@ -0,0 +1,8 @@
+@create phone
+&pickup phone=$pick up:@ifelse [u(is,u(mode),ICC)]={@pemit %#=You pick up the [fullname(me)].[set(me,PHONER:%#)][set(me,MODE:CIP)][set([u(INCOMING)],CONNECTED:[num(me)])][set(me,CONNECTED:[u(INCOMING)])]%r[showpicture(PICPICKUP)]%rUse '[color(green,black,psay )]' (or '[color(green,black,p )]') to talk into the phone.;@oemit %#=%N picks up the [fullname(me)].},{@pemit %#=You pick up the phone but no one is there. You hear a dialtone and then hang up. [play(u(DIALTONE))];@oemit %#=%N picks up the phone, but no one is on the other end.}
+&ringfun phone=[ifelse(eq(comp([u(%0/ringtone)],off),0),[color(black,cyan,INCOMING CALL FROM %1)],[play([switch([u(%0/ringtone)],1,[u(%0/ringtone1)],2,[u(%0/ringtone2)],3,[u(%0/ringtone3)],4,[u(%0/ringtone4)],5,[u(%0/ringtone5)],6,[u(%0/ringtone6)],7,[u(%0/ringtone7)],8,[u(%0/ringtone8)],9,[u(%0/ringtone9)],custom,[u(%0/customtone)],vibrate,[u(%0/vibrate)])])]
+&ringloop phone=@switch [u(ringstate)]=1,{@emit [setq(q,[u(connecting)])][set(%qq,rangs:0)][set(%qq,mode:WFC)][set(%qq,INCOMING:)];@ifelse [u(%qq/HASVMB)]={@tr me/ROUTEVMB=[u(connecting)];},{@pemit %#=[u(MSGCNC)];}},2,{@pemit %#=The call is connected.[setq(q,[u(CONNECTING)])][set(me,CONNECTED:%qq)][set(%qq,CONNECTED:[num(me)])][set(%qq,MODE:CIP)];@tr me/ciploop;@tr %qq/ciploop;},3,{@emit On [fullname(me)]'s earpiece you hear a ringing sound.[play(u(LINETONE))];@tr me/ringhere;@increment [u(connecting)]/RANGS;@wait 5={@tr me/ringloop};},4,{}
+&ringstate phone=[setq(q,u(connecting))][setq(1,[gt(u(%qq/rangs),sub(u(%qq/rings),1))])][setq(2,[and(u(is,u(%qq/MODE),CIP),u(is,u(%qq/INCOMING),[num(me)]))][setq(3,[u(is,u(%qq/MODE),ICC)])][ifelse(%q1,1,ifelse(%q2,2,ifelse(%q3,3,4)))]
+;comment
+@@(comment)
+say [time()]
diff --git a/demo/kitchen-sink/docs/mysql.mysql b/demo/kitchen-sink/docs/mysql.mysql
new file mode 100644
index 00000000..30404ce4
--- /dev/null
+++ b/demo/kitchen-sink/docs/mysql.mysql
@@ -0,0 +1 @@
+TODO
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/pascal.pas b/demo/kitchen-sink/docs/pascal.pas
new file mode 100644
index 00000000..7a4a7fc6
--- /dev/null
+++ b/demo/kitchen-sink/docs/pascal.pas
@@ -0,0 +1,48 @@
+(*****************************************************************************
+ * A simple bubble sort program. Reads integers, one per line, and prints *
+ * them out in sorted order. Blows up if there are more than 49. *
+ *****************************************************************************)
+PROGRAM Sort(input, output);
+ CONST
+ (* Max array size. *)
+ MaxElts = 50;
+ TYPE
+ (* Type of the element array. *)
+ IntArrType = ARRAY [1..MaxElts] OF Integer;
+
+ VAR
+ (* Indexes, exchange temp, array size. *)
+ i, j, tmp, size: integer;
+
+ (* Array of ints *)
+ arr: IntArrType;
+
+ (* Read in the integers. *)
+ PROCEDURE ReadArr(VAR size: Integer; VAR a: IntArrType);
+ BEGIN
+ size := 1;
+ WHILE NOT eof DO BEGIN
+ readln(a[size]);
+ IF NOT eof THEN
+ size := size + 1
+ END
+ END;
+
+ BEGIN
+ (* Read *)
+ ReadArr(size, arr);
+
+ (* Sort using bubble sort. *)
+ FOR i := size - 1 DOWNTO 1 DO
+ FOR j := 1 TO i DO
+ IF arr[j] > arr[j + 1] THEN BEGIN
+ tmp := arr[j];
+ arr[j] := arr[j + 1];
+ arr[j + 1] := tmp;
+ END;
+
+ (* Print. *)
+ FOR i := 1 TO size DO
+ writeln(arr[i])
+ END.
+
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/perl.pl b/demo/kitchen-sink/docs/perl.pl
index 01178e1c..d6a332e2 100644
--- a/demo/kitchen-sink/docs/perl.pl
+++ b/demo/kitchen-sink/docs/perl.pl
@@ -1,4 +1,8 @@
#!/usr/bin/perl
+=begin
+ perl example code for Ace
+=cut
+
use strict;
use warnings;
my $num_primes = 0;
@@ -30,3 +34,4 @@ for my $p (0 .. ($num_primes-1))
print $primes[$p], ", ";
}
print "\n";
+
diff --git a/demo/kitchen-sink/docs/pgsql.pgsql b/demo/kitchen-sink/docs/pgsql.pgsql
index 67be9882..ef265cdc 100644
--- a/demo/kitchen-sink/docs/pgsql.pgsql
+++ b/demo/kitchen-sink/docs/pgsql.pgsql
@@ -41,8 +41,8 @@ SELECT city, temp_lo, temp_hi, prcp, "date", location
/**
* Dollar quotes starting at the end of the line are colored as SQL unless
-* a special language tag is used. Pearl and Python are currently implemented
-* but lots of others are possible.
+* a special language tag is used. Dollar quote syntax coloring is implemented
+* for Perl, Python, JavaScript, and Json.
*/
create or replace function blob_content_chunked(
in p_data bytea,
@@ -82,6 +82,24 @@ CREATE FUNCTION usesavedplan() RETURNS trigger AS $python$
SD["plan"] = plan
$python$ LANGUAGE plpythonu;
+-- pl/v8 (javascript)
+CREATE FUNCTION plv8_test(keys text[], vals text[]) RETURNS text AS $javascript$
+var o = {};
+for(var i=0; i= 5364
+ # New-style procedure call with colon
+ @newStyle: "quoted", 2, "quoted string"
+endif
+
+# if-block with built-in variables
+if windows
+ # We are on Windows
+elsif unix = 1 or !macintosh
+ exitScript: "We are on Linux"
+else macintosh == 1
+ exit We are on Mac
+endif
+
+# inline if with inline comment
+var = if macintosh = 1 then 0 else 1 fi ; This is an inline comment
+
+# for-loop with explicit from using local variable
+# and paren-style function calls and variable interpolation
+n = numberOfSelected("Sound")
+for i from newStyle.local to n
+ sound'i' = selected("Sound", i)
+ sound[i] = sound'i'
+endfor
+
+for i from 1 to n
+ # Different styles of object selection
+ select sound'i'
+ sound = selected()
+ sound$ = selected$("Sound")
+ select Sound 'sound$'
+ selectObject(sound[i])
+ selectObject: sound
+
+ # Pause commands
+ beginPause("Viewing " + sound$)
+ if i > 1
+ button = endPause("Stop", "Previous",
+ ...if i = total_sounds then "Finish" else "Next" fi,
+ ...3, 1)
+ else
+ button = endPause("Stop",
+ ...if i = total_sounds then "Finish" else "Next" fi,
+ ...2, 1)
+ endif
+ editor_name$ = if total_textgrids then "TextGrid " else "Sound " fi + name$
+ nocheck editor 'editor_name$'
+ nocheck Close
+ nocheck endeditor
+
+ # New-style standalone command call
+ Rename: "SomeName"
+
+ # Command call with assignment
+ duration = Get total duration
+
+ # Multi-line command with modifier
+ pitch = noprogress To Pitch (ac): 0, 75, 15, "no",
+ ...0.03, 0.45, 0.01, 0.35, 0.14, 600
+
+ # do-style command with assignment
+ minimum = do("Get minimum...", 0, 0, "Hertz", "Parabolic")
+
+ # New-style multi-line command call with broken strings
+ table = Create Table with column names: "table", 0,
+ ..."file subject speaker
+ ...f0 f1 f2 f3 " +
+ ..."duration response"
+
+ removeObject: pitch, table
+
+ # Picture window commands
+ selectObject: sound
+ # do-style command
+ do("Select inner viewport...", 1, 6, 0.5, 1.5)
+ Black
+ Draw... 0 0 0 0 "no" Curve
+ Draw inner box
+ Text bottom: "yes", sound$
+ Erase all
+
+ # Demo window commands
+ demo Erase all
+ demo Select inner viewport... 0 100 0 100
+ demo Axes... 0 100 0 100
+ demo Paint rectangle... white 0 100 0 100
+ demo Text... 50 centre 50 half Click to finish
+ demoWaitForInput ( )
+ demo Erase all
+ demo Text: 50, "centre", 50, "half", "Finished"
+endfor
+
+# An old-style sendpraat block
+sendpraat Praat
+ ...'newline$' Create Sound as pure tone... "tone" 1 0 0.4 44100 440 0.2 0.01 0.01
+ ...'newline$' Play
+ ...'newline$' Remove
+
+# A new-style sendpraat block
+beginSendPraat: "Praat"
+ Create Sound as pure tone: "tone", 1, 0, 0.4, 44100, 440, 0.2, 0.01, 0.01
+ duration = Get total duration
+ Remove
+endSendPraat: "duration"
+appendInfoLine: "The generated sound lasted for ", duration, "seconds"
+
+time = stopwatch
+clearinfo
+echo This script took
+print 'time' seconds to
+printline execute.
+
+# Old-style procedure declaration
+procedure oldStyle .str1$ .num .str2$
+ .local = 1
+endproc
+
+# New-style procedure declaration
+procedure newStyle (.str1$, .num, .str2$)
+ .local = 1
+endproc
diff --git a/demo/kitchen-sink/docs/prolog.plg b/demo/kitchen-sink/docs/prolog.plg
new file mode 100644
index 00000000..2c867157
--- /dev/null
+++ b/demo/kitchen-sink/docs/prolog.plg
@@ -0,0 +1,18 @@
+partition([], _, [], []).
+partition([X|Xs], Pivot, Smalls, Bigs) :-
+ ( X @< Pivot ->
+ Smalls = [X|Rest],
+ partition(Xs, Pivot, Rest, Bigs)
+ ; Bigs = [X|Rest],
+ partition(Xs, Pivot, Smalls, Rest)
+ ).
+
+quicksort([]) --> [].
+quicksort([X|Xs]) -->
+ { partition(Xs, X, Smaller, Bigger) },
+ quicksort(Smaller), [X], quicksort(Bigger).
+
+perfect(N) :-
+ between(1, inf, N), U is N // 2,
+ findall(D, (between(1,U,D), N mod D =:= 0), Ds),
+ sumlist(Ds, N).
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/properties.properties b/demo/kitchen-sink/docs/properties.properties
new file mode 100644
index 00000000..446b340d
--- /dev/null
+++ b/demo/kitchen-sink/docs/properties.properties
@@ -0,0 +1,15 @@
+# You are reading the ".properties" entry.
+! The exclamation mark can also mark text as comments.
+# The key and element characters #, !, =, and : are written with a preceding backslash to ensure that they are properly loaded.
+website = http\://en.wikipedia.org/
+language = English
+# The backslash below tells the application to continue reading
+# the value onto the next line.
+message = Welcome to \
+ Wikipedia!
+# Add spaces to the key
+key\ with\ spaces = This is the value that could be looked up with the key "key with spaces".
+# Unicode
+tab : \u0009
+empty-key=
+last.line=value
diff --git a/demo/kitchen-sink/docs/protobuf.proto b/demo/kitchen-sink/docs/protobuf.proto
new file mode 100644
index 00000000..4da95a75
--- /dev/null
+++ b/demo/kitchen-sink/docs/protobuf.proto
@@ -0,0 +1,16 @@
+message Point {
+ required int32 x = 1;
+ required int32 y = 2;
+ optional string label = 3;
+}
+
+message Line {
+ required Point start = 1;
+ required Point end = 2;
+ optional string label = 3;
+}
+
+message Polyline {
+ repeated Point point = 1;
+ optional string label = 2;
+}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/ruby.rb b/demo/kitchen-sink/docs/ruby.rb
index 48e26ae0..386fbb86 100644
--- a/demo/kitchen-sink/docs/ruby.rb
+++ b/demo/kitchen-sink/docs/ruby.rb
@@ -20,4 +20,16 @@ class Range
end
end
-{:id => 34, :sdfasdfasdf => "asdasdads"}
\ No newline at end of file
+{:id => ?", :key => "value"}
+
+
+ herDocs = [<<'FOO', <(vector: &[T], function: &fn(v: &T) -> U) -> ~[U] {
+ let mut accumulator = ~[];
+ for vec::each(vector) |element| {
+ accumulator.push(function(element));
+ }
+ return accumulator;
+}
diff --git a/demo/kitchen-sink/docs/sass.sass b/demo/kitchen-sink/docs/sass.sass
new file mode 100644
index 00000000..6caaaff8
--- /dev/null
+++ b/demo/kitchen-sink/docs/sass.sass
@@ -0,0 +1,39 @@
+// sass ace mode;
+
+@import url(http://fonts.googleapis.com/css?family=Ace:700)
+
+html, body
+ :background-color #ace
+ text-align: center
+ height: 100%
+ /*;*********;
+ ;comment ;
+ ;*********;
+
+.toggle
+ $size: 14px
+
+ :background url(http://subtlepatterns.com/patterns/dark_stripes.png)
+ border-radius: 8px
+ height: $size
+
+ &:before
+ $radius: $size * 0.845
+ $glow: $size * 0.125
+
+ box-shadow: 0 0 $glow $glow / 2 #fff
+ border-radius: $radius
+
+ &:active
+ ~ .button
+ box-shadow: 0 15px 25px -4px rgba(0,0,0,0.4)
+ ~ .label
+ font-size: 40px
+ color: rgba(0,0,0,0.45)
+
+ &:checked
+ ~ .button
+ box-shadow: 0 15px 25px -4px #ace
+ ~ .label
+ font-size: 40px
+ color: #c9c9c9
diff --git a/demo/kitchen-sink/docs/OpenSCAD.scad b/demo/kitchen-sink/docs/scad.scad
similarity index 100%
rename from demo/kitchen-sink/docs/OpenSCAD.scad
rename to demo/kitchen-sink/docs/scad.scad
diff --git a/demo/kitchen-sink/docs/scheme.scm b/demo/kitchen-sink/docs/scheme.scm
new file mode 100644
index 00000000..8c78359c
--- /dev/null
+++ b/demo/kitchen-sink/docs/scheme.scm
@@ -0,0 +1,21 @@
+(define (prompt-for-cd)
+ "Prompts
+ for CD"
+ (prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6))
+ (prompt-read "Artist")
+ (or (parse-integer (prompt-read "Rating") #:junk-allowed #t) 0)
+ (if x (format #t "yes") (format #f "no") ;and here comment
+ )
+ ;; second line comment
+ '(+ 1 2)
+ (position-if-not char-set:whitespace line #:start beg))
+ (quote (privet 1 2 3))
+ '(hello world)
+ (* 5 7)
+ (1 2 34 5)
+ (#:use "aaaa")
+ (let ((x 10) (y 20))
+ (display (+ x y))
+ )
+
+ "asdad\0eqweqe"
diff --git a/demo/kitchen-sink/docs/sh.sh b/demo/kitchen-sink/docs/sh.sh
index 010ad500..4c5e6968 100755
--- a/demo/kitchen-sink/docs/sh.sh
+++ b/demo/kitchen-sink/docs/sh.sh
@@ -2,9 +2,9 @@
# Script to open a browser to current branch
# Repo formats:
-# ssh git@github.com:richoH/gh_pr.git
-# http https://richoH@github.com/richoH/gh_pr.git
-# git git://github.com/richoH/gh_pr.git
+# ssh git@github.com:richo/gh_pr.git
+# http https://richoH@github.com/richo/gh_pr.git
+# git git://github.com/richo/gh_pr.git
username=`git config --get github.user`
@@ -30,6 +30,8 @@ get_repo() {
fi
}
+echo ${#x[@]}
+
if repo=`get_repo $@`; then
branch=`git symbolic-ref HEAD 2>/dev/null`
echo "http://github.com/$repo/pull/new/${branch##refs/heads/}"
diff --git a/demo/kitchen-sink/docs/sjs.sjs b/demo/kitchen-sink/docs/sjs.sjs
new file mode 100644
index 00000000..18ce0e49
--- /dev/null
+++ b/demo/kitchen-sink/docs/sjs.sjs
@@ -0,0 +1,28 @@
+var { each, map } = require('sjs:sequence');
+var { get } = require('sjs:http');
+
+function foo(items, nada) {
+ var component = { name: "Ace", role: "Editor" };
+ console.log("
+ Welcome, #{component.name}
+ ".trim());
+
+ logging.debug(`Component added: $String(component) (${component})`);
+
+ console.log(`
+ Welcome, {${function() {
+ return { x: 1, y: "why?}"};
+ }()}
+ `.trim());
+
+ waitfor {
+ items .. each.par { |item|
+ get(item);
+ }
+ } and {
+ var lengths = items .. map(i -> i.length);
+ } or {
+ hold(1500);
+ throw new Error("timed out");
+ }
+} // Real Tab.
diff --git a/demo/kitchen-sink/docs/smarty.smarty b/demo/kitchen-sink/docs/smarty.smarty
new file mode 100644
index 00000000..77206724
--- /dev/null
+++ b/demo/kitchen-sink/docs/smarty.smarty
@@ -0,0 +1,7 @@
+{foreach $foo as $bar}
+ {$bar.zag}
+ {$bar.zag2}
+ {$bar.zag3}
+{foreachelse}
+ There were no rows found.
+{/foreach}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/snippets.snippets b/demo/kitchen-sink/docs/snippets.snippets
new file mode 100644
index 00000000..be99f51e
--- /dev/null
+++ b/demo/kitchen-sink/docs/snippets.snippets
@@ -0,0 +1,26 @@
+# Function
+snippet fun
+ function ${1?:function_name}(${2:argument}) {
+ ${3:// body...}
+ }
+# Anonymous Function
+regex /((=)\s*|(:)\s*|(\()|\b)/f/(\))?/
+name f
+ function${M1?: ${1:functionName}}($2) {
+ ${0:$TM_SELECTED_TEXT}
+ }${M2?;}${M3?,}${M4?)}
+# Immediate function
+trigger \(?f\(
+endTrigger \)?
+snippet f(
+ (function(${1}) {
+ ${0:${TM_SELECTED_TEXT:/* code */}}
+ }(${1}));
+# if
+snippet if
+ if (${1:true}) {
+ ${0}
+ }
+
+
+
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/soy_template.soy b/demo/kitchen-sink/docs/soy_template.soy
new file mode 100644
index 00000000..3a9e3436
--- /dev/null
+++ b/demo/kitchen-sink/docs/soy_template.soy
@@ -0,0 +1,46 @@
+/**
+ * Greets a person using "Hello" by default.
+ * @param name The name of the person.
+ * @param? greetingWord Optional greeting word to use instead of "Hello".
+ */
+{template .helloName #eee}
+ {if not $greetingWord}
+ Hello {$name}!
+ {else}
+ {$greetingWord} {$name}!
+ {/if}
+{/template}
+
+/**
+ * Greets a person and optionally a list of other people.
+ * @param name The name of the person.
+ * @param additionalNames The additional names to greet. May be an empty list.
+ */
+{template .helloNames}
+ // Greet the person.
+ {call .helloName data="all" /}
+ // Greet the additional people.
+ {foreach $additionalName in $additionalNames}
+ {call .helloName}
+ {param name: $additionalName /}
+ {/call}
+ {if not isLast($additionalName)}
+ // break after every line except the last
+ {/if}
+ {ifempty}
+ No additional people to greet.
+ {/foreach}
+{/template}
+
+
+{/foreach}
+{if length($items) > 5}
+{msg desc="Says hello to the user."}
+
+
+{namespace ns autoescape="contextual"}
+
+/** Example. */
+{template .example}
+ foo is {$ij.foo}
+{/template}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/space.space b/demo/kitchen-sink/docs/space.space
new file mode 100644
index 00000000..7bd8ab19
--- /dev/null
+++ b/demo/kitchen-sink/docs/space.space
@@ -0,0 +1,56 @@
+query
+ count 10
+ created 2011-06-21T08:10:46Z
+ lang en-US
+ results
+ photo
+ 0
+ farm 6
+ id 5855620975
+ isfamily 0
+ isfriend 0
+ ispublic 1
+ owner 32021554@N04
+ secret f1f5e8515d
+ server 5110
+ title 7087 bandit cat
+ 1
+ farm 4
+ id 5856170534
+ isfamily 0
+ isfriend 0
+ ispublic 1
+ owner 32021554@N04
+ secret ff1efb2a6f
+ server 3217
+ title 6975 rusty cat
+ 2
+ farm 6
+ id 5856172972
+ isfamily 0
+ isfriend 0
+ ispublic 1
+ owner 51249875@N03
+ secret 6c6887347c
+ server 5192
+ title watermarked-cats
+ 3
+ farm 6
+ id 5856168328
+ isfamily 0
+ isfriend 0
+ ispublic 1
+ owner 32021554@N04
+ secret 0c1cfdf64c
+ server 5078
+ title 7020 mandy cat
+ 4
+ farm 3
+ id 5856171774
+ isfamily 0
+ isfriend 0
+ ispublic 1
+ owner 32021554@N04
+ secret 7f5a3180ab
+ server 2696
+ title 7448 bobby cat
diff --git a/demo/kitchen-sink/docs/sqlserver.sqlserver b/demo/kitchen-sink/docs/sqlserver.sqlserver
new file mode 100644
index 00000000..7efd2b7e
--- /dev/null
+++ b/demo/kitchen-sink/docs/sqlserver.sqlserver
@@ -0,0 +1,72 @@
+-- =============================================
+-- Author: Morgan Yarbrough
+-- Create date: 4/27/2015
+-- Description: Test procedure that shows off language features.
+-- Includes non-standard folding with region comments using either
+-- line comments or block comments (both are demonstrated below).
+-- This mode imitates SSMS and it designed to be used with SQL Server theme.
+-- =============================================
+CREATE PROCEDURE dbo.TestProcedure
+
+--#region parameters
+ @vint INT = 1
+ ,@vdate DATE = NULL
+ ,@vdatetime DATETIME = DATEADD(dd, 1, GETDATE())
+ ,@vvarchar VARCHAR(MAX) = ''
+--#endregion
+
+AS
+BEGIN
+
+ /*#region set statements */
+ SET NOCOUNT ON;
+ SET XACT_ABORT ON;
+ SET QUOTED_IDENTIFIER ON;
+ /*#endregion*/
+
+ /**
+ * These comments will produce a fold widget
+ */
+
+ -- folding demonstration
+ SET @vint = CASE
+ WHEN @vdate IS NULL
+ THEN 1
+ ELSE 2
+ END
+
+ -- another folding demonstration
+ IF @vint = 1
+ BEGIN
+ SET @vvarchar = 'one'
+ SET @vint = DATEDIFF(dd, @vdate, @vdatetime)
+ END
+
+ -- this mode handles strings properly
+ DECLARE @sql NVARCHAR(4000) = N'SELECT TOP(1) OrderID
+ FROM Orders
+ WHERE @OrderDate > GETDATE()'
+
+ -- this mode is aware of built in stored procedures
+ EXECUTE sp_executesql @sql
+
+ -- demonstrating some syntax highlighting
+ SELECT Orders.OrderID
+ ,Customers.CompanyName
+ ,DATEFROMPARTS(YEAR(GETDATE()), 1, 1) AS FirstDayOfYear
+ FROM Orders
+ INNER JOIN Customers
+ ON Orders.CustomerID = Customers.CustomerID
+ WHERE CompanyName NOT LIKE '%something'
+ OR CompanyName IS NULL
+ OR CompanyName IN ('bla', 'nothing')
+
+ -- this mode includes snippets
+ -- place your cusor at the end of the line below and trigger auto complete (Ctrl+Space)
+ createpr
+
+ -- SQL Server allows using keywords as object names (not recommended) as long as they are wrapped in brackets
+ DATABASE -- keyword
+ [DATABASE] -- not a keyword
+
+END
diff --git a/demo/kitchen-sink/docs/toml.toml b/demo/kitchen-sink/docs/toml.toml
new file mode 100644
index 00000000..46e5b9d1
--- /dev/null
+++ b/demo/kitchen-sink/docs/toml.toml
@@ -0,0 +1,29 @@
+# This is a TOML document. Boom.
+
+title = "TOML Example"
+
+[owner]
+name = "Tom Preston-Werner"
+organization = "GitHub"
+bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
+dob = 1979-05-27T07:32:00Z # First class dates? Why not?
+
+[database]
+server = "192.168.1.1"
+ports = [ 8001, 8001, 8002 ]
+connection_max = 5000
+enabled = true
+
+[servers]
+
+ # You can indent as you please. Tabs or spaces. TOML don't care.
+ [servers.alpha]
+ ip = "10.0.0.1"
+ dc = "eqdc10"
+
+ [servers.beta]
+ ip = "10.0.0.2"
+ dc = "eqdc10"
+
+[clients]
+data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/twig.twig b/demo/kitchen-sink/docs/twig.twig
new file mode 100644
index 00000000..02214f09
--- /dev/null
+++ b/demo/kitchen-sink/docs/twig.twig
@@ -0,0 +1,30 @@
+
+
+
+ My Webpage
+
+
+
+
+ {% if 1 not in [1, 2, 3] %}
+
+ {# is equivalent to #}
+ {% if not (1 in [1, 2, 3]) %}
+
+ {% autoescape true %}
+ {{ var }}
+ {{ var|raw }} {# var won't be escaped #}
+ {{ var|escape }} {# var won't be doubled-escaped #}
+ {% endautoescape %}
+
+ {{ include('twig.html', sandboxed = true) }}
+
+ {{"string #{with} \" escapes" 'another#one' }}
+ My Webpage
+ {{ a_variable }}
+
+
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/vala.vala b/demo/kitchen-sink/docs/vala.vala
new file mode 100644
index 00000000..f9600286
--- /dev/null
+++ b/demo/kitchen-sink/docs/vala.vala
@@ -0,0 +1,21 @@
+using Gtk;
+
+int main (string[] args) {
+ Gtk.init (ref args);
+ var foo = new MyFoo>();
+
+ var window = new Window();
+ window.title = "Hello, World!";
+ window.border_width = 10;
+ window.window_position = WindowPosition.CENTER;
+ window.set_default_size(350, 70);
+ window.destroy.connect(Gtk.main_quit);
+
+ var label = new Label("Hello, World!");
+
+ window.add(label);
+ window.show_all();
+
+ Gtk.main();
+ return 0;
+}
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/vbscript.vbs b/demo/kitchen-sink/docs/vbscript.vbs
new file mode 100644
index 00000000..ace5c9f9
--- /dev/null
+++ b/demo/kitchen-sink/docs/vbscript.vbs
@@ -0,0 +1,23 @@
+myfilename = "C:\Wikipedia - VBScript - Example - Hello World.txt"
+MakeHelloWorldFile myfilename
+
+Sub MakeHelloWorldFile (FileName)
+'Create a new file in C: drive or overwrite existing file
+ Set FSO = CreateObject("Scripting.FileSystemObject")
+ If FSO.FileExists(FileName) Then
+ Answer = MsgBox ("File " & FileName & " exists ... OK to overwrite?", vbOKCancel)
+ 'If button selected is not OK, then quit now
+ 'vbOK is a language constant
+ If Answer <> vbOK Then Exit Sub
+ Else
+ 'Confirm OK to create
+ Answer = MsgBox ("File " & FileName & " ... OK to create?", vbOKCancel)
+ If Answer <> vbOK Then Exit Sub
+ End If
+ 'Create new file (or replace an existing file)
+ Set FileObject = FSO.CreateTextFile (FileName)
+ FileObject.WriteLine "Time ... " & Now()
+ FileObject.WriteLine "Hello World"
+ FileObject.Close()
+ MsgBox "File " & FileName & " ... updated."
+End Sub
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/velocity.vm b/demo/kitchen-sink/docs/velocity.vm
new file mode 100644
index 00000000..9156020b
--- /dev/null
+++ b/demo/kitchen-sink/docs/velocity.vm
@@ -0,0 +1,44 @@
+#*
+ This is a sample comment block that
+ spans multiple lines.
+*#
+
+#macro ( outputItem $item )
+ ${item}
+#end
+
+## Define the items to iterate
+#set ( $items = [1, 2, 3, 4] )
+
+
+ ## Iterate over the items and output the evens.
+ #foreach ( $item in $items )
+ #if ( $_MathTool.mod($item, 2) == 0 )
+ #outputItem ($item)
+ #end
+ #end
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/verilog.v b/demo/kitchen-sink/docs/verilog.v
new file mode 100644
index 00000000..b1f79265
--- /dev/null
+++ b/demo/kitchen-sink/docs/verilog.v
@@ -0,0 +1,12 @@
+always @(negedge reset or posedge clk) begin
+ if (reset == 0) begin
+ d_out <= 16'h0000;
+ d_out_mem[resetcount] <= d_out;
+ laststoredvalue <= d_out;
+ end else begin
+ d_out <= d_out + 1'b1;
+ end
+end
+
+always @(bufreadaddr)
+ bufreadval = d_out_mem[bufreadaddr];
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/vhdl.vhd b/demo/kitchen-sink/docs/vhdl.vhd
new file mode 100644
index 00000000..662375e8
--- /dev/null
+++ b/demo/kitchen-sink/docs/vhdl.vhd
@@ -0,0 +1,34 @@
+library IEEE
+user IEEE.std_logic_1164.all;
+use IEEE.numeric_std.all;
+
+entity COUNT16 is
+
+ port (
+ cOut :out std_logic_vector(15 downto 0); -- counter output
+ clkEn :in std_logic; -- count enable
+ clk :in std_logic; -- clock input
+ rst :in std_logic -- reset input
+ );
+
+end entity;
+
+architecture count_rtl of COUNT16 is
+ signal count :std_logic_vector (15 downto 0);
+
+begin
+ process (clk, rst) begin
+
+ if(rst = '1') then
+ count <= (others=>'0');
+ elsif(rising_edge(clk)) then
+ if(clkEn = '1') then
+ count <= count + 1;
+ end if;
+ end if;
+
+ end process;
+ cOut <= count;
+
+end architecture;
+
\ No newline at end of file
diff --git a/demo/kitchen-sink/file_drop.js b/demo/kitchen-sink/file_drop.js
new file mode 100644
index 00000000..8b89d5f1
--- /dev/null
+++ b/demo/kitchen-sink/file_drop.js
@@ -0,0 +1,73 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var config = require("ace/config");
+var event = require("ace/lib/event");
+var modelist = require("ace/ext/modelist");
+
+module.exports = function(editor) {
+ event.addListener(editor.container, "dragover", function(e) {
+ var types = e.dataTransfer.types;
+ if (types && Array.prototype.indexOf.call(types, 'Files') !== -1)
+ return event.preventDefault(e);
+ });
+
+ event.addListener(editor.container, "drop", function(e) {
+ var file;
+ try {
+ file = e.dataTransfer.files[0];
+ if (window.FileReader) {
+ var reader = new FileReader();
+ reader.onload = function() {
+ var mode = modelist.getModeForPath(file.name);
+ editor.session.doc.setValue(reader.result);
+ editor.session.setMode(mode.mode);
+ editor.session.modeName = mode.name;
+ };
+ reader.readAsText(file);
+ }
+ return event.preventDefault(e);
+ } catch(err) {
+ return event.stopEvent(e);
+ }
+ });
+};
+
+var Editor = require("ace/editor").Editor;
+config.defineOptions(Editor.prototype, "editor", {
+ loadDroppedFile: {
+ set: function() { module.exports(this); },
+ value: true
+ }
+});
+
+});
\ No newline at end of file
diff --git a/demo/kitchen-sink/inline_editor.js b/demo/kitchen-sink/inline_editor.js
new file mode 100644
index 00000000..6b56887d
--- /dev/null
+++ b/demo/kitchen-sink/inline_editor.js
@@ -0,0 +1,102 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var LineWidgets = require("ace/line_widgets").LineWidgets;
+var Editor = require("ace/editor").Editor;
+var Renderer = require("ace/virtual_renderer").VirtualRenderer;
+var dom = require("ace/lib/dom");
+
+
+require("ace/commands/default_commands").commands.push({
+ name: "openInlineEditor",
+ bindKey: "F3",
+ exec: function(editor) {
+ var split = window.env.split;
+ var s = editor.session;
+ var inlineEditor = new Editor(new Renderer());
+ var splitSession = split.$cloneSession(s);
+
+ var row = editor.getCursorPosition().row;
+ if (editor.session.lineWidgets && editor.session.lineWidgets[row]) {
+ editor.session.lineWidgets[row].destroy();
+ return;
+ }
+
+ var rowCount = 10;
+ var w = {
+ row: row,
+ // rowCount: rowCount,
+ fixedWidth: true,
+ el: dom.createElement("div"),
+ editor: inlineEditor
+ };
+ var el = w.el;
+ el.appendChild(inlineEditor.container);
+
+ if (!editor.session.widgetManager) {
+ editor.session.widgetManager = new LineWidgets(editor.session);
+ editor.session.widgetManager.attach(editor);
+ }
+
+ var h = rowCount*editor.renderer.layerConfig.lineHeight;
+ inlineEditor.container.style.height = h + "px";
+
+ el.style.position = "absolute";
+ el.style.zIndex = "4";
+ el.style.borderTop = "solid blue 2px";
+ el.style.borderBottom = "solid blue 2px";
+
+ inlineEditor.setSession(splitSession);
+ editor.session.widgetManager.addLineWidget(w);
+
+ var kb = {
+ handleKeyboard:function(_,hashId, keyString) {
+ if (hashId === 0 && keyString === "esc") {
+ w.destroy();
+ return true;
+ }
+ }
+ };
+
+ w.destroy = function() {
+ editor.keyBinding.removeKeyboardHandler(kb);
+ s.widgetManager.removeLineWidget(w);
+ };
+
+ editor.keyBinding.addKeyboardHandler(kb);
+ inlineEditor.keyBinding.addKeyboardHandler(kb);
+ inlineEditor.setTheme("ace/theme/solarized_light");
+ }
+});
+});
diff --git a/demo/kitchen-sink/layout.js b/demo/kitchen-sink/layout.js
index 36f85cf3..1332eef3 100644
--- a/demo/kitchen-sink/layout.js
+++ b/demo/kitchen-sink/layout.js
@@ -103,11 +103,6 @@ var Split = function(){
exports.singleLineEditor = function(el) {
var renderer = new Renderer(el);
el.style.overflow = "hidden";
- renderer.scrollBar.element.style.top = "0";
- renderer.scrollBar.element.style.display = "none";
- renderer.scrollBar.orginalWidth = renderer.scrollBar.width;
- renderer.scrollBar.width = 0;
- renderer.content.style.height = "auto";
renderer.screenToTextCoordinates = function(x, y) {
var pos = this.pixelToScreenCoordinates(x, y);
@@ -117,72 +112,15 @@ exports.singleLineEditor = function(el) {
);
};
- renderer.maxLines = 4;
- renderer.$computeLayerConfigWithScroll = renderer.$computeLayerConfig;
- renderer.$computeLayerConfig = function() {
- var config = this.layerConfig;
- var height = this.session.getScreenLength() * this.lineHeight;
- if (config.height != height) {
- var vScroll = height > this.maxLines * this.lineHeight;
-
- if (vScroll != this.$vScroll) {
- if (vScroll) {
- this.scrollBar.element.style.display = "";
- this.scrollBar.width = this.scrollBar.orginalWidth;
- this.container.style.height = config.height + "px";
- height = config.height;
- this.scrollTop = height - this.maxLines * this.lineHeight;
- } else {
- this.scrollBar.element.style.display = "none";
- this.scrollBar.width = 0;
- }
-
- this.onResize();
- this.$vScroll = vScroll;
- }
-
- if (this.$vScroll)
- return renderer.$computeLayerConfigWithScroll();
-
- this.container.style.height = height + "px";
- this.scroller.style.height = height + "px";
- this.content.style.height = height + "px";
- this._emit("resize");
- }
-
- var longestLine = this.$getLongestLine();
- var firstRow = 0;
- var lastRow = this.session.getLength();
-
- this.scrollTop = 0;
- config.width = longestLine;
- config.padding = this.$padding;
- config.firstRow = 0;
- config.firstRowScreen = 0;
- config.lastRow = lastRow;
- config.lineHeight = this.lineHeight;
- config.characterWidth = this.characterWidth;
- config.minHeight = height;
- config.maxHeight = height;
- config.offset = 0;
- config.height = height;
-
- this.$gutterLayer.element.style.marginTop = 0 + "px";
- this.content.style.marginTop = 0 + "px";
- this.content.style.width = longestLine + 2 * this.$padding + "px";
- };
- renderer.isScrollableBy=function(){return false};
+ renderer.$maxLines = 4;
renderer.setStyle("ace_one-line");
var editor = new Editor(renderer);
- new MultiSelect(editor);
editor.session.setUndoManager(new UndoManager());
- editor.setHighlightActiveLine(false);
editor.setShowPrintMargin(false);
editor.renderer.setShowGutter(false);
editor.renderer.setHighlightGutterLine(false);
-
editor.$mouseHandler.$focusWaitTimout = 0;
return editor;
diff --git a/demo/kitchen-sink/logo.png b/demo/kitchen-sink/logo.png
index 58df6062..a722472f 100644
Binary files a/demo/kitchen-sink/logo.png and b/demo/kitchen-sink/logo.png differ
diff --git a/demo/kitchen-sink/modelist.js b/demo/kitchen-sink/modelist.js
deleted file mode 100644
index a9d2e32c..00000000
--- a/demo/kitchen-sink/modelist.js
+++ /dev/null
@@ -1,112 +0,0 @@
-define(function(require, exports, module) {
-"use strict";
-
-/************** modes ***********************/
-var modes = [];
-function getModeFromPath(path) {
- var mode = modesByName.text;
- var fileName = path.split(/[\/\\]/).pop();
- for (var i = 0; i < modes.length; i++) {
- if (modes[i].supportsFile(fileName)) {
- mode = modes[i];
- break;
- }
- }
- return mode;
-}
-
-var Mode = function(name, desc, extensions) {
- this.name = name;
- this.desc = desc;
- this.mode = "ace/mode/" + name;
- if (/\^/.test(extensions)) {
- var re = extensions.replace(/\|(\^)?/g, function(a, b){
- return "$|" + (b ? "^" : "^.*\\.");
- }) + "$";
- } else {
- var re = "^.*\\.(" + extensions + ")$";
- }
-
- this.extRe = new RegExp(re, "gi");
-};
-
-Mode.prototype.supportsFile = function(filename) {
- return filename.match(this.extRe);
-};
-
-var modesByName = {
- abap: ["ABAP" , "abap"],
- asciidoc: ["AsciiDoc" , "asciidoc"],
- c9search: ["C9Search" , "c9search_results"],
- coffee: ["CoffeeScript" , "^Cakefile|coffee|cf"],
- coldfusion: ["ColdFusion" , "cfm"],
- csharp: ["C#" , "cs"],
- css: ["CSS" , "css"],
- dart: ["Dart" , "dart"],
- diff: ["Diff" , "diff|patch"],
- glsl: ["Glsl" , "glsl|frag|vert"],
- golang: ["Go" , "go"],
- groovy: ["Groovy" , "groovy"],
- haxe: ["haXe" , "hx"],
- haml: ["HAML" , "haml"],
- html: ["HTML" , "htm|html|xhtml"],
- c_cpp: ["C/C++" , "c|cc|cpp|cxx|h|hh|hpp"],
- clojure: ["Clojure" , "clj"],
- jade: ["Jade" , "jade"],
- java: ["Java" , "java"],
- jsp: ["JSP" , "jsp"],
- javascript: ["JavaScript" , "js"],
- json: ["JSON" , "json"],
- jsx: ["JSX" , "jsx"],
- latex: ["LaTeX" , "latex|tex|ltx|bib"],
- less: ["LESS" , "less"],
- lisp: ["Lisp" , "lisp|scm|rkt"],
- liquid: ["Liquid" , "liquid"],
- lua: ["Lua" , "lua"],
- luapage: ["LuaPage" , "lp"], // http://keplerproject.github.com/cgilua/manual.html#templates
- lucene: ["Lucene" , "lucene"],
- makefile: ["Makefile" , "^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],
- markdown: ["Markdown" , "md|markdown"],
- objectivec: ["Objective-C" , "m"],
- ocaml: ["OCaml" , "ml|mli"],
- perl: ["Perl" , "pl|pm"],
- pgsql: ["pgSQL" , "pgsql"],
- php: ["PHP" , "php|phtml"],
- powershell: ["Powershell" , "ps1"],
- python: ["Python" , "py"],
- r: ["R" , "r"],
- rdoc: ["RDoc" , "Rd"],
- rhtml: ["RHTML" , "Rhtml"],
- ruby: ["Ruby" , "ru|gemspec|rake|rb"],
- scad: ["OpenSCAD" , "scad"],
- scala: ["Scala" , "scala"],
- scss: ["SCSS" , "scss|sass"],
- sh: ["SH" , "sh|bash|bat"],
- sql: ["SQL" , "sql"],
- stylus: ["Stylus" , "styl|stylus"],
- svg: ["SVG" , "svg"],
- tcl: ["Tcl" , "tcl"],
- tex: ["Tex" , "tex"],
- text: ["Text" , "txt"],
- textile: ["Textile" , "textile"],
- typescript: ["Typescript" , "typescript|ts|str"],
- xml: ["XML" , "xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
- xquery: ["XQuery" , "xq"],
- yaml: ["YAML" , "yaml"]
-};
-
-for (var name in modesByName) {
- var mode = modesByName[name];
- mode = new Mode(name, mode[0], mode[1]);
- modesByName[name] = mode;
- modes.push(mode);
-}
-
-module.exports = {
- getModeFromPath: getModeFromPath,
- modes: modes,
- modesByName: modesByName
-};
-
-});
-
diff --git a/demo/kitchen-sink/package.json b/demo/kitchen-sink/package.json
deleted file mode 100644
index 2345fccd..00000000
--- a/demo/kitchen-sink/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "main": "./demo.js",
- "mappings": {
- "ace": "../.."
- },
- "config": {
- "github.com/sourcemint/bundler-js/0/-meta/config/0": {
- "adapter": "github.com/sourcemint/sdk-requirejs/0",
- "resources": [
- "./icons/*",
- "./logo.png",
- "./styles.css"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/demo/kitchen-sink/require.js b/demo/kitchen-sink/require.js
index 39dbad8e..203843c1 100644
--- a/demo/kitchen-sink/require.js
+++ b/demo/kitchen-sink/require.js
@@ -1,18 +1,18 @@
/** vim: et:ts=4:sw=4:sts=4
- * @license RequireJS 2.1.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ * @license RequireJS 2.1.11+ Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with requirejs.exec()/transpiler plugins that may not be strict.
/*jslint regexp: true, nomen: true, sloppy: true */
-/*global window, navigator, document, importScripts, jQuery, setTimeout, opera */
+/*global window, navigator, document, importScripts, setTimeout, opera */
var requirejs, require, define;
(function (global) {
var req, s, head, baseElement, dataMain, src,
interactiveScript, currentlyAddingScript, mainScript, subPath,
- version = '2.1.1',
+ version = '2.1.11+',
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
jsSuffixRegExp = /\.js$/,
@@ -21,9 +21,8 @@ var requirejs, require, define;
ostring = op.toString,
hasOwn = op.hasOwnProperty,
ap = Array.prototype,
- aps = ap.slice,
apsp = ap.splice,
- isBrowser = !!(typeof window !== 'undefined' && navigator && document),
+ isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
//PS3 indicates loaded and complete, but need to wait for complete
//specifically. Sequence is 'loading', 'loaded', execution,
@@ -81,6 +80,10 @@ var requirejs, require, define;
return hasOwn.call(obj, prop);
}
+ function getOwn(obj, prop) {
+ return hasProp(obj, prop) && obj[prop];
+ }
+
/**
* Cycles over properties in an object and calls a function for each
* property value. If the function returns a truthy value, then the
@@ -89,7 +92,7 @@ var requirejs, require, define;
function eachProp(obj, func) {
var prop;
for (prop in obj) {
- if (obj.hasOwnProperty(prop)) {
+ if (hasProp(obj, prop)) {
if (func(obj[prop], prop)) {
break;
}
@@ -105,7 +108,10 @@ var requirejs, require, define;
if (source) {
eachProp(source, function (value, prop) {
if (force || !hasProp(target, prop)) {
- if (deepStringMixin && typeof value !== 'string') {
+ if (deepStringMixin && typeof value === 'object' && value &&
+ !isArray(value) && !isFunction(value) &&
+ !(value instanceof RegExp)) {
+
if (!target[prop]) {
target[prop] = {};
}
@@ -131,7 +137,11 @@ var requirejs, require, define;
return document.getElementsByTagName('script');
}
- //Allow getting a global that expressed in
+ function defaultOnError(err) {
+ throw err;
+ }
+
+ //Allow getting a global that is expressed in
//dot notation, like 'a.b.c'.
function getGlobal(value) {
if (!value) {
@@ -170,7 +180,7 @@ var requirejs, require, define;
if (typeof requirejs !== 'undefined') {
if (isFunction(requirejs)) {
- //Do not overwrite and existing requirejs instance.
+ //Do not overwrite an existing requirejs instance.
return;
}
cfg = requirejs;
@@ -188,19 +198,27 @@ var requirejs, require, define;
var inCheckLoaded, Module, context, handlers,
checkLoadedTimeoutId,
config = {
+ //Defaults. Do not set a default for map
+ //config to speed up normalize(), which
+ //will run faster if there is no default.
waitSeconds: 7,
baseUrl: './',
paths: {},
+ bundles: {},
pkgs: {},
shim: {},
- map: {},
config: {}
},
registry = {},
+ //registry of just enabled modules, to speed
+ //cycle breaking code when lots of modules
+ //are registered, but not activated.
+ enabledRegistry = {},
undefEvents = {},
defQueue = [],
defined = {},
urlFetched = {},
+ bundlesMap = {},
requireCounter = 1,
unnormalizedCounter = 1;
@@ -214,8 +232,8 @@ var requirejs, require, define;
* @param {Array} ary the array of path segments.
*/
function trimDots(ary) {
- var i, part;
- for (i = 0; ary[i]; i += 1) {
+ var i, part, length = ary.length;
+ for (i = 0; i < length; i++) {
part = ary[i];
if (part === '.') {
ary.splice(i, 1);
@@ -248,7 +266,7 @@ var requirejs, require, define;
* @returns {String} normalized name
*/
function normalize(name, baseName, applyMap) {
- var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment,
+ var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
foundMap, foundI, foundStarMap, starI,
baseParts = baseName && baseName.split('/'),
normalizedBaseParts = baseParts,
@@ -261,29 +279,26 @@ var requirejs, require, define;
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
- if (config.pkgs[baseName]) {
- //If the baseName is a package name, then just treat it as one
- //name to concat the name with.
- normalizedBaseParts = baseParts = [baseName];
- } else {
- //Convert baseName to array, and lop off the last part,
- //so that . matches that 'directory' and not name of the baseName's
- //module. For instance, baseName of 'one/two/three', maps to
- //'one/two/three.js', but we want the directory, 'one/two' for
- //this normalization.
- normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+ //Convert baseName to array, and lop off the last part,
+ //so that . matches that 'directory' and not name of the baseName's
+ //module. For instance, baseName of 'one/two/three', maps to
+ //'one/two/three.js', but we want the directory, 'one/two' for
+ //this normalization.
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+ name = name.split('/');
+ lastIndex = name.length - 1;
+
+ // If wanting node ID compatibility, strip .js from end
+ // of IDs. Have to do this here, and not in nameToUrl
+ // because node allows either .js or non .js to map
+ // to same file.
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
}
- name = normalizedBaseParts.concat(name.split('/'));
+ name = normalizedBaseParts.concat(name);
trimDots(name);
-
- //Some use of packages may use a . path to reference the
- //'main' module name, so normalize for that.
- pkgConfig = config.pkgs[(pkgName = name[0])];
name = name.join('/');
- if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
- name = pkgName;
- }
} else if (name.indexOf('./') === 0) {
// No baseName, so this is ID is resolved relative
// to baseUrl, pull off the leading dot.
@@ -292,41 +307,37 @@ var requirejs, require, define;
}
//Apply map config if available.
- if (applyMap && (baseParts || starMap) && map) {
+ if (applyMap && map && (baseParts || starMap)) {
nameParts = name.split('/');
- for (i = nameParts.length; i > 0; i -= 1) {
+ outerLoop: for (i = nameParts.length; i > 0; i -= 1) {
nameSegment = nameParts.slice(0, i).join('/');
if (baseParts) {
//Find the longest baseName segment match in the config.
//So, do joins on the biggest to smallest lengths of baseParts.
for (j = baseParts.length; j > 0; j -= 1) {
- mapValue = map[baseParts.slice(0, j).join('/')];
+ mapValue = getOwn(map, baseParts.slice(0, j).join('/'));
//baseName segment has config, find if it has one for
//this name.
if (mapValue) {
- mapValue = mapValue[nameSegment];
+ mapValue = getOwn(mapValue, nameSegment);
if (mapValue) {
//Match, update name to the new value.
foundMap = mapValue;
foundI = i;
- break;
+ break outerLoop;
}
}
}
}
- if (foundMap) {
- break;
- }
-
//Check for a star map match, but just hold on to it,
//if there is a shorter segment match later in a matching
//config, then favor over this star map.
- if (!foundStarMap && starMap && starMap[nameSegment]) {
- foundStarMap = starMap[nameSegment];
+ if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
+ foundStarMap = getOwn(starMap, nameSegment);
starI = i;
}
}
@@ -342,7 +353,11 @@ var requirejs, require, define;
}
}
- return name;
+ // If the name points to a package's name, use
+ // the package main instead.
+ pkgMain = getOwn(config.pkgs, name);
+
+ return pkgMain ? pkgMain : name;
}
function removeScript(name) {
@@ -358,14 +373,19 @@ var requirejs, require, define;
}
function hasPathFallback(id) {
- var pathConfig = config.paths[id];
+ var pathConfig = getOwn(config.paths, id);
if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
- removeScript(id);
//Pop off the first array value, since it failed, and
//retry
pathConfig.shift();
context.require.undef(id);
- context.require([id]);
+
+ //Custom require that does not do map translation, since
+ //ID is "absolute", already mapped/resolved.
+ context.makeRequire(null, {
+ skipMap: true
+ })([id]);
+
return true;
}
}
@@ -419,7 +439,7 @@ var requirejs, require, define;
if (prefix) {
prefix = normalize(prefix, parentName, applyMap);
- pluginModule = defined[prefix];
+ pluginModule = getOwn(defined, prefix);
}
//Account for relative paths if there is a base name.
@@ -472,7 +492,7 @@ var requirejs, require, define;
function getModule(depMap) {
var id = depMap.id,
- mod = registry[id];
+ mod = getOwn(registry, id);
if (!mod) {
mod = registry[id] = new context.Module(depMap);
@@ -483,7 +503,7 @@ var requirejs, require, define;
function on(depMap, name, fn) {
var id = depMap.id,
- mod = registry[id];
+ mod = getOwn(registry, id);
if (hasProp(defined, id) &&
(!mod || mod.defineEmitComplete)) {
@@ -491,7 +511,12 @@ var requirejs, require, define;
fn(defined[id]);
}
} else {
- getModule(depMap).on(name, fn);
+ mod = getModule(depMap);
+ if (mod.error && name === 'error') {
+ fn(mod.error);
+ } else {
+ mod.on(name, fn);
+ }
}
}
@@ -503,7 +528,7 @@ var requirejs, require, define;
errback(err);
} else {
each(ids, function (id) {
- var mod = registry[id];
+ var mod = getOwn(registry, id);
if (mod) {
//Set error on module, so it skips timeout checks.
mod.error = err;
@@ -531,7 +556,7 @@ var requirejs, require, define;
//local var ref to defQueue, so cannot just reassign the one
//on context.
apsp.apply(defQueue,
- [defQueue.length - 1, 0].concat(globalDefQueue));
+ [defQueue.length, 0].concat(globalDefQueue));
globalDefQueue = [];
}
}
@@ -548,7 +573,7 @@ var requirejs, require, define;
mod.usingExports = true;
if (mod.map.isDefine) {
if (mod.exports) {
- return mod.exports;
+ return (defined[mod.map.id] = mod.exports);
} else {
return (mod.exports = defined[mod.map.id] = {});
}
@@ -562,9 +587,9 @@ var requirejs, require, define;
id: mod.map.id,
uri: mod.map.url,
config: function () {
- return (config.config && config.config[mod.map.id]) || {};
+ return getOwn(config.config, mod.map.id) || {};
},
- exports: defined[mod.map.id]
+ exports: mod.exports || (mod.exports = {})
});
}
}
@@ -573,6 +598,7 @@ var requirejs, require, define;
function cleanRegistry(id) {
//Clean up machinery used for waiting modules.
delete registry[id];
+ delete enabledRegistry[id];
}
function breakCycle(mod, traced, processed) {
@@ -584,14 +610,14 @@ var requirejs, require, define;
traced[id] = true;
each(mod.depMaps, function (depMap, i) {
var depId = depMap.id,
- dep = registry[depId];
+ dep = getOwn(registry, depId);
//Only force things that have not completed
//being defined, so still in the registry,
//and only if it has not been matched up
//in the module already.
if (dep && !mod.depMatched[i] && !processed[depId]) {
- if (traced[depId]) {
+ if (getOwn(traced, depId)) {
mod.defineDep(i, defined[depId]);
mod.check(); //pass false?
} else {
@@ -604,7 +630,7 @@ var requirejs, require, define;
}
function checkLoaded() {
- var map, modId, err, usingPathFallback,
+ var err, usingPathFallback,
waitInterval = config.waitSeconds * 1000,
//It is possible to disable the wait interval by using waitSeconds of 0.
expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
@@ -621,9 +647,9 @@ var requirejs, require, define;
inCheckLoaded = true;
//Figure out the state of all the modules.
- eachProp(registry, function (mod) {
- map = mod.map;
- modId = map.id;
+ eachProp(enabledRegistry, function (mod) {
+ var map = mod.map,
+ modId = map.id;
//Skip things that are not enabled or in error state.
if (!mod.enabled) {
@@ -691,9 +717,9 @@ var requirejs, require, define;
}
Module = function (map) {
- this.events = undefEvents[map.id] || {};
+ this.events = getOwn(undefEvents, map.id) || {};
this.map = map;
- this.shim = config.shim[map.id];
+ this.shim = getOwn(config.shim, map.id);
this.depExports = [];
this.depMaps = [];
this.depMatched = [];
@@ -802,7 +828,7 @@ var requirejs, require, define;
},
/**
- * Checks is the module is ready to define itself, and if so,
+ * Checks if the module is ready to define itself, and if so,
* define it.
*/
check: function () {
@@ -830,8 +856,13 @@ var requirejs, require, define;
if (this.depCount < 1 && !this.defined) {
if (isFunction(factory)) {
//If there is an error listener, favor passing
- //to that instead of throwing an error.
- if (this.events.error) {
+ //to that instead of throwing an error. However,
+ //only do it for define()'d modules. require
+ //errbacks should not be called for failures in
+ //their callbacks (#699). However if a global
+ //onError is set, use that.
+ if ((this.events.error && this.map.isDefine) ||
+ req.onError !== defaultOnError) {
try {
exports = context.execCb(id, factory, depExports, exports);
} catch (e) {
@@ -841,17 +872,14 @@ var requirejs, require, define;
exports = context.execCb(id, factory, depExports, exports);
}
- if (this.map.isDefine) {
- //If setting exports via 'module' is in play,
- //favor that over return value and exports. After that,
- //favor a non-undefined return value over exports use.
+ // Favor return value over exports. If node/cjs in play,
+ // then will not have a return value anyway. Favor
+ // module.exports assignment over exports object.
+ if (this.map.isDefine && exports === undefined) {
cjsModule = this.module;
- if (cjsModule &&
- cjsModule.exports !== undefined &&
- //Make sure it is not already the exports value
- cjsModule.exports !== this.exports) {
+ if (cjsModule) {
exports = cjsModule.exports;
- } else if (exports === undefined && this.usingExports) {
+ } else if (this.usingExports) {
//exports already set the defined value.
exports = this.exports;
}
@@ -859,8 +887,8 @@ var requirejs, require, define;
if (err) {
err.requireMap = this.map;
- err.requireModules = [this.map.id];
- err.requireType = 'define';
+ err.requireModules = this.map.isDefine ? [this.map.id] : null;
+ err.requireType = this.map.isDefine ? 'define' : 'require';
return onError((this.error = err));
}
@@ -880,7 +908,7 @@ var requirejs, require, define;
}
//Clean up
- delete registry[id];
+ cleanRegistry(id);
this.defined = true;
}
@@ -911,11 +939,11 @@ var requirejs, require, define;
on(pluginMap, 'defined', bind(this, function (plugin) {
var load, normalizedMap, normalizedMod,
+ bundleId = getOwn(bundlesMap, this.map.id),
name = this.map.name,
parentName = this.map.parentMap ? this.map.parentMap.name : null,
localRequire = context.makeRequire(map.parentMap, {
- enableBuildCallback: true,
- skipMap: true
+ enableBuildCallback: true
});
//If current map is not normalized, wait for that
@@ -940,7 +968,7 @@ var requirejs, require, define;
});
}));
- normalizedMod = registry[normalizedMap.id];
+ normalizedMod = getOwn(registry, normalizedMap.id);
if (normalizedMod) {
//Mark this as a dependency for this plugin, so it
//can be traced for cycles.
@@ -957,6 +985,14 @@ var requirejs, require, define;
return;
}
+ //If a paths config, then just load that file instead to
+ //resolve the plugin, as it is built into that paths layer.
+ if (bundleId) {
+ this.map.url = context.nameToUrl(bundleId);
+ this.load();
+ return;
+ }
+
load = bind(this, function (value) {
this.init([], function () { return value; }, null, {
enabled: true
@@ -1005,11 +1041,19 @@ var requirejs, require, define;
//it.
getModule(moduleMap);
+ //Transfer any config to this other module.
+ if (hasProp(config.config, id)) {
+ config.config[moduleName] = config.config[id];
+ }
+
try {
req.exec(text);
} catch (e) {
- throw new Error('fromText eval for ' + moduleName +
- ' failed: ' + e);
+ return onError(makeError('fromtexteval',
+ 'fromText eval for ' + id +
+ ' failed: ' + e,
+ e,
+ [id]));
}
if (hasInteractive) {
@@ -1039,6 +1083,7 @@ var requirejs, require, define;
},
enable: function () {
+ enabledRegistry[this.map.id] = this;
this.enabled = true;
//Set flag mentioning that the module is enabling,
@@ -1060,7 +1105,7 @@ var requirejs, require, define;
!this.skipMap);
this.depMaps[i] = depMap;
- handler = handlers[depMap.id];
+ handler = getOwn(handlers, depMap.id);
if (handler) {
this.depExports[i] = handler(this);
@@ -1075,7 +1120,7 @@ var requirejs, require, define;
}));
if (this.errback) {
- on(depMap, 'error', this.errback);
+ on(depMap, 'error', bind(this, this.errback));
}
}
@@ -1085,7 +1130,7 @@ var requirejs, require, define;
//Skip special modules like 'require', 'exports', 'module'
//Also, don't call enable if it is already enabled,
//important in circular dependency cases.
- if (!handlers[id] && mod && !mod.enabled) {
+ if (!hasProp(handlers, id) && mod && !mod.enabled) {
context.enable(depMap, this);
}
}));
@@ -1093,7 +1138,7 @@ var requirejs, require, define;
//Enable each plugin that is used in
//a dependency
eachProp(this.pluginMaps, bind(this, function (pluginMap) {
- var mod = registry[pluginMap.id];
+ var mod = getOwn(registry, pluginMap.id);
if (mod && !mod.enabled) {
context.enable(pluginMap, this);
}
@@ -1126,7 +1171,10 @@ var requirejs, require, define;
};
function callGetModule(args) {
- getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
+ //Skip modules already defined.
+ if (!hasProp(defined, args[0])) {
+ getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
+ }
}
function removeListener(node, func, name, ieName) {
@@ -1195,6 +1243,7 @@ var requirejs, require, define;
Module: Module,
makeModuleMap: makeModuleMap,
nextTick: req.nextTick,
+ onError: onError,
/**
* Set a configuration for the context.
@@ -1208,28 +1257,38 @@ var requirejs, require, define;
}
}
- //Save off the paths and packages since they require special processing,
+ //Save off the paths since they require special processing,
//they are additive.
- var pkgs = config.pkgs,
- shim = config.shim,
+ var shim = config.shim,
objs = {
paths: true,
+ bundles: true,
config: true,
map: true
};
eachProp(cfg, function (value, prop) {
if (objs[prop]) {
- if (prop === 'map') {
- mixin(config[prop], value, true, true);
- } else {
- mixin(config[prop], value, true);
+ if (!config[prop]) {
+ config[prop] = {};
}
+ mixin(config[prop], value, true, true);
} else {
config[prop] = value;
}
});
+ //Reverse map the bundles
+ if (cfg.bundles) {
+ eachProp(cfg.bundles, function (value, prop) {
+ each(value, function (v) {
+ if (v !== prop) {
+ bundlesMap[v] = prop;
+ }
+ });
+ });
+ }
+
//Merge shim
if (cfg.shim) {
eachProp(cfg.shim, function (value, id) {
@@ -1239,7 +1298,7 @@ var requirejs, require, define;
deps: value
};
}
- if (value.exports && !value.exportsFn) {
+ if ((value.exports || value.init) && !value.exportsFn) {
value.exportsFn = context.makeShimExports(value);
}
shim[id] = value;
@@ -1250,29 +1309,25 @@ var requirejs, require, define;
//Adjust packages if necessary.
if (cfg.packages) {
each(cfg.packages, function (pkgObj) {
- var location;
+ var location, name;
pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
+
+ name = pkgObj.name;
location = pkgObj.location;
+ if (location) {
+ config.paths[name] = pkgObj.location;
+ }
- //Create a brand new object on pkgs, since currentPackages can
- //be passed in again, and config.pkgs is the internal transformed
- //state for all package configs.
- pkgs[pkgObj.name] = {
- name: pkgObj.name,
- location: location || pkgObj.name,
- //Remove leading dot in main, so main paths are normalized,
- //and remove any trailing .js, since different package
- //envs have different conventions: some use a module name,
- //some use a file name.
- main: (pkgObj.main || 'main')
- .replace(currDirRegExp, '')
- .replace(jsSuffixRegExp, '')
- };
+ //Save pointer to main module ID for pkg name.
+ //Remove leading dot in main, so main paths are normalized,
+ //and remove any trailing .js, since different package
+ //envs have different conventions: some use a module name,
+ //some use a file name.
+ config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')
+ .replace(currDirRegExp, '')
+ .replace(jsSuffixRegExp, '');
});
-
- //Done with modifications, assing packages back to context config
- config.pkgs = pkgs;
}
//If there are any "waiting to execute" modules in the registry,
@@ -1301,7 +1356,7 @@ var requirejs, require, define;
if (value.init) {
ret = value.init.apply(global, arguments);
}
- return ret || getGlobal(value.exports);
+ return ret || (value.exports && getGlobal(value.exports));
}
return fn;
},
@@ -1325,14 +1380,14 @@ var requirejs, require, define;
//If require|exports|module are requested, get the
//value for them from the special handlers. Caveat:
//this only works while module is being defined.
- if (relMap && handlers[deps]) {
+ if (relMap && hasProp(handlers, deps)) {
return handlers[deps](registry[relMap.id]);
}
//Synchronous access to one module. If require.get is
//available (as in the Node adapter), prefer that.
if (req.get) {
- return req.get(context, deps, relMap);
+ return req.get(context, deps, relMap, localRequire);
}
//Normalize module name, if it contains . or ..
@@ -1383,16 +1438,20 @@ var requirejs, require, define;
* plain URLs like nameToUrl.
*/
toUrl: function (moduleNamePlusExt) {
- var index = moduleNamePlusExt.lastIndexOf('.'),
- ext = null;
+ var ext,
+ index = moduleNamePlusExt.lastIndexOf('.'),
+ segment = moduleNamePlusExt.split('/')[0],
+ isRelative = segment === '.' || segment === '..';
- if (index !== -1) {
+ //Have a file extension alias, and it is not the
+ //dots from a relative path.
+ if (index !== -1 && (!isRelative || index > 1)) {
ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
}
return context.nameToUrl(normalize(moduleNamePlusExt,
- relMap && relMap.id, true), ext);
+ relMap && relMap.id, true), ext, true);
},
defined: function (id) {
@@ -1413,12 +1472,23 @@ var requirejs, require, define;
takeGlobalQueue();
var map = makeModuleMap(id, relMap, true),
- mod = registry[id];
+ mod = getOwn(registry, id);
+
+ removeScript(id);
delete defined[id];
delete urlFetched[map.url];
delete undefEvents[id];
+ //Clean queued defines too. Go backwards
+ //in array so that the splices do not
+ //mess up the iteration.
+ eachReverse(defQueue, function(args, i) {
+ if(args[0] === id) {
+ defQueue.splice(i, 1);
+ }
+ });
+
if (mod) {
//Hold on to listeners in case the
//module will be attempted to be reloaded
@@ -1437,11 +1507,12 @@ var requirejs, require, define;
/**
* Called to enable a module if it is still in the registry
- * awaiting enablement. parent module is passed in for context,
- * used by the optimizer.
+ * awaiting enablement. A second arg, parent, the parent module,
+ * is passed in for context, when this method is overridden by
+ * the optimizer. Not shown here to keep code compact.
*/
- enable: function (depMap, parent) {
- var mod = registry[depMap.id];
+ enable: function (depMap) {
+ var mod = getOwn(registry, depMap.id);
if (mod) {
getModule(depMap).enable();
}
@@ -1455,7 +1526,7 @@ var requirejs, require, define;
*/
completeLoad: function (moduleName) {
var found, args, mod,
- shim = config.shim[moduleName] || {},
+ shim = getOwn(config.shim, moduleName) || {},
shExports = shim.exports;
takeGlobalQueue();
@@ -1481,9 +1552,9 @@ var requirejs, require, define;
//Do this after the cycle of callGetModule in case the result
//of those calls/init calls changes the registry.
- mod = registry[moduleName];
+ mod = getOwn(registry, moduleName);
- if (!found && !defined[moduleName] && mod && !mod.inited) {
+ if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
if (hasPathFallback(moduleName)) {
return;
@@ -1510,9 +1581,20 @@ var requirejs, require, define;
* it is assumed to have already been normalized. This is an
* internal API, not a public one. Use toUrl for the public API.
*/
- nameToUrl: function (moduleName, ext) {
- var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
- parentPath;
+ nameToUrl: function (moduleName, ext, skipExt) {
+ var paths, syms, i, parentModule, url,
+ parentPath, bundleId,
+ pkgMain = getOwn(config.pkgs, moduleName);
+
+ if (pkgMain) {
+ moduleName = pkgMain;
+ }
+
+ bundleId = getOwn(bundlesMap, moduleName);
+
+ if (bundleId) {
+ return context.nameToUrl(bundleId, ext, skipExt);
+ }
//If a colon is in the URL, it indicates a protocol is used and it is just
//an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
@@ -1526,7 +1608,6 @@ var requirejs, require, define;
} else {
//A module that needs to be converted to a path.
paths = config.paths;
- pkgs = config.pkgs;
syms = moduleName.split('/');
//For each module name segment, see if there is a path
@@ -1534,8 +1615,8 @@ var requirejs, require, define;
//and work up from it.
for (i = syms.length; i > 0; i -= 1) {
parentModule = syms.slice(0, i).join('/');
- pkg = pkgs[parentModule];
- parentPath = paths[parentModule];
+
+ parentPath = getOwn(paths, parentModule);
if (parentPath) {
//If an array, it means there are a few choices,
//Choose the one that is desired
@@ -1544,22 +1625,12 @@ var requirejs, require, define;
}
syms.splice(0, i, parentPath);
break;
- } else if (pkg) {
- //If module name is just the package name, then looking
- //for the main module.
- if (moduleName === pkg.name) {
- pkgPath = pkg.location + '/' + pkg.main;
- } else {
- pkgPath = pkg.location;
- }
- syms.splice(0, i, pkgPath);
- break;
}
}
//Join the path parts together, then figure out if baseUrl is needed.
url = syms.join('/');
- url += (ext || (/\?/.test(url) ? '' : '.js'));
+ url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js'));
url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
}
@@ -1575,7 +1646,7 @@ var requirejs, require, define;
},
/**
- * Executes a module callack function. Broken out as a separate function
+ * Executes a module callback function. Broken out as a separate function
* solely to allow the build system to sequence the files in the built
* layer in the right sequence.
*
@@ -1613,7 +1684,7 @@ var requirejs, require, define;
onScriptError: function (evt) {
var data = getScriptData(evt);
if (!hasPathFallback(data.id)) {
- return onError(makeError('scripterror', 'Script error', evt, [data.id]));
+ return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
}
}
};
@@ -1660,7 +1731,7 @@ var requirejs, require, define;
contextName = config.context;
}
- context = contexts[contextName];
+ context = getOwn(contexts, contextName);
if (!context) {
context = contexts[contextName] = req.s.newContext(contextName);
}
@@ -1742,8 +1813,19 @@ var requirejs, require, define;
* function. Intercept/override it if you want custom error handling.
* @param {Error} err the error object.
*/
- req.onError = function (err) {
- throw err;
+ req.onError = defaultOnError;
+
+ /**
+ * Creates the node for the load command. Only used in browser envs.
+ */
+ req.createNode = function (config, moduleName, url) {
+ var node = config.xhtml ?
+ document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
+ document.createElement('script');
+ node.type = config.scriptType || 'text/javascript';
+ node.charset = 'utf-8';
+ node.async = true;
+ return node;
};
/**
@@ -1760,12 +1842,7 @@ var requirejs, require, define;
node;
if (isBrowser) {
//In the browser so use a script tag
- node = config.xhtml ?
- document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
- document.createElement('script');
- node.type = config.scriptType || 'text/javascript';
- node.charset = 'utf-8';
- node.async = true;
+ node = req.createNode(config, moduleName, url);
node.setAttribute('data-requirecontext', context.contextName);
node.setAttribute('data-requiremodule', moduleName);
@@ -1798,7 +1875,7 @@ var requirejs, require, define;
node.attachEvent('onreadystatechange', context.onScriptLoad);
//It would be great to add an error handler here to catch
//404s in IE9+. However, onreadystatechange will fire before
- //the error handler, so that does not help. If addEvenListener
+ //the error handler, so that does not help. If addEventListener
//is used, then IE will fire error before load, but we cannot
//use that pathway given the connect.microsoft.com issue
//mentioned above about not doing the 'script execute,
@@ -1827,16 +1904,24 @@ var requirejs, require, define;
return node;
} else if (isWebWorker) {
- //In a web worker, use importScripts. This is not a very
- //efficient use of importScripts, importScripts will block until
- //its script is downloaded and evaluated. However, if web workers
- //are in play, the expectation that a build has been done so that
- //only one script needs to be loaded anyway. This may need to be
- //reevaluated if other use cases become common.
- importScripts(url);
+ try {
+ //In a web worker, use importScripts. This is not a very
+ //efficient use of importScripts, importScripts will block until
+ //its script is downloaded and evaluated. However, if web workers
+ //are in play, the expectation that a build has been done so that
+ //only one script needs to be loaded anyway. This may need to be
+ //reevaluated if other use cases become common.
+ importScripts(url);
- //Account for anonymous modules
- context.completeLoad(moduleName);
+ //Account for anonymous modules
+ context.completeLoad(moduleName);
+ } catch (e) {
+ context.onError(makeError('importscripts',
+ 'importScripts failed for ' +
+ moduleName + ' at ' + url,
+ e,
+ [moduleName]));
+ }
}
};
@@ -1854,7 +1939,7 @@ var requirejs, require, define;
}
//Look for a data-main script attribute, which could also adjust the baseUrl.
- if (isBrowser) {
+ if (isBrowser && !cfg.skipDataMain) {
//Figure out baseUrl. Get it from the script tag with require.js in it.
eachReverse(scripts(), function (script) {
//Set the 'head' where we can append children by
@@ -1868,24 +1953,31 @@ var requirejs, require, define;
//baseUrl, if it is not already set.
dataMain = script.getAttribute('data-main');
if (dataMain) {
+ //Preserve dataMain in case it is a path (i.e. contains '?')
+ mainScript = dataMain;
+
//Set final baseUrl if there is not already an explicit one.
if (!cfg.baseUrl) {
//Pull off the directory of data-main for use as the
//baseUrl.
- src = dataMain.split('/');
+ src = mainScript.split('/');
mainScript = src.pop();
subPath = src.length ? src.join('/') + '/' : './';
cfg.baseUrl = subPath;
- dataMain = mainScript;
}
- //Strip off any trailing .js since dataMain is now
+ //Strip off any trailing .js since mainScript is now
//like a module name.
- dataMain = dataMain.replace(jsSuffixRegExp, '');
+ mainScript = mainScript.replace(jsSuffixRegExp, '');
+
+ //If mainScript is still a path, fall back to dataMain
+ if (req.jsExtRegExp.test(mainScript)) {
+ mainScript = dataMain;
+ }
//Put the data-main script in the files to load.
- cfg.deps = cfg.deps ? cfg.deps.concat(dataMain) : [dataMain];
+ cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];
return true;
}
@@ -1913,12 +2005,13 @@ var requirejs, require, define;
//This module may not have dependencies
if (!isArray(deps)) {
callback = deps;
- deps = [];
+ deps = null;
}
//If no name, and callback is a function, then figure out if it a
//CommonJS thing with dependencies.
- if (!deps.length && isFunction(callback)) {
+ if (!deps && isFunction(callback)) {
+ deps = [];
//Remove comments from the callback string,
//look for require calls, and pull them into the dependencies,
//but only if there are function args.
diff --git a/demo/kitchen-sink/statusbar.js b/demo/kitchen-sink/statusbar.js
deleted file mode 100644
index 946ae1d4..00000000
--- a/demo/kitchen-sink/statusbar.js
+++ /dev/null
@@ -1,48 +0,0 @@
-define(function(require, exports, module) {
-"use strict";
-/** simple statusbar **/
-var dom = require("ace/lib/dom");
-var lang = require("ace/lib/lang");
-
-var StatusBar = function(editor, parentNode) {
- this.element = dom.createElement("div");
- this.element.style.cssText = "color: gray; position:absolute; right:0; border-left:1px solid";
- parentNode.appendChild(this.element);
-
- var statusUpdate = lang.deferredCall(function(){
- this.updateStatus(editor)
- }.bind(this));
- editor.on("changeStatus", function() {
- statusUpdate.schedule(50);
- });
- editor.on("changeSelection", function() {
- statusUpdate.schedule(50);
- });
-};
-
-(function(){
- this.updateStatus = function(editor) {
- var status = [];
- function add(str, separator) {
- str && status.push(str, separator || "|");
- }
-
- if (editor.$vimModeHandler)
- add(editor.$vimModeHandler.getStatusText());
- else if (editor.commands.recording)
- add("REC");
-
- var c = editor.selection.lead;
- add(c.row + ":" + c.column, " ");
- if (!editor.selection.isEmpty()) {
- var r = editor.getSelectionRange();
- add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")");
- }
- status.pop();
- this.element.textContent = status.join("");
- };
-}).call(StatusBar.prototype);
-
-exports.StatusBar = StatusBar;
-
-});
\ No newline at end of file
diff --git a/demo/kitchen-sink/styles.css b/demo/kitchen-sink/styles.css
index ec3578aa..3f46f701 100644
--- a/demo/kitchen-sink/styles.css
+++ b/demo/kitchen-sink/styles.css
@@ -16,12 +16,12 @@ body {
color: white;
}
-#logo {
- padding: 15px;
- margin-left: 70px;
+#c9-logo, #ace-logo {
+ padding: 0;
+ border: none;
}
-#editor {
+#editor-container {
position: absolute;
top: 0px;
left: 280px;
@@ -40,4 +40,16 @@ body {
#controls td + td {
text-align: left;
-}
\ No newline at end of file
+}
+.ace_status-indicator {
+ color: gray;
+ position: absolute;
+ right: 0;
+ border-left: 1px solid;
+}
+
+/* .ace_text-input {
+ z-index: 10!important;
+ opacity: 1!important;
+ background: rgb(84, 0, 255)!important;
+}*/
diff --git a/demo/kitchen-sink/token_tooltip.js b/demo/kitchen-sink/token_tooltip.js
index b16966c2..9e607f69 100644
--- a/demo/kitchen-sink/token_tooltip.js
+++ b/demo/kitchen-sink/token_tooltip.js
@@ -32,25 +32,26 @@ define(function(require, exports, module) {
"use strict";
var dom = require("ace/lib/dom");
+var oop = require("ace/lib/oop");
var event = require("ace/lib/event");
var Range = require("ace/range").Range;
+var Tooltip = require("ace/tooltip").Tooltip;
-var tooltipNode;
-
-var TokenTooltip = function(editor) {
+function TokenTooltip (editor) {
if (editor.tokenTooltip)
return;
- editor.tokenTooltip = this;
+ Tooltip.call(this, editor.container);
+ editor.tokenTooltip = this;
this.editor = editor;
-
- editor.tooltip = tooltipNode || this.$init();
this.update = this.update.bind(this);
this.onMouseMove = this.onMouseMove.bind(this);
this.onMouseOut = this.onMouseOut.bind(this);
event.addListener(editor.renderer.scroller, "mousemove", this.onMouseMove);
event.addListener(editor.renderer.content, "mouseout", this.onMouseOut);
-};
+}
+
+oop.inherits(TokenTooltip, Tooltip);
(function(){
this.token = {};
@@ -63,8 +64,8 @@ var TokenTooltip = function(editor) {
if (this.lastT - (r.timeStamp || 0) > 1000) {
r.rect = null;
r.timeStamp = this.lastT;
- this.maxHeight = innerHeight;
- this.maxWidth = innerWidth;
+ this.maxHeight = window.innerHeight;
+ this.maxWidth = window.innerWidth;
}
var canvasPos = r.rect || (r.rect = r.scroller.getBoundingClientRect());
@@ -86,15 +87,10 @@ var TokenTooltip = function(editor) {
}
if (!token) {
session.removeMarker(this.marker);
- tooltipNode.style.display = "none";
- this.isOpen = false;
+ this.hide();
return;
}
- if (!this.isOpen) {
- tooltipNode.style.display = "";
- this.isOpen = true;
- }
-
+
var tokenText = token.type;
if (token.state)
tokenText += "|" + token.state;
@@ -102,15 +98,15 @@ var TokenTooltip = function(editor) {
tokenText += "\n merge";
if (token.stateTransitions)
tokenText += "\n " + token.stateTransitions.join("\n ");
-
+
if (this.tokenText != tokenText) {
- tooltipNode.textContent = tokenText;
- this.tooltipWidth = tooltipNode.offsetWidth;
- this.tooltipHeight = tooltipNode.offsetHeight;
+ this.setText(tokenText);
+ this.width = this.getWidth();
+ this.height = this.getHeight();
this.tokenText = tokenText;
}
-
- this.updateTooltipPosition(this.x, this.y);
+
+ this.show(null, this.x, this.y);
this.token = token;
session.removeMarker(this.marker);
@@ -123,56 +119,34 @@ var TokenTooltip = function(editor) {
this.y = e.clientY;
if (this.isOpen) {
this.lastT = e.timeStamp;
- this.updateTooltipPosition(this.x, this.y);
+ this.setPosition(this.x, this.y);
}
if (!this.$timer)
this.$timer = setTimeout(this.update, 100);
};
-
+
this.onMouseOut = function(e) {
- var t = e && e.relatedTarget;
- var ct = e && e.currentTarget;
- while(t && (t = t.parentNode)) {
- if (t == ct)
- return;
- }
- tooltipNode.style.display = "none";
+ if (e && e.currentTarget.contains(e.relatedTarget))
+ return;
+ this.hide();
this.editor.session.removeMarker(this.marker);
this.$timer = clearTimeout(this.$timer);
- this.isOpen = false;
- };
-
- this.updateTooltipPosition = function(x, y) {
- var st = tooltipNode.style;
- if (x + 10 + this.tooltipWidth > this.maxWidth)
- x = innerWidth - this.tooltipWidth - 10;
- if (y > innerHeight * 0.75 || y + 20 + this.tooltipHeight > this.maxHeight)
- y = y - this.tooltipHeight - 30;
-
- st.left = x + 10 + "px";
- st.top = y + 20 + "px";
};
- this.$init = function() {
- tooltipNode = document.documentElement.appendChild(dom.createElement("div"));
- var st = tooltipNode.style;
- st.position = "fixed";
- st.display = "none";
- st.background = "lightyellow";
- st.borderRadius = "";
- st.border = "1px solid gray";
- st.padding = "1px";
- st.zIndex = 1000;
- st.fontFamily = "monospace";
- st.whiteSpace = "pre-line";
- return tooltipNode;
+ this.setPosition = function(x, y) {
+ if (x + 10 + this.width > this.maxWidth)
+ x = window.innerWidth - this.width - 10;
+ if (y > window.innerHeight * 0.75 || y + 20 + this.height > this.maxHeight)
+ y = y - this.height - 30;
+
+ Tooltip.prototype.setPosition.call(this, x + 10, y + 20);
};
this.destroy = function() {
this.onMouseOut();
event.removeListener(this.editor.renderer.scroller, "mousemove", this.onMouseMove);
event.removeListener(this.editor.renderer.content, "mouseout", this.onMouseOut);
- delete this.editor.tokenTooltip;
+ delete this.editor.tokenTooltip;
};
}).call(TokenTooltip.prototype);
@@ -180,4 +154,3 @@ var TokenTooltip = function(editor) {
exports.TokenTooltip = TokenTooltip;
});
-
diff --git a/demo/kitchen-sink/util.js b/demo/kitchen-sink/util.js
index 13460257..c4b74f38 100644
--- a/demo/kitchen-sink/util.js
+++ b/demo/kitchen-sink/util.js
@@ -40,6 +40,10 @@ var Renderer = require("ace/virtual_renderer").VirtualRenderer;
var Editor = require("ace/editor").Editor;
var MultiSelect = require("ace/multi_select").MultiSelect;
+exports.createEditor = function(el) {
+ return new Editor(new Renderer(el));
+};
+
exports.createSplitEditor = function(el) {
if (typeof(el) == "string")
el = document.getElementById(el);
@@ -54,13 +58,10 @@ exports.createSplitEditor = function(el) {
el.style.position = "relative";
var split = {$container: el};
- split.editor0 = split[0] = new Editor(new Renderer(e0, require("ace/theme/textmate")));
- split.editor1 = split[1] = new Editor(new Renderer(e1, require("ace/theme/textmate")));
+ split.editor0 = split[0] = new Editor(new Renderer(e0));
+ split.editor1 = split[1] = new Editor(new Renderer(e1));
split.splitter = s;
- MultiSelect(split.editor0);
- MultiSelect(split.editor1);
-
s.ratio = 0.5;
split.resize = function resize(){
@@ -104,8 +105,8 @@ exports.createSplitEditor = function(el) {
};
var onResizeInterval = function() {
- s.ratio = (x - rect.left) / rect.width
- split.resize()
+ s.ratio = (x - rect.left) / rect.width;
+ split.resize();
};
event.capture(s, onMouseMove, onResizeEnd);
@@ -167,6 +168,7 @@ exports.bindCheckbox = function(id, callback, noInit) {
};
el.onclick = onCheck;
noInit || onCheck();
+ return el;
};
exports.bindDropdown = function(id, callback, noInit) {
@@ -200,7 +202,7 @@ exports.fillDropdown = function(el, values) {
function elt(tag, attributes, content) {
var el = dom.createElement(tag);
if (typeof content == "string") {
- el.textContent = content;
+ el.appendChild(document.createTextNode(content));
} else if (content) {
content.forEach(function(ch) {
el.appendChild(ch);
@@ -215,8 +217,8 @@ function elt(tag, attributes, content) {
function optgroup(values) {
return values.map(function(item) {
if (typeof item == "string")
- item = {name: item, desc: item};
- return elt("option", {value: item.name}, item.desc);
+ item = {name: item, caption: item};
+ return elt("option", {value: item.value || item.name}, item.caption || item.desc);
});
}
@@ -231,4 +233,3 @@ function dropdown(values) {
});
-
diff --git a/demo/modelist.html b/demo/modelist.html
new file mode 100644
index 00000000..9b4b6039
--- /dev/null
+++ b/demo/modelist.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+ ACE Editor Modelist Demo
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/r.js/build.js b/demo/r.js/build.js
new file mode 100644
index 00000000..028d2234
--- /dev/null
+++ b/demo/r.js/build.js
@@ -0,0 +1,20 @@
+({
+ optimize: "none",
+ preserveLicenseComments: false,
+ name: "node_modules/almond/almond",
+ baseUrl: "../../",
+ paths: {
+ ace : "lib/ace",
+ demo: "demo/kitchen-sink"
+ },
+ packages: [
+ ],
+ include: [
+ "ace/ace"
+ ],
+ exclude: [
+ ],
+ out: "./packed.js",
+ useStrict: true,
+ wrap: false
+})
\ No newline at end of file
diff --git a/demo/r.js/editor.html b/demo/r.js/editor.html
new file mode 100644
index 00000000..9f7a47bf
--- /dev/null
+++ b/demo/r.js/editor.html
@@ -0,0 +1,36 @@
+
+
+
+
+ Editor
+
+
+
+
+
+
+ demo showing Ace usage with r.js:
+
+ install r.js and almond
+ and run `
r.js -o demo/r.js/build.js`
+
+ note that you also need ace/build/src to lazy load modes and themes
+ require("ace/config").set("basePath", "../../build/src");
+ require("ace/config").set("packaged", true);
+
+
+
+
+
+
+
diff --git a/demo/requirejs+build.html b/demo/requirejs+build.html
index 4a494063..72d50dbc 100644
--- a/demo/requirejs+build.html
+++ b/demo/requirejs+build.html
@@ -29,14 +29,20 @@
}
-
diff --git a/demo/scrollable-page.html b/demo/scrollable-page.html
index 308208ed..ef725c4a 100644
--- a/demo/scrollable-page.html
+++ b/demo/scrollable-page.html
@@ -5,19 +5,18 @@
Editor
+
+
+
+
+
+
+
+
+
+
+
{{title}}
+