Giter Club home page Giter Club logo

nassi-shneiderman-editor's Introduction

Nassi-Shneiderman Diagrams are diagrams illustrating the control flow structure within a module using nested blocks. These diagrams are used to represent structured schemes and help reduce the complexity of diagrams by not explicitly indicating control flow lines. Nassi-Shneiderman diagrams are also known as structure charts.

The depiction of the basic elements of structured programming in Nassi-Shneiderman diagrams is organized as follows. Each block is represented by a rectangle and can be nested within the inner rectangle of any other block. Information about the blocks is written following the same rules as in structured algorithm schemes (using natural language or the language of mathematical sciences).

  1. Functional block (processing block) is represented as a regular rectangle. Each rectangle inside any symbol is also a processing block.

  1. Simple branching (IF block) is represented as a rectangle divided by a horizontal line into two parts. The upper part contains the branching header, while the lower part consists of two branching branches separated by a vertical line. In the header, two lines are drawn from the upper corners to the start of the line that separates the branches. In the resulting triangle at the top, the branching condition is written, and in the two lower triangles above the branches, the condition values corresponding to those branches are labeled, for example, "true" and "false" or "yes" and "no".

  1. Multiple branching (CASE block) is represented similarly to the structure of simple branching, but the main branch and the triangle above it are divided into multiple parts by vertical lines. In the upper triangle, the switch expression is written, and above the branches, the corresponding switch values are labeled. The last column represents the "Otherwise" branch, which is executed if none of the branches satisfy the condition.

  1. A loop with a precondition is represented as a rectangle, inside which another rectangle is drawn in the bottom right corner. The loop header is written above the inner rectangle, and the loop body is written inside it.

  1. A loop with a postcondition differs from a loop with a precondition only in the placement of the inner rectangle, which is drawn in the top right corner of the outer rectangle. The header is written below it.

When the program is launched, the diagram starts as empty, consisting of a single empty block. To begin working, you need to select this block by left-clicking on it or using the arrow keys on the keyboard. After that, you can add a new block or modify the existing one. You can also use the right mouse button to open a context menu that contains the same options.

When you hold down the mouse button while selecting a block, you can effortlessly move it to a different location. The areas where the block can be placed will be elegantly highlighted in green upon mouse hover, indicating valid drop zones. If you release the mouse button while the block is positioned above a green-highlighted area, the block will seamlessly relocate itself to the designated spot.

There are three possible scenarios when moving a block:

  1. Add the block after the target block: Simply release the mouse button when the block is above a green-highlighted area.

  1. Place the block before the target block: Hold down the Ctrl key while releasing the mouse button when the block is above a green-highlighted area.

  1. Swap positions with the target block: Hold down the Shift key while releasing the mouse button when the block is above a green-highlighted area.

To edit a specific block, you can double-click the block with the left mouse button or use the "Edit Block" button in the "Edit" menu, the right-click context menu, or the top toolbar. This will open the editing window. The main input field contains the text of the block.

If the operator is a case statement, you need to provide conditions for it. You can use the "+" and "-" buttons to add or remove input fields. Please note that you cannot remove a field if there are only two fields remaining.

Export options available in: PNG, BMP, SVG.


Shortcuts:

Alt + F4 - Сlose the program


Ctrl + N - Create a new diagram

Ctrl + Del - Close the current diagram

Ctrl + O - Open diagram

Ctrl + S - Save current diagram

Ctrl + Alt + S - Save current scheme with specified path


Ctrl + Z - Undo the last action

Shift + Ctrl + Z - Redo the last action


Ctrl + X - Cut the seletced element

Ctrl + C - Copy the seletced element

Ctrl + V - Paste the copied or cut element after the selected element


Enter - Edit the selected element

Del - Delete the selected element


F2 - Insert a new process after the selected element

F3 - Insert a new branching block after the selected element

F4 - Insert a new multiple branching block after the selected element

F5 - Insert a new testing loop after the selected element

F6 - Insert a new reversed testing loop after the selected element


Shift + F2 - Insert a new process before the selected element

Shift + F3 - Insert a new branching block before the selected element

Shift + F4 - Insert a new multiple branching block before the selected element

Shift + F5 - Insert a new testing loop before the selected element

Shift + F6 - Insert a new reversed testing loop before the selected element


Up - Move selected block up

Left - Move selected block left

Right - Move selected block right

Down - Move selected block down


Shift + Ctrl + Right - Sort case blocks in ascending order

Shift + Ctrl + Left - Sort case blocks in descending order


Shift + Ctrl + F - Edit font

Shift + Ctrl + P - Edit pen

Shift + Ctrl + G - Edit global settings


F1 - Information and details about the program's functionality

Shift + F1 - Information about the author of the program


Ctrl + R - Rename the current diagram

Ctrl + Up - Change the diagram to the diagram preceding it in the list

Ctrl + Down - Change the diagram to the diagram following it in the list


MouseWheelUp - Scroll up

MouseWheelDown - Scroll down

Shift + MouseWheelUp - Schroll left

Shift + MouseWheelDown - Schroll right


Ctrl + MouseWheelUp - Zoom in the diagram

Ctrl + MouseWheelDown - Zoom out the diagram

nassi-shneiderman-editor's People

Contributors

riborok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.