GNED -- the OMNeT++ Graphical Network Editor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Description:
  The GNED editor allows you to design compound modules graphically.
  GNED works with NED files -- no need for any nasty internal file format.
  You can load any of your existing NED files, edit the compound modules in it
  graphically and then save the file back. The rest of the stuff in the NED
  file (simple modules, channels, networks etc.) will survive the operation.
  GNED puts all graphics-related data into display strings.

  GNED works by parsing your NED file into an internal data structure, and
  regenerating the NED text when you save the file. One consequence of this
  is that indentation will be "canonized" -- hopefully you consider this fact
  as a plus and not as a minus. Comments in the original NED are preserved --
  the parser associates them with the NED elements they belong to,
  so comments won't be messed up even if you edit the graphical representation
  to death by removing/adding submodules, gates, parameters, connections, etc.

  GNED is now a fully two-way visual tool. While editing the graphics, you can
  always swich to NED source view, edit in there and switch back to graphics.
  Your changes in the NED source will be immediately backparsed to graphics;
  in fact, the graphics will be totally reconstructed from the NED source and
  the display strings in it.

Comment parsing:
  It is useful to know how exactly GNED identifies the comments in the NED file.
  The following (maybe a bit long) NED code should explain it:

    // ------------------------------------------------------------------------
    // File: sample.ned
    //
    // This is a file comment. File comments reach from the top of the file
    // till the last blank line above the first code line.
    // ------------------------------------------------------------------------

    //
    // The file comment can also contain blank lines, so this is still part of
    // the above file comment.
    //

    // Module1 --
    //
    // This is a banner comment for the Module1 declaration below.
    // Banner comments can be multi-line, but they are not supposed to contain
    // blank lines. (Otherwise the lines above the blank one will be taken as
    // part of a file comment or trailing comment.)
    //
    module Module1
        submodules: // and this is right-comment
            // This is another banner comment, for the submodule
            submod1: Module;
                display: "p=120,108;b=96,72,rect";
        connections:
            out --> submod1.in; // Right-comments can also be
                                // multi-line.
    endmodule

    // Finally, this is a trailing comment, belonging to the above module.
    // It may contain blank lines. Trailing comments are mostly used to put
    // separator lines into the file, like this:
    // -----------------------------------------------------------------------

    // Module2 --
    //
    // an empty module
    //
    module Module2
    endmodule


Key/mouse bindings:
  In graphics view, there are two editing modes: draw and select/mode.
  The mouse bindings are the following:

  Draw mode:
     Drag in empty area:            create new submodule
     Drag from one submodule
     to another:                    create new connection
     Click in empty area:           switch to select/move mode
  Select/Move mode:
     Drag submodule/connection:     move it
     Drag name label:               move it
     Drag either end of connection: move that end
     Drag corner of (sub)module:    resize it
     Drag starting in empty area:   select enclosed submodules/connections
     Drag a selected object:        move selected objects
     Click submodule/connection:    select it
     Ctrl-click submodule/conn.:    add to selection
     Click in empty area:           clear selection
  Both editing modes:
     Right-click on module/sub-
     module/connection:             bring up properties dialog
     Double-click on submodule:     go into submodule

Further plans:

- consistency checks
    Consistency of drawing: check that connection arrows start/end in their
    source/destination submodule boxes etc.
    Consistency of data structure: check that source/dest gate names are
    filled in for connections, no gate is used more than once etc.

- changing properties for all selected objects together

- support for simple modules
    Generating C++ class declaration etc. for simple modules. Editing of
    C++ sources from within GNED.

- turn GNED into an integrated development environment
    Project file would contain list of module types used for a particular
    simulation, user interface selection etc.
    GNED would generate the makefile, build the executable, run it etc.

Andras
