| Using Stateflow | Search  Help Desk |
Creating Boxes
Stateflow allows you to use graphical entities called boxes to organize your diagram visually. To create a box, first create a superstate containing the objects to be boxed. Then, select Box from the superstate's Type shortcut menu. Stateflow converts the superstate to a box, redrawing its border with sharp corners to indicate its changed status.Boxes are primarily graphical entities. They do not correspond to any real element of a state machine. However, boxes do affect the activation order of a diagram's parallel states. In particular, a box wakes up before any parallel states or boxes that are lower down or to the right of the box in the diagram. Within a box, parallel states still wake up in top down, right-to-left order.
You can group and ungroup boxes and hide or show them in the same way you hide or show states. See "Grouping States" and "Hiding a State's Contents" for more information.