X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fc25a89ac1e6c5208db24bfc0abc8666b791dc6..3030ae493df7500fd5da7555f141c0c8a690bd8a:/contrib/docs/latex/ogl/sample.tex diff --git a/contrib/docs/latex/ogl/sample.tex b/contrib/docs/latex/ogl/sample.tex index 4e0a437d39..e65837ef35 100644 --- a/contrib/docs/latex/ogl/sample.tex +++ b/contrib/docs/latex/ogl/sample.tex @@ -38,10 +38,7 @@ individually. This event handler class also holds a label string. The DiagramCommand class is the key to implementing Undo/Redo. Each instance of DiagramCommand stores enough information about an operation (create, delete, change colour etc.) to allow -it to carry out (or undo) its command. In DiagramView::OnMenuCommand, when the user initiates the -command, a new DiagramCommand instance is created which is then sent to the document's -command processor (see wxWindows manual for more information about doc/view and command -processing). +it to carry out (or undo) its command. Apart from menu commands, another way commands are initiated is by the user left-clicking on the canvas or right-dragging on a node. MyCanvas::OnLeftClick in view.cpp shows how @@ -63,7 +60,7 @@ copes with this by treating each arc deletion as a separate command, and sending Cut commands recursively, providing an undo path. Undoing such a Cut will only undo one command at a time - not a one to one correspondence with the original command - but it's a reasonable -compromise and preserves Do/Undo whilst keeping our DiagramCommand class +compromise and preserves Do/Undo while keeping our DiagramCommand class simple. \section{Possible enhancements}