readme.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <html>
  2. <header>
  3. <title>DRAKON Editor v.1.31 Readme</title>
  4. <style>
  5. body { width: 800px; }
  6. </style>
  7. </header>
  8. <body>
  9. <h1><img src="images/drakon_editor.gif" alt="Logo"/>DRAKON Editor 1.31</h1>
  10. <p><b>DRAKON helps people understand programs.</b></p>
  11. <p>Some tutorials can be found in the <b>examples</b> folder. Open the .drn files with the DRAKON Editor.</p>
  12. <h2>FAQ</h2>
  13. <p><b>Q: Where is the "Save" button?</b></p>
  14. <p>A: DRAKON Editor does not have one. It saves your changes as you do them.</p>
  15. <p><b>Q: How can I scroll the main window?</b></p>
  16. <p>A: There are several ways to do it: 1. Drag with the mouse wheel pressed. 2. Scroll your mouse wheel (with and without the Shift key pressed). 3. Drag with both mouse keys pressed.</p>
  17. <p><b>Q: Does DRAKON Editor use a proprietary binary file format?</b></p>
  18. <p>A: No. DRAKON Editor keeps your data in an Sqlite database file. There are free viewers that can browse and edit such files. See <b>docs/drn_file_format.html</b> for details.</p>
  19. <p><b>Q: Can I write real programs with DRAKON Editor?</b></p>
  20. <p>A: Yes! Currently, Java, Processing.org, C#, Plain C, C++, Python, Tcl, Javascript, Lua, Erlang, Verilog and AutoHotkey are supported. Tutorials can be found in the <b>examples/language</b> folders.</p>
  21. <p><b>Q: Export to PNG does not work and hangs. I hate you!</b></p>
  22. <p>A: Export to PNG works, but on Windows it is ungodly slow. We apologize. Please do not minimize or place any other windows on top of the DRAKON Editor in the process.</p>
  23. <p><b>Q: How to change the fonts?</b></p>
  24. <p>A: To change the screen font, go to <b>File/File properties...</b> and choose the <b>Canvas font</b>.</p>
  25. <p>To change the font in the exported PDF:</p>
  26. <ol>
  27. <li>Put a .ttf file to the <b>fonts</b> folder.</li>
  28. <li>Go to <b>File/File properties...</b> and choose the <b>PDF font</b>.</li>
  29. </ol>
  30. <h2>Installation</h2>
  31. <p>DRAKON Editor does not require any installation besides unzipping. It requires, however, <i>tcl</i> to be present on your computer:</p>
  32. <ul>
  33. <li><b>Windows</b> and <b>Mac OS</b>: download and install ActiveTcl 8.6: <a href="http://www.activestate.com/activetcl/downloads">http://www.activestate.com/activetcl/downloads</a></li>
  34. <li><b>Linux</b>: install the following packages: tcl8.6, tk8.6, tcllib, libsqlite3-tcl, libtk-img.
  35. </ul>
  36. <h2>Running DRAKON Editor</h2>
  37. <p><b>Windows</b>: double click on the <i>drakon_editor.tcl</i> file.</p>
  38. <p><b>Linux</b> and <b>Mac OS</b>: run the following command from the terminal:</p>
  39. <pre> ./drakon_editor.tcl</pre>
  40. <p>or, to open a specific file:</p>
  41. <pre> ./drakon_editor.tcl [file name]</pre>
  42. <h2>Shortcuts</h2>
  43. <p>Mac users use <b>Command</b> instead of <b>Control</b> for the following shortcuts.</p>
  44. <table cellpadding="3" border="1">
  45. <tr>
  46. <td><b>Action<b></td><td><b>Shortcut</b></td>
  47. </tr><tr>
  48. <td colspan="2"><center>Canvas</center></td>
  49. </tr><tr>
  50. <td>Scroll/pan</td><td>Move mouse with the wheel or middle button pressed.</td>
  51. </tr><tr>
  52. <td>Scroll/pan up and down</td><td>Mouse wheel.</td>
  53. </tr><tr>
  54. <td>Scroll/pan left and right</td><td>Shift + Mouse wheel.</td>
  55. </tr><tr>
  56. <td>Zoom in and out</td><td>Control + Mouse wheel.</td>
  57. </tr><tr>
  58. <td colspan="2"><center>Editing</center></td>
  59. </tr><tr>
  60. <td><em>Smart</em> mode</td><td>Drag items with the mouse when the Shift key is pressed.</td>
  61. </tr><tr>
  62. <td>Edit text</td><td>Double click on text.</td>
  63. </tr><tr>
  64. <td>Select all</td><td>Control + A</td>
  65. </tr><tr>
  66. <td>Delete selected objects</td><td>Del or Backspace</td>
  67. </tr><tr>
  68. <td>Copy</td><td>Control + C</td>
  69. </tr><tr>
  70. <td>Cut</td><td>Control + X</td>
  71. </tr><tr>
  72. <td>Paste</td><td>Control + V</td>
  73. </tr><tr>
  74. <td>Undo</td><td>Control + Z</td>
  75. </tr><tr>
  76. <td>Redo</td><td>Control + Y</td>
  77. </tr><tr>
  78. <td>Edit diagram description</td><td>Control + D</td>
  79. </tr><tr>
  80. <td colspan="2"><center>Search</center></td>
  81. </tr><tr>
  82. <td>Show/hide search panel</td><td>Control + F</td>
  83. </tr><tr>
  84. <td>Jump to diagram</td><td>Control + G</td>
  85. </tr><tr>
  86. <td>Jump to item</td><td>Control + I</td>
  87. </tr><tr>
  88. <td colspan="2"><center>Diagram</center></td>
  89. </tr><tr>
  90. <td>Verify diagram</td><td>Control + R</td>
  91. </tr><tr>
  92. <td>Generate code</td><td>Control + B</td>
  93. </tr><tr>
  94. <td colspan="2"><center>Adding items</center></td>
  95. </tr><tr>
  96. <td>Action item</td><td>A</td>
  97. </tr><tr>
  98. <td>If item</td><td>I</td>
  99. </tr><tr>
  100. <td>Horizontal line</td><td>H</td>
  101. </tr><tr>
  102. <td>Vertical line</td><td>V</td>
  103. </tr><tr>
  104. <td>Loop start item</td><td>L</td>
  105. </tr><tr>
  106. <td>Loop end item</td><td>E</td>
  107. </tr><tr>
  108. <td>Select item</td><td>S</td>
  109. </tr><tr>
  110. <td>Case item</td><td>C</td>
  111. </tr><tr>
  112. <td>Branch item</td><td>B</td>
  113. </tr><tr>
  114. <td>Address item</td><td>D</td>
  115. </tr><tr>
  116. <td>Insertion item</td><td>N</td>
  117. </tr><tr>
  118. <td>Tidy up</td><td>Control + T</td>
  119. </tr><tr>
  120. <td>Edit text in the selected icon</td><td>F2</td>
  121. </tr><tr>
  122. <td>Edit secondary text</td><td>F3</td>
  123. </tr><tr>
  124. <td>Call hierarchy</td><td>Control + E</td>
  125. </tr>
  126. </table>
  127. <h2>drakon_gen.tcl</h2>
  128. <p>drakon_gen.tcl is a command-line utility that generates code from a .drn file.</p>
  129. <p>Usage example:</p>
  130. <pre>./drakon_gen.tcl -in examples/Python/python_demo.drn</pre>
  131. <p>This one will generate a file called python_demo.py in examples/Python.</p>
  132. <pre>./drakon_gen.tcl -in examples/Python/python_demo.drn -out .</pre>
  133. <p>This one will generate a file called python_demo.py and put it in the current folder.</p>
  134. <p>In order for code generation to work, the .drn files must have a programming language selected in its properties.</p>
  135. <p>To choose the language for the .drn file, open it in DRAKON Editor, go to File / File properties...</p>
  136. <h2>Wish a feature? Report a bug?</h2>
  137. <p>Your feedback is greatly appreciated. Please write to<br/>
  138. <b>drakon.editor@gmail.com</b></p>
  139. <h2>What's new in version 1.31</h2>
  140. <ul>
  141. <li>State machine methods can now return values.</li>
  142. <li>State machines were added to the Python code generator.</li>
  143. <li>C# state machines were rewritten and improved.</li>
  144. </ul>
  145. <h2>What's new in version 1.30</h2>
  146. <ul>
  147. <li>Removed "this" keyword from state machine methods in JavaScript. No need to have a machine's reference to call its methods as delegates.</li>
  148. <li>Added "state machine" to the available diagram types in the Create diagram dialog.</li>
  149. </ul>
  150. <h2>What's new in version 1.29</h2>
  151. <ul>
  152. <li>Cleaner state machines for Lua and JavaScript.</li>
  153. <li>The encoding of output files is UTF-8.</li>
  154. <li>Language selection from menu: File &gt; Global settings &gt; Language</li>
  155. <li>UTOPIST tasks in JavaScript code generator.</li>
  156. <li>Added a generator for <a href="https://github.com/noolsjs/nools">nools rules engine</a>.</li>
  157. <li>DrakonLua and DrakonJs, subsets of Lua and JavaScript with a cleaner and unified syntax.</li>
  158. <li>Fixed bug with insertion of parallel paths.</li>
  159. <li>Added -folder -ext options to drakon_gen.</li>
  160. </ul>
  161. <h2>What's new in version 1.27</h2>
  162. <ul>
  163. <li><a href="https://golang.org/">Go language</a> support.</li>
  164. <li>Nice <strong>foreach</strong> code generation for Java, C#, Python, Tcl, Lua, D.</li>
  165. <li>Better boolean short-circuit detection.</li>
  166. <li>C/C++ code generator does not generate redundant <strong>return</strong> statements anymore.</li>
  167. <li>Erlang generator does not emit <strong>throw</strong> when no default clause is present in a <strong>select</strong> statement.</li>
  168. <li>JavaScript code generator: different <strong>foreach</strong> for objects and arrays.</li>
  169. <li>Stricter handling of <strong>select</strong> keyword inside <strong>select</strong> icon.</li>
  170. </ul>
  171. <h2>What's new in version 1.26</h2>
  172. <ul>
  173. <li>Massive improvements to the Erlang code generator: <strong>receive</strong> statement, <strong>select/case</strong> macroicon produces "case X of" statement, visual supervision tree.</li>
  174. <li>A bug fixed in the JavaScript code generator.</li>
  175. <li>Added a warning before export to PNG.</li>
  176. </ul>
  177. <h2>What's new in version 1.25</h2>
  178. <ul>
  179. <li>Syntax highlighting.</li>
  180. <li>Improvements to the C# state machine generator.</li>
  181. </ul>
  182. <h2>What's new in version 1.24</h2>
  183. <ul>
  184. <li>Setting zoom for all diagrams.</li>
  185. <li>Bug fixes, including a problem with Mac shortcuts, AutoHotkey etc.</li>
  186. </ul>
  187. <h2>What's new in version 1.23</h2>
  188. <ul>
  189. <li>Code generation for the AutoHotkey language.</li>
  190. <li>Code generation for the Verilog language.</li>
  191. <li>Code generation for state machines (finite automata) in Lua and JavaScript.</li>
  192. <li>Improvements in the JavaScript generator: better iteration, support for method functions and "closure" namespaces.</li>
  193. <li>State machines and ERIL support in the code generator for the C language.</li>
  194. <li>More flexibility added to "Select-Case" icons. It is now possible to put any condition in a "Case" icon, not just a value. </li>
  195. <li>Other small improvements in code generation for several languages.</li>
  196. <li>Bug fixes.</li>
  197. <li>Switch to Tcl/Tk 8.6. It's a major change in system requirements. DRAKON Editor now needs Tcl/Tk 8.6 to run. Tcl/Tk 8.5 is not supported any more.</li>
  198. </ul>
  199. <h2>What's new in version 1.22</h2>
  200. <ul>
  201. <li>A bug fix related to inline comment icons in Erlang diagrams.</li>
  202. <li>The content of the "if" icon in Erlang is not limited to the guard syntax any more.</li>
  203. <li>State-machine support for Erlang: gen_fsm-based and standalone state-machines.</li>
  204. <li>D language support.</li>
  205. </ul>
  206. <h2>What's new in version 1.21</h2>
  207. <ul>
  208. <li>State-machine (finite automata) support for C# code generation.</li>
  209. <li>ERIL language support for C# and Tcl code generation. (Entity-relationship and inheritance diagrams.)</li>
  210. <li>Hyperlinks in text. (Available through context meny, "Links".)</li>
  211. <li>Minor bug fixes.</li>
  212. </ul>
  213. <h2>What's new in version 1.20</h2>
  214. <ul>
  215. <li>Bug fixes.</li>
  216. <li>Call hierarchy.</li>
  217. <li>Added support for Processing.org programming language.</li>
  218. <li>Go to branch within a silhouette diagram.</li>
  219. <li>The color of icons can be changed.</li>
  220. </ul>
  221. <h2>What's new in version 1.19</h2>
  222. <ul>
  223. <li>Automatic width for "If" icons has been reduced. Icons take less diagram space.</li>
  224. <li>Modal dialogs improved on Linux.</li>
  225. </ul>
  226. <h2>What's new in version 1.18</h2>
  227. <ul>
  228. <li>DRAKON Editor now supports the full set of DRAKON icons.</li>
  229. <li>Uniform spacing rules in the <b>advanced</b> editing mode (with Shift pressed).</li>
  230. <li>Entity-Relationship diagram type added.</li>
  231. <li>Canvas can be scrolled with mouse drag when both mouse buttons are pressed.</li>
  232. <li>Added more shortcuts: F2 edits primary text, F3 edits secondary text. </li>
  233. </ul>
  234. <h2>What's new in version 1.17</h2>
  235. <ul>
  236. <li>Code generation: warnings removed for C# and Lua compilers.</li>
  237. <li>User can now define custome text instead of "YES", "NO" and "End".</li>
  238. <li>Color themes can be changed from Global settings.</li>
  239. <li>Icon widths get adjusted automatically for the whole skewer after the text is changed for a single icon.</li>
  240. <li>Note comments got a better visual style.</li>
  241. <li>Loop end icons can have text.</li>
  242. </ul>
  243. <h2>What's new in version 1.15</h2>
  244. <ul>
  245. <li>Fixed a bug in the code generator.</li>
  246. <li>Some metaprogramming features for the C language.</li>
  247. </ul>
  248. <h2>What's new in version 1.14</h2>
  249. <ul>
  250. <li>Fixed Lua source code generator.</li>
  251. <li>Double mouse wheel click invokes View / See All.</li>
  252. </ul>
  253. <h2>What's new in version 1.13</h2>
  254. <ul>
  255. <li>Code generation for Lua language.</li>
  256. </ul>
  257. <h2>What's new in version 1.12</h2>
  258. <ul>
  259. <li>Open/Save file dialogs for .drn files and for export remember the last directory.</li>
  260. <li>Inserting "if", "branch", "select" and "loop" items made easier.</li>
  261. <li>Ctrl-X, Ctrl-C, Ctrl-V, Ctrl-A shortcuts fixed for non-English keyboard layouts.</li>
  262. <li>Added menu items: Edit/Tidy up, Edit/Tidy up all diagrams. The shortcut for Tidy up is Ctrl-T.</li>
  263. <li>Colors config in scripts/colors.tcl.</li>
  264. </ul>
  265. <h2>What's new in version 1.11</h2>
  266. <ul>
  267. <li>Text in <b>Action</b> and <b>Insertion</b> icons is now left-aligned.</li>
  268. <li>Diagrams now look neat and tidy. The <b>Edit/Adjust icon sizes</b> menu command sets equal width to the icons on the same vertical.</li>
  269. <li>Fixed the bug about extracting class names in C++.</li>
  270. <li>Qt support: now you can explicitly mark the diagram as a signal or a slot (see QtC++ folder).</li>
  271. </ul>
  272. <h2>What's new in version 1.10</h2>
  273. <ul>
  274. <li>A few minor usability improvements.</li>
  275. <li>Javascript language support.</li>
  276. <li>Erlang language support.</li>
  277. </ul>
  278. <h2>What's new in version 1.9</h2>
  279. <ul>
  280. <li>Fast insertion of items using keyboard shortcuts.</li>
  281. <li>The list of previously opened files.</li>
  282. <li>Custom fonts.</li>
  283. <li>Java language support.</li>
  284. <li>C# language support.</li>
  285. <li>Code generation for Python and Tcl without <b>goto</b> simulation.</li>
  286. </ul>
  287. <h2>What's new in version 1.8</h2>
  288. <ul>
  289. <li>The performance of the Smart mode has been significantly improved.</li>
  290. </ul>
  291. <h2>What's new in version 1.7</h2>
  292. <ul>
  293. <li>"Smart" editing mode.<br />To activate the Smart mode, hold SHIFT while dragging
  294. items around on the canvas.<br />
  295. When you drag an item in the Smart mode, all connected lines and items also move consistently.
  296. The diagram structure is preserved.</li>
  297. </ul>
  298. <h2>What's new in version 1.6</h2>
  299. <ul>
  300. <li>Fixed a code generation bug (occuring with Insertion icons).</li>
  301. <li>Resolved Ubuntu 11.x incompatibility issues.</li>
  302. </ul>
  303. <h2>What's new in version 1.5</h2>
  304. <ul>
  305. <li>More improvements in the interface:</li>
  306. <ul>
  307. <li>If you grab a line by its end and drag, all the connected items will also move.</li>
  308. <li>The flat list of diagrams has been replaced with a tree.</li>
  309. <li>"Find all references", "Go to definition", "Jump to diagram", "Jump to item" etc.</li>
  310. </ul>
  311. <li>Code generation for:</li>
  312. <ul>
  313. <li>Plain C</li>
  314. <li>C++</li>
  315. <li>Python 2.x and 3.x</li>
  316. <li>Tcl</li>
  317. </ul>
  318. </ul>
  319. <h2>What's new in version 1.4</h2>
  320. <ul>
  321. <li>Verification according to the rules of the DRAKON language (DRAKON-1).</li>
  322. <li>Creation of silhouette diagrams made easier.</li>
  323. <li>Address icons can be directed towards a branch using the context menu.</li>
  324. <li>Address icons update their text when the target branch gets renamed.</li>
  325. </ul>
  326. <h2>What's new in version 1.3</h2>
  327. <ul>
  328. <li>A massive amount of usability improvements.</li>
  329. <li>Export to PNG.</li>
  330. <li>Export to PDF with colors.</li>
  331. </ul>
  332. <h2>What's new in version 1.2</h2>
  333. <ul>
  334. <li>Zoom.</li>
  335. <li>Search.</li>
  336. <li>Colored icons.</li>
  337. <li>Many user interface improvements.</li>
  338. </ul>
  339. <h2>License</h2>
  340. <p>DRAKON Editor is <a href="http://en.wikipedia.org/wiki/Public_domain">PUBLIC DOMAIN</a> except some third-party components (pdf4tcl, Liberation fonts).</p>
  341. <h2>Authors</h2>
  342. <p>Stepan Mitkin, Alexander Ilyin, Maas-Maarten Zeeman, Vasil Dyadov, Vasili Bachiashvili.</p>
  343. <p><a href="http://drakon-editor.sourceforge.net/">http://drakon-editor.sourceforge.net/</a></p>
  344. <p><a href="https://github.com/stepan-mitkin/drakon_editor">https://github.com/stepan-mitkin/drakon_editor</a></p>
  345. <p><b>drakon.editor@gmail.com</b></p>
  346. <p>1 August 2018.</p>
  347. </body>
  348. </html>