VCOM:VectorWorks:Workspaces:IWorkspaceMenuChunk

From Vectorworks Developer
Jump to navigation Jump to search

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

Description

namespace VectorWorks::Workspaces

This is a variation of the Menu Item that actually represents a group of menu items.

A menu chunk can be:

  • a regular, static list of menu items.
  • a dynamic list of menu items ...?
  • a dynamic, variable list of menu items.

Interface

class IWorkspaceMenuChunk : public IVWUnknown
{
public:
  virtual VCOMError VCOM_CALLTYPE GetIdentifier(TXString& outIdentifier) = 0;
  virtual VCOMError VCOM_CALLTYPE SetUniversalName(const TXString& inName) = 0;
  virtual VCOMError VCOM_CALLTYPE GetUniversalName(TXString& outName) = 0;
  virtual VCOMError VCOM_CALLTYPE SetResourceManagerID(Sint16 inResourceID) = 0;
  virtual VCOMError VCOM_CALLTYPE GetResourceManagerID(Sint16& outResourceID) = 0;

  virtual VCOMError VCOM_CALLTYPE GetChunkType(EWorkspaceMenuChunkType& outType) = 0;
  virtual VCOMError VCOM_CALLTYPE AddMenuItem(const TXString& inMenuItemDisplayText, bool inHasShortcutKey = false, char inShortcutKey = (char) 0, Uint32 inShortcutKeyModifiers = 0UL) = 0;
  virtual VCOMError VCOM_CALLTYPE GetMenuItemCount(Sint16& outMenuItemCount) = 0;
  virtual VCOMError VCOM_CALLTYPE GetMenuInfoAtIndex(Sint16 inMenuItemIndex, TXString& outMenuItemDisplayText, bool& outHasShortcutKey, char& outShortcutKey, Uint32& outShortcutKeyModifiers) = 0;
  virtual VCOMError VCOM_CALLTYPE GetLastError(EWorkspacesError& outError) = 0;
}

Members

GetIdentifier Gets the workspace identifier for the menu item.
SetUniversalName Sets the universal name for the menu chunk.
GetUniversalName Gets the universal name for the menu item.
SetResourceManagerID Sets the Resource Manager ID for this item.
GetResourceManagerID Gets the Resource Manager ID if there is one.
GetChunkType Gets the type of chunk that this menu chunk is.
AddMenuItem Adds to the collection of menu items in this chunk.
GetMenuItemCount Gets the count of menu itemss in the menu.
GetMenuInfoAtIndex Gets the menu item info at the given index.
GetLastError Gets the last error that was generated by the IWorkspaces interface.

Remarks

This enumeration denotes what type of menu chunk this menu item refers to.

		
enum EWorkspaceMenuChunkType {
  eWorkspaceMenuChunkType_None,
  eWorkspaceMenuChunkType_Regular,
  eWorkspaceMenuChunkType_Dynamic,
  eWorkspaceMenuChunkType_Variable
};

Version

Available from: VectorWorks 12

See Also

VCOM:VCOMPtr | VCOM:VectorWorks:Workspaces:IWorkspaces

[[VCOM:VCOMPtr]] | [[VCOM:VectorWorks:Workspaces:IWorkspaces]]