SDK:Menu Command Plug-in

From Vectorworks Developer
Jump to: navigation, search

.SDK|SDK ..SDK:Types|SDK Types ..SDK:Using the SDK|Using the SDK ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference

Menu Commands

The SDK supports several types of Menu Commands. A plug-in Menu Command can be either a single basic menu command or a block of several related menu commands, which is referred to as a menu chunk.

A Basic menu command implements a single menu item in a menu. Basic menu commands have no support for item checking, run-time item disabling, or multiple commands in a single plug-in. If you need any of these behaviors you can create a menu chunk.

A menu chunk displays several menu commands together in a menu, and shares the same source code. This is often desirable when the user needs to select between a group of related options that perform a very similar function.

All menus in VectorWorks, both internal and external, use the same framework of MITM resources, MMNU resources, and menu definition functions. Chunks, being the most general type of menu items, must support the widest array of options. Because of their generality, chunks require more setup and have more associated complications than single menu items.

There are three types of chunks:

Plain chunks contain a fixed number of items that are defined in the resource file in an MMNU resource. The size of these is fixed when they are implemented.
Dynamic chunks are constructed at runtime by the menu definition function. They can be any size, but the size cannot be changed after initialization. The Workspaces menu is an example of a dynamic chunk.
Variable-dynamic chunks are similar to dynamic chunks in that they are constructed at runtime. They are more flexible, however, because they can change their size at any time. The Layers menu, and Windows menu are examples of variable-dynamic chunks.

Because dynamic and variable-dynamic chunks have an unknown size when the menus are being built, the Workspace Editor only allows them to be placed at the end of a menu. Typically, they are placed in a hierarchical menu.

See Also

Overview | SDK:Menu Command Plug-in Resources | SDK:Menu Command Plug-in Main Function | SDK:Menu Command Plug-in Events

Personal tools

Advanced Search
See Also