IUIX_CmdMenu Interface

From PDF XChange PDF SDK
Revision as of 01:11, 23 June 2017 by Palamar (Talk | contribs)

Jump to: navigation, search


The Command Menu acts as a passive container. Basically, it is a tree-like command structure that is used by the toolbar to create interactive drop-down menus.

The Command Menu Item does not hold the current State (Enabled/Disabled, Checked etc.) because the Command Menu (and the needed Command Menu Item) can be used in the different contexts at the same time where the same element (command) can have different states (for example the cmd.delete command). Meaning that different toolbars' elements can have the same Command Menu (meaning the same object).

The Command Menu itself is only a plan/scheme that defines the structure (through the commands hierarchy) of the Visual Command Menu that will be shown. The Visual Command Menu at the moment of creation reads this structure and creates the Command bars and fills it with command items and separators from the Command Menu structure. And then the actual state is being calculated for them through the CmdItem.Cmd.Handler.OnGetCmdState(MenuOwner) method that depends on the MenuOwner (that defines the state of the Command Menu Item based on the context).


Methods

CopyItemsFrom DeleteItemsByCmd FindFirstItemByCmdName InsertItem4
DeepFindFirstItemByCmdID DeleteItemsByCmdID InsertItem InsertSeparator
DeleteAllItems FindFirstCmd InsertItem2 SetStyle
DeleteItem FindFirstItemByCmdID InsertItem3 SetSubMenu

Properties

_NewEnum Count Item Style
Cmd IsSeparator

See Also

IUIX_CmdManager::ShowPopupMenu, IUIX_CmdHandler::OnGetItemSubMenu, IUIX_CmdItem::SubMenu, IUIX_Inst::CreateCmdMenu, IUIX_EditCallbacks::Edit_OnContextMenu, IUIX_Button::Menu, IPXV_BeforeShowContextMenuEvent::Menu