Stateflow    

Using the Editor Object

The Editor object provides access to the purely graphical properties and methods of Chart objects. Each Chart object has its own Editor object. See the following topics to learn how to use the Editor object and its methods to change the display of the Stateflow diagram editor for a chart:

Accessing the Editor Object

You cannot directly create or destroy the Editor and Clipboard objects as you do other Stateflow API objects. However, you can attach a handle to them to use their properties and methods for modifications to Stateflow diagrams.

When you create a chart, an Editor object is automatically created for it. If ch is a workspace handle to a chart, you create a handle to the Editor object for that chart with the following command:

Changing the Stateflow Display

Use the handle ed from the preceding example to access the Editor object properties and methods. For example, the following command calls the zoomIn method to zoom in the chart by a factor of 20%:

Or, you can simply set the ZoomFactor property of this chart's editor to an absolute zoom factor of 150%:

You can also use a chart's Editor object to change the window position of the diagram editor. For a reference to all the Editor object's properties and methods, see Editor Properties and Editor Methods.


  Copying Objects Individually Entering Multiline Labels