edit.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <html>
  2. <head>
  3. <title>Edit Tool</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1><img align="center" src="../../../../en/icons/select.gif" width="32" height="32">
  7. <em>Edit Tool</em></h1>
  8. <p><table>
  9. <tr><td><strong>Library:</strong></td>
  10. <td><a href="index.html">Base</a></td></tr>
  11. <tr><td><strong>Introduced:</strong></td>
  12. <td>2.3.0</td></tr>
  13. </table></p>
  14. <h2>Behavior</h2>
  15. <p>The Edit tool allows the user to rearrange existing components and to add
  16. wires. Exactly what the tool does depends on where the user presses the mouse
  17. on the canvas.</p>
  18. <ul>
  19. <li><p>When the mouse is over a wiring point for an existing component,
  20. or if it is atop a current wire, the Edit Tool will display a small green circle
  21. around the mouse's location. Pressing the button there initiates the addition of
  22. a new wire. But if the user doesn't drag the mouse far enough to initiate a
  23. wire before releasing the button, the press is treated as a mouse click, and so
  24. the wire is simply added into the current selection.</p>
  25. <p>The bit width of an added wire is inferred from the components to which it
  26. is connected. If it is not attached to any components, the wire will be drawn
  27. gray to indicate that its bit width is unknown; if the components at the
  28. locations that the wire helps to connect disagree on the bit width, then the
  29. wire will be drawn orange to indicate the conflict, and the wire will in fact
  30. refuse to carry any values at all until the user resolves the conflict.</p>
  31. <p>All wires in Logisim are either horizontal or vertical, never diagonal.</p>
  32. <p>Wires are non-directional; that is, they carry values from
  33. either endpoint to the other. Indeed, a wire can carry values
  34. in both directions simultaneously: In the below example, a bit flows from the
  35. upper input at left through the center wire, then it circles back through the
  36. center wire, and then it circles forward again through the center wire before
  37. reaching the output at lower right.</p>
  38. <center><img src="../../../../en/img-guide/bundles-splitter-2way.png" width="191" height="44"></center>
  39. <p>A single drag of the mouse can create multiple wire segments. The
  40. precise process is a little confusing in its description; but it works
  41. quite intuitively in practice: If you request a particular wire segment
  42. using the Wiring Tool, that segment will be split apart wherever it hits
  43. a pin for an existing component, or wherever it hits the endpoint of an
  44. existing wire segment. Also, if an endpoint of any of the new wire
  45. segments hit somewhere in the middle of an existing wire, then that wire
  46. will be split into multiple segments itself.</p>
  47. <p>You can also shorten or delete an existing wire segment by initiating a drag
  48. at the terminus of the segment and then drawing backwards across the segment.
  49. During the drag, the shortening is indicated by drawing a white line over of the
  50. portion of the wire that will be removed.</p>
  51. <p>Some components draw short stubs to which wires can connect, such as the
  52. <a href="../gates/basic.html">OR gate</a> and <a
  53. href="../gates/controlled.html">controlled buffer</a>. Logisim will
  54. silently correct attempts to create wires that slightly overshoot the
  55. stub's end.</p></li>
  56. <li><p>If, however, the user presses the Alt key at a point in the middle of
  57. the wire, then the green circle will disappear. A mouse press selects the wire,
  58. and a mouse drag moves it.</p></li>
  59. <li><p>Pressing the mouse button while it is within a currently selected
  60. component begins a drag moving all elements of the selection.</p>
  61. <p>By default, Logisim will compute a way to add new wires
  62. so that no existing connections are lost during the move.
  63. (Sometimes it will delete or shorten existing wires.)
  64. If you're performing a move where you do not want these changes to be made,
  65. you can press the shift key during the move.
  66. If you want to disable this behavior entirely,
  67. go to Project &gt; Options, select the Canvas tab,
  68. and uncheck the <q>Keep Connections When Moving</q> box;
  69. in this case, the connections are computed only when the shift key <em>is</em> down.</p>
  70. <p>Dragging a selection can lead to unexpected behavior from wires: If
  71. you drag a selection including some wires on top of some other wires,
  72. all wires are merged, and the merged wires are placed into the
  73. selection. As a result, if you drag the selection a second time, the
  74. wires previously at the location will not be left behind. This behavior
  75. is necessary to keep with the intuitive behavior of wires in Logisim, where
  76. wires never overlap. And
  77. it does not normally constitute a major problem: Logisim will draw the
  78. full selection in the midst of dropping, and you should not drop it
  79. until you are sure it is in the correct location.</p></li>
  80. <li><p>Pressing the mouse within an unselected component (but not at one of
  81. the component's wiring points) drops all components from the current selection
  82. and selects instead the component(s) containing the clicked location.</p></li>
  83. <li><p>Shift-clicking the mouse within a component toggles that component's
  84. presence within the selection. If multiple components include the same
  85. location, all components' presence will be toggled.</p></li>
  86. <li><p>Dragging the mouse starting at a location not contained within any
  87. components drops all components from the current selection and
  88. initiates a rectangular selection.
  89. All component(s) contained by the rectangle will be placed into the
  90. selection.</p></li>
  91. <li><p>Shift-dragging the mouse starting at a location not contained
  92. within any components initiates a rectangular selection.
  93. The presence in the selection of all component(s) contained by the
  94. rectangle will be toggled.</p></li>
  95. <li><p>However, if the Alt key is pressed at a location not contained within
  96. any components, this initiates the addition of a new wire. A small green circle
  97. is drawn in such a circumstance to indicate this.</p></li>
  98. </ul></p>
  99. <p>After selecting the desired items in the selection, you can of course
  100. cut/copy/paste/delete/duplicate all the items via the
  101. <a href="../../guide/menu/edit.html">Edit menu</a>.</p>
  102. <p>Some keys have an effect with the Edit Tool.</p>
  103. <ul>
  104. <li><p>The arrow keys change the Facing attribute for all components in the
  105. selection that have such an attribute.</p></li>
  106. <li><p>The Delete and Backspace keys will delete everything in the selection
  107. from the circuit.</p></li>
  108. <li><p>The Insert and MenuKey-D keys will create a duplicate of the currently
  109. selected components.</p></li>
  110. </ul>
  111. <p>Logisim's behavior when duplicating a selection or pasting the clipboard into
  112. a circuit is somewhat peculiar: It will not immediately place the components into the
  113. circuit; instead, the selection will be a collection of "ghosts," which
  114. will be dropped into the circuit as soon as they are either dragged to
  115. another location or removed from the selection. (This peculiar behavior
  116. is necessary because pasting will otherwise merge the wires of the
  117. selection into the current circuit at once, and the wires there
  118. previously will be dragged with the pasted clipboard if the user wants
  119. to move the pasted components somewhere else.)</p>
  120. <h2>Attributes</h2>
  121. <p>None. Selecting a component, though, will display its attributes.
  122. With multiple components selected, attributes shared by all are shown,
  123. blank if they have different values and otherwise with the value they
  124. all have in common. (Wires are ignored if there are any non-wires in
  125. the selection.) Changes to the attribute value affect all selected
  126. components.</p>
  127. <p><a href="../index.html">Back to <em>Library Reference</em></a></p>
  128. </body>
  129. </html>