Skip to content

ATF Diagram Editor Sample

Gary edited this page Mar 17, 2015 · 4 revisions

Table of Contents

Description

DiagramEditor combines the Circuit, FSM, and Statechart editors in a single application to show how multiple editors can share an application shell.

For a description of this editor's internals, see Diagram Editor Programming Discussion.

The newest features of each of the other editors may not be included, so if you are mainly interested in circuits, for example, please take a look at the CircuitEditor Sample.

ATF Features Demonstrated by DiagramEditor

  • Multiple editors sharing the same ATF application shell and editor components.

Run DiagramEditor

  1. Double-click the DiagramEditor.exe in \bin\wws_atf\Release.
  2. The DiagramEditor window appears.
DiagramEditor has the following panes:
  • Palette (Circuit Modules, FSM, Statecharts): the parts palette: this is the combined parts palette containing parts for designing circuit modules, finite state machines, and statecharts for your diagrams.
  • Property Editor: edit the selected element's property in a list control.
  • Grid Property Editor: edit the selected element's property in a grid control.
  • Prototypes: lists the custom fragments that you define for use in your diagrams.
  • Layers: lists layers and their elements.
  • Canvas: define, view, and edit diagrams.
The toolbar contains buttons for file management: save, save as, and save all, print, page set-up, and print preview, and for editing: cut, copy, paste, delete, undo/redo, select all, lock/unlock, group/ungroup. The menu bar contains:
  • File: create a new circuit, finite state machine, or statechart, open an existing circuit, finite state machine, or statechart, Save, Save as, Save all, Close, Print, Page Set-up, Print Preview, and Exit DiagramEditor.
  • Edit: in addition to the standard editing functions (cut, copy, paste, undo/redo, and so on), Edit provides:
    • Keyboard Shortcuts: use the Customize Keyboard Shortcuts window to set up keyboard shortcuts.
    • Load or Save Settings: use the Load and Save Settings window to save current StatechartEditor application settings, or to load application settings from a file.
    • Preferences: set application and document preferences, such as command icon size and auto-load the last active documents.
  • View: choose Frame Selection or Frame All
  • Format: determine the alignment and size of state elements.
  • Window: select and deselect panes.

How to Use DiagramEditor

DiagramEditor opens with an empty canvas grid. Drag elements from the Palette onto the canvas to work with them. Click the tabs for the various panes to view and edit element properties.

To create a group within the circuit canvas:

  1. Select the circuit elements to be grouped.
  2. Select either Edit > Group, or click the Group button on the toolbar.
The circuit elements collapse into a group. You can copy the group and paste it in other circuit documents, in the Prototype pane to use as a diagram prototype, or in the Layers pane to use as a layer. To ungroup:
  1. Select the group.
  2. Click the Ungroup button on the toolbar.
To create a layer:
  1. Select the diagram element(s) to include in the layer.
  2. Copy the selected diagram element (s) to the clipboard.
  3. Paste the diagram element(s) in the Layers pane.
The Layers pane shows the diagram layers in a tree view. Click the + or - to expand and collapse the tree view.

Topics in this section

Clone this wiki locally