Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

412 lines (395 sloc) 27.286 kb
<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ace API - undomanager</title>
<meta name="generator" content="c9-doc-build">
<meta name="description" content="Ace API documentation for the online code editor.">
<meta name="author" content="Garen J. Torikian">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="./resources/csses/bootstrap.min.css">
<link rel="stylesheet" href="./resources/csses/prettify.css">
<link rel="stylesheet" href="./resources/csses/ace_api.css">
<link href="./resources/images/favicon.ico" rel="icon" type="image/x-icon">
<script src="./resources/javascripts/jquery.js"></script>
<script src="./resources/javascripts/clicker.js"></script>
<script src="./resources/javascripts/jquery.collapse.js"></script>
<script src="./resources/javascripts/jquery.cookie.js"></script>
<script src="./resources/javascripts/bootstrap-dropdown.js"></script>
<script src="./resources/javascripts/jquery-scrollspy.js"></script>
<script script src="./resources/javascripts/prettify-extension.js"></script>
</head>
<body>
<div id="nonFooter">
<div id="wrapper">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container"><span class="brand"></span>
<ul class="nav topLinks">
<li id="ace_site"><a href="../index.html">Ace</a></li>
<li id="ace_api" class="active"><a href="index.html">Ace API Reference</a></li>
</ul>
<form id="searchbox" action="" class="navbar-search pull-right">
<input name="query" type="text" placeholder="Search the API" title="Search across all the documentation" class="search-query span3">
</form>
</div>
</div>
</div>
<header class="filler"></header>
<div class="container">
<div class="content">
<div class="row centerpiece">
<div class="span3 offset6 sidebarContainer">
<div id="sidebar">
<div id="well">
<h3>Ace Reference</h3>
<div class="swirl_divider"> </div>
<ul class="menu">
<li>
<div class="menu-item"><a href="ace.html" class="menuLink namespace">Ace</a></div>
</li>
<li>
<div class="menu-item"><a href="anchor.html" class="menuLink namespace">Anchor</a></div>
</li>
<li>
<div class="menu-item"><a href="background_tokenizer.html" class="menuLink namespace">BackgroundTokenizer </a></div>
</li>
<li>
<div class="menu-item"><a href="document.html" class="menuLink namespace">Document </a></div>
</li>
<li>
<div class="menu-item"><a href="edit_session.html" class="menuLink namespace">EditSession </a></div>
</li>
<li>
<div class="menu-item"><a href="editor.html" class="menuLink namespace">Editor</a></div>
</li>
<li>
<div class="menu-item"><a href="range.html" class="menuLink namespace">Range</a></div>
</li>
<li>
<div class="menu-item"><a href="scrollbar.html" class="menuLink namespace">Scrollbar</a></div>
</li>
<li>
<div class="menu-item"><a href="search.html" class="menuLink namespace">Search </a></div>
</li>
<li>
<div class="menu-item"><a href="selection.html" class="menuLink namespace">Selection </a></div>
</li>
<li>
<div class="menu-item"><a href="token_iterator.html" class="menuLink namespace">TokenIterator</a></div>
</li>
<li>
<div class="menu-item"><a href="tokenizer.html" class="menuLink namespace">Tokenizer</a></div>
</li>
<li>
<div class="menu-item"><a href="undomanager.html" class="menuLink namespace">UndoManager</a></div>
</li>
<li>
<div class="menu-item"><a href="virtual_renderer.html" class="menuLink namespace">VirtualRenderer</a></div>
</li>
</ul>
</div>
</div>
</div>
<div class="span9 mainContent">
<div id="documentation">
<div class="classContent">
<div class="membersBackground"></div>
<div class=" members pos0">
<div class=" membersContent pos0">
<h1 class="memberHeader"><span class="name">UndoManager<span class="editInC9"><a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%2Face.git' title='Edit in Cloud9 IDE'>[edit]</a></span></span>
</h1>
<ul data-tabs="tabs" class="nav tabs pos0">
<li data-dropdown="dropdown" class="dropdown">
</li>
<li data-dropdown="dropdown" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle"><span>Constructors (1)</span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li data-id="new UndoManager" class="memberLink"><a href="#UndoManager.new" class="" title="new UndoManager (constructor)" data-id="new UndoManager">new</a>
</li>
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle"><span>Functions (6)</span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li data-id="UndoManager.execute" class="memberLink"><a href="#UndoManager.execute" class="" title="UndoManager.execute (class method)" data-id="UndoManager.execute">execute</a>
</li>
<li data-id="UndoManager.hasRedo" class="memberLink"><a href="#UndoManager.hasRedo" class="" title="UndoManager.hasRedo (class method)" data-id="UndoManager.hasRedo">hasRedo</a>
</li>
<li data-id="UndoManager.hasUndo" class="memberLink"><a href="#UndoManager.hasUndo" class="" title="UndoManager.hasUndo (class method)" data-id="UndoManager.hasUndo">hasUndo</a>
</li>
<li data-id="UndoManager.redo" class="memberLink"><a href="#UndoManager.redo" class="" title="UndoManager.redo (class method)" data-id="UndoManager.redo">redo</a>
</li>
<li data-id="UndoManager.reset" class="memberLink"><a href="#UndoManager.reset" class="" title="UndoManager.reset (class method)" data-id="UndoManager.reset">reset</a>
</li>
<li data-id="UndoManager.undo" class="memberLink"><a href="#UndoManager.undo" class="" title="UndoManager.undo (class method)" data-id="UndoManager.undo">undo</a>
</li>
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown">
</li>
<li data-dropdown="dropdown" class="dropdown">
</li>
<li data-dropdown="dropdown" class="dropdown">
</li>
<li data-dropdown="dropdown" class="dropdown">
</li>
</ul>
</div>
</div>
<article id="UndoManager" data-title="UndoManager (class)" class="article">
<div class="section description">
<div class="memberContent"><p>This object maintains the undo stack for an <a href="edit_session.html#EditSession" class="link-short" title="EditSession (class)" data-id="EditSession"><code>EditSession</code></a>.</p>
</div>
</div>
</article>
<h3 class="sectionHeader">Constructors</h3>
<article id="UndoManager.new" data-title="new UndoManager (constructor)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span class="constructorIdentifier">new </span><span id="new UndoManager" class="member-name methodClicker">UndoManager</span>(<span class="sigArgList"></span>)</li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_new UndoManager" class="ellipsis_description"><p>Resets the current undo state and creates a new <code>UndoManager</code>. ...</p>
</div>
<div id="short_new UndoManager" class="short_description hiddenSpan"><p>Resets the current undo state and creates a new <code>UndoManager</code>.</p>
</div>
<h3 id="new UndoManager" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
</div>
</div>
</div>
</div>
</article>
<h3 class="sectionHeader">Methods</h3>
<article id="UndoManager.execute" data-title="UndoManager.execute (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="UndoManager.execute" class="member-name methodClicker"><span class="sigClassName">UndoManager.</span><span class="sigMemberName">execute</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Object.html" class="argument methodClicker" title="Object" data-id="Object">Object</a> options</span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><span class="returnType " title="UndoManager.execute (class method)">Void</span></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_UndoManager.execute" class="ellipsis_description"><p>Provides a means for implementing your own undo manager. <code>options</code> has one property, <code>args</code>, an <a href="http://www.nodemanual.org/latest/js_doc/Array.html" class="link-short" title="[object Object]" data-id="[object Object]">undefined</a>, w...</p>
</div>
<div id="short_UndoManager.execute" class="short_description hiddenSpan"><p>Provides a means for implementing your own undo manager. <code>options</code> has one property, <code>args</code>, an <a href="http://www.nodemanual.org/latest/js_doc/Array.html" class="link-short" title="[object Object]" data-id="[object Object]">undefined</a>, with two elements:
<em> <code>args[0]</code> is an array of deltas
</em> <code>args[1]</code> is the document to associate with</p>
</div>
<h3 id="UndoManager.execute" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">options</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Object.html" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription ">Required. Contains additional properties</td></tr></table>
</div>
</div>
</div>
</div>
</article>
<article id="UndoManager.hasRedo" data-title="UndoManager.hasRedo (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="UndoManager.hasRedo" class="member-name methodClicker"><span class="sigClassName">UndoManager.</span><span class="sigMemberName">hasRedo</span></span>(<span class="sigArgList"></span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Boolean.html" class="returnType " title="Boolean" data-id="Boolean">Boolean</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_UndoManager.hasRedo" class="ellipsis_description"><p>Returns <code>true</code> if there are redo operations left to perform. ...</p>
</div>
<div id="short_UndoManager.hasRedo" class="short_description hiddenSpan"><p>Returns <code>true</code> if there are redo operations left to perform.</p>
</div>
<h3 id="UndoManager.hasRedo" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
</div>
</div>
</div>
</div>
</article>
<article id="UndoManager.hasUndo" data-title="UndoManager.hasUndo (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="UndoManager.hasUndo" class="member-name methodClicker"><span class="sigClassName">UndoManager.</span><span class="sigMemberName">hasUndo</span></span>(<span class="sigArgList"></span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Boolean.html" class="returnType " title="Boolean" data-id="Boolean">Boolean</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_UndoManager.hasUndo" class="ellipsis_description"><p>Returns <code>true</code> if there are undo operations left to perform. ...</p>
</div>
<div id="short_UndoManager.hasUndo" class="short_description hiddenSpan"><p>Returns <code>true</code> if there are undo operations left to perform.</p>
</div>
<h3 id="UndoManager.hasUndo" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
</div>
</div>
</div>
</div>
</article>
<article id="UndoManager.redo" data-title="UndoManager.redo (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="UndoManager.redo" class="member-name methodClicker"><span class="sigClassName">UndoManager.</span><span class="sigMemberName">redo</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Boolean.html" class="argument methodClicker" title="Boolean" data-id="Boolean">Boolean</a> dontSelect</span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><span class="returnType " title="UndoManager.redo (class method)">Void</span></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_UndoManager.redo" class="ellipsis_description"><p>Perform a redo operation on the document, reimplementing the last change.</p>
</div>
<div id="short_UndoManager.redo" class="short_description hiddenSpan"><p>Perform a redo operation on the document, reimplementing the last change.</p>
</div>
<h3 id="UndoManager.redo" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dontSelect</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Boolean.html" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription ">Required. If <code>true</code>, doesn&#39;t select the range of where the change occured</td></tr></table>
</div>
</div>
</div>
</div>
</article>
<article id="UndoManager.reset" data-title="UndoManager.reset (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="UndoManager.reset" class="member-name methodClicker"><span class="sigClassName">UndoManager.</span><span class="sigMemberName">reset</span></span>(<span class="sigArgList"></span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><span class="returnType " title="UndoManager.reset (class method)">Void</span></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_UndoManager.reset" class="ellipsis_description"><p>Destroys the stack of undo and redo redo operations. ...</p>
</div>
<div id="short_UndoManager.reset" class="short_description hiddenSpan"><p>Destroys the stack of undo and redo redo operations.</p>
</div>
<h3 id="UndoManager.reset" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
</div>
</div>
</div>
</div>
</article>
<article id="UndoManager.undo" data-title="UndoManager.undo (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="UndoManager.undo" class="member-name methodClicker"><span class="sigClassName">UndoManager.</span><span class="sigMemberName">undo</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Boolean.html" class="argument methodClicker" title="Boolean" data-id="Boolean">Boolean</a> dontSelect</span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="range.html#Range" class="returnType " title="Range (class)" data-id="Range">Range</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_UndoManager.undo" class="ellipsis_description"><p>[Perform an undo operation on the document, reverting the last change. Returns the range of the undo.]{: #UndoManage...</p>
</div>
<div id="short_UndoManager.undo" class="short_description hiddenSpan"><p>Perform an undo operation on the document, reverting the last change. Returns the range of the undo.</p>
</div>
<h3 id="UndoManager.undo" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dontSelect</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Boolean.html" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription ">Required. If <code>true</code>, doesn&#39;t select the range of where the change occured</td></tr></table>
</div>
</div>
</div>
</div>
</article>
</div>
</div>
<div id="disqus_thread"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer id="footer">
<div class="container">
<div class="footer-text pull-right">
<p><a href="http://www.c9.io">About Cloud9</a> | Ace & Cloud9 IDE are &copy; <a href="http://ajax.org">Ajax.org</a> 2012</p>
</div>
</div>
</footer>
<!-- scripts concatenated and minified via ant build script--><script defer src="./resources/javascripts/plugins.js"></script>
<script defer src="./resources/javascripts/prettify.js"></script>
<script defer src="./resources/javascripts/prettify-extension.js"></script>
<script defer src="./resources/javascripts/ux.js"></script>
<script defer src="./resources/javascripts/disqus-ext.js"></script>
<script defer src="./resources/javascripts/ga.js"></script>
<!-- end scripts--><!--[if lt IE 7]>
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
<script>
window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})
</script><![endif]-->
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.