Category Layout Editor
The category layout editor command replaces the display area with a two-dimensional view showing the layout of categories in the category plane. Because categories extend infinitely in both time directions, the category plane is the same at all time values.
|A three-dimensional view and the corresponding category editor view|
When the category editing mode is turned on, some commands in the menu and toolbar are removed and replaced with category layout editing commands.
The normal layout of categories is generated by information supplied by the author of the timeline and by the automatic layout mechanism of the QViewer. The category layout editor allows the user to temporarily change this layout. Typically, this is done to reduce unnecessary information on the display by hiding categories, to increase the relative size of a category, or to move categories closer together for comparison.
Categories are drawn as boxes in the category editor. The color of the outline indicates how the category itself should be sized and positioned:
|Red||The category is free, has no size or location, and should be inside a category with automatic layout.|
|Black||The category is fixed, has both a size and location, and should be inside a category without automatic layout.|
|Blue||The category is proportional, its width and height have a fixed ratio, but it needs to be inside a category with automatic layout.|
|Magenta||A rectangle for automatic layout inside a category that allows both free and fixed children. This is not a category, but it is a fixed area where the free or proportional children are automatically laid out.|
|Green||The category editor has moved this category out of its parent and made it a child of the top-level category.|
|Orange||The category editor has moved and/or resized this category but it is still a child of its original parent.|
The category layout editor is also used with the QEditor. Different commands are available in that context and the actions are communicated to the QEditor to set category layout values in the timeline file being edited.
The category layout editor allows four kinds of activity (outside of its use with the QEditor):
- A category can be moved by grabbing the center of the category with the mouse and moving to a new location. A moved category still keeps its relationship to its parent category. If the parent is moved, the category is moved also. An unexpected problem may occur if a category is moved outside the boundaries of its parent. If the parent is no longer drawn, for example, if it is behind the viewpoint in a side view, the category will not be drawn either, even when it is in front of the viewpoint.
- A category can be resized by grabbing an edge or corner and moving the mouse to produce the desired size.
- A category can be made independent of its nesting relationship and temporarily made into a top-level category. This action can be undone with another command.
Make the category a child of the top-level category
- A category can be hidden along with all its nested children. This action can be undone with another command.
Note: Extensions are run as part of drawing the events that reference them. An extension will not run its non-drawing actions when the event is hidden. This may produce unexpected results when a child category is moved to the top level and its parent hidden.
For example, the extension that loads events for each year's games in the USBaseball timeline is attached to the USBaseball category. When this category is hidden, moving the display time to a new year will not add the game events to the remaining Boston team's category.
The desired behavior could be maintained by hiding the league categories instead of the USBaseball category.
Hide the USBaseball category and all its children. Since the BOS category has been made a child of the top-level category, it is not hidden.