Interface: CuiQuadMenuMgr
The CuiQuadMenuMgr interface exposes properties and methods for creating and customizing quad menus for plug-ins.
Quad menus can only be created in response to the #cuiRegisterMenus callback notification, which is sent at startup and whenever a menu definition file (.mnx) is loaded. Menus can be queried at any time.
Properties:
.contexts : Interface array : ReadAn array of the currently registered quad menu contexts. These are CuiQuadMenuContext objects.
Methods:
<Interface>CreateQuadMenuContext <guid>id <string>title
CreateQuadMenuContext - no automatic redraw after invokedCreates a new new quad menu with the specified title text and id, and returns it as a CuiQuadMenuContext object.
<Interface>GetContextById <guid>id
GetContextById - no automatic redraw after invokedReturns the CuiQuadMenuContext with the specified id.
<Interface>GetMenuById <guid>id
GetMenuById - no automatic redraw after invokedReturns the CuiMenu or CuiDynamicMenu the specified id.
<Interface>GetQuadMenuById <guid>id
GetQuadMenuById - no automatic redraw after invokedReturns the CuiQuadMenu with the specified id.
<Interface>GetMenuItemById <guid>id
GetMenuItemById - no automatic redraw after invokedReturns the CuiMenuItem or CuiActionMenuItem with the specified id.
<boolean>LoadConfiguration <filename>menuFile logMsgsToLogFile:<boolean>
LoadConfiguration - no automatic redraw after invoked
logMsgsToLogFile default value: trueLoads the quad menu configuration file specified by menuFile, optionally logging information and error messages to a log file. See GetMessageLogFile() below. This file must be a properly formed .qmnx file.
<string>GetDefaultConfiguration()
GetDefaultConfiguration - no automatic redraw after invokedReturns the path to the default quad menu configuration file (.qmnx) used by 3ds Max.Typically this is <3dsMaxDir>/UI_LN/CUI/3dsmaxQuads.qmnx.
<boolean>SetCurrentConfiguration <filename>menuFile logMsgsToLogFile:<boolean>
SetCurrentConfiguration - no automatic redraw after invoked
logMsgsToLogFile default value: trueSets the current quad menu configuration to the specified menuFile, optionally logging information and error messages to a log file. See GetMessageLogFile() below.
<string>GetCurrentConfiguration()
GetCurrentConfiguration - no automatic redraw after invokedReturns the path to the currently used quad menu configuration file (.qmnx) used by 3ds Max.
<boolean>CreateLocalizationFile <filename>menuFileName <&string>outputFileName pathOrEmpty:<filename>
CreateLocalizationFile - no automatic redraw after invoked
outputFileName is Out parameter
pathOrEmpty default value: undefinedGenerates a localization file for the specified menu configuration menuFileName and saves it to the specified filename (appending the .res suffix), returning the saved file name in the by reference parameter outputFileName. The optional pathOrEmpty parameter can specify a path to save the localization file to.
A localization resource file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Resources>
<Resource Id="b4779ebb-a6f0-4815-9777-57c01c0b584c" Text="Main Menu Bar"/>
<Resource Id="eed3eaef-ea24-4342-aacc-9dfd87f9a4f4" Text="&File" LocHint="Menu in: MainMenuBar"/>
...
</Resources>
The ID is the identifier for the menu, menu item, or action, and Text is the title or text to show. This resource file can be translated into multiple languages and the corresponding language version can be loaded automatically according to the 3ds Max language settings.
<string>GetMessageLogFile()
GetMessageLogFile - no automatic redraw after invokedReturns the path to the menu configuration log file.
<boolean>PopupQuadFromContext <guid>id <HWND>hwnd
PopupQuadFromContext - no automatic redraw after invokedPops up the quad menu with the given id parented to the gui object with the specified hwnd.
Actions:
