![]() | InDesign SDK 20.5 |
#include <IMenuUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_IMENUUTILS } |
Public Member Functions | |
| virtual void | PlatformStripMenuAccelerator (PMString *inOutString, int16 uiLocale=LocaleSetting::GetLocale().GetUserInterfaceId())=0 |
| virtual void | StripMenuAccelerator (PMString *inOutString, int16 uiLocale)=0 |
| virtual void | InsertAmpersandForDisplay (PMString *inOutString, int16 uiLocale=LocaleSetting::GetLocale().GetUserInterfaceId())=0 |
| virtual bool16 | RemoveLastMenuPart (PMString *inOutString)=0 |
| virtual bool16 | RemoveAllButLastMenuPart (PMString *inOutString)=0 |
| virtual int32 | GetNumMenuParts (const PMString &menuPath)=0 |
| virtual PMString | GetNthMenuPart (const PMString &menuPath, int32 index)=0 |
| virtual void | DrawMenuString (SysPort port, const PMString &menuString, const SysRect &bounds, int16 alignment, bool16 hilited, bool16 disabled)=0 |
| virtual void | DrawMenuString (IGraphicsContext *gc, const PMPoint &startPt, const PMString &str, const InterfaceFontInfo &fontInfo, IInterfaceColors::InterfaceColor color=kInterfaceBlack, bool16 convertAmpersandToUnderline=kFalse, bool16 disabled=kFalse)=0 |
| virtual void | TranslateMenuName (PMString &untranslatedName)=0 |
| virtual PMString | GetMenuNameFromFileName (const PMString &fileName, int32 position)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This provides some utility routines commonly used by menu code. i.e. Utils<IMenuUtils>()->PlatformStripMenuAccelerator( ... ) ;
| pure virtual |
DEPRECATED: draw the specified string in the the current port, using menu theme. This is mostly intended for use in OwnerDrawn menus
| port | the port to draw into |
| menuString | the menu item string to draw |
| bounds | the bounds to draw the string into |
| alignment | the alignment for the string in the box, i.e. kAlignLeft |
| hilited | whether or not the menu item should be drawn hilited |
| disabled | whether or not the menu item should be drawn disabled |
| pure virtual |
draw the specified string in the the current port, using menu theme. This is mostly intended for use in OwnerDrawn menus
| gc | the graphics context to draw into |
| startPt | where to start drawing |
| str | the menu item string to draw |
| fontInfo | the font to draw with |
| color | the color to draw with |
| convertAmpersandToUnderline | whether or not to convert '&' to underlines, like windows does |
| disabled | whether or not the menu item should be drawn disabled |
| pure virtual |
Create the text of recent file. It will
| path | or path and filename of the file IN |
| menu | position used when adding the Window accelerators. |
get the nth part of a menu path. i.e. if you pass in 'Main:Type:Font:Times' and 2, this would return 'Font'
| menuPath | the string of menu parts |
| index | which menu part you want |
| pure virtual |
counts # of menu parts. i.e. if you pass in 'Main:Type:Font:Times', this would return 4. Note: If you pass in 'Main:Type:Font:' this will return 3.
| menuPath | the string to count the menu parts of |
| pure virtual |
Inserts extra '&' characters into a string, doubling up each one. This is required for strings that actually contain non-accelerator ampersand characters. e.g. Style names, master names, layer names, swatch names or other user-entered strings. Can be useful before call to ReplaceStringParameters, which is often followed by a call to SetNthActionName, or SetTextControlData. Should only be called on strings that don't contain accelerator ampersands. Safe to call on both platforms.
| inOutString | This is a pointer to the string to insert extra ampersands into |
| uiLocale | describes what UI this string is for. |
| pure virtual |
Strips the menu accelerator from the string, if this platform doesn't need it. Generally a no-op on windows. On the mac, this strips single '&' characters from the string (for English and most other languages. Some languages like Japanese use different accelerator characters)
| inOutString | This is a pointer to the string to remove the accelerator from |
| uiLocale | describes what UI this string is for. |
| pure virtual |
takes a menu path, removes all but the last item (i.e. if you pass in 'Main:Type:Font:Times', the string you passed in is now 'Times')
| inOutString | This is a pointer to the string to remove the last part of the menu path from |
| pure virtual |
takes a menu path, removes the last item (i.e. if you pass in 'Main:Type:Font:Times', the string you passed in is now 'Main:Type:Font')
| inOutString | This is a pointer to the string to remove the last part of the menu path from |
| pure virtual |
Strips the menu accelerator from the string. Generally, this strips single '&' characters from the string (for English and most other languages. Some languages like Japanese use different accelerator characters)
| inOutString | This is a pointer to the string to remove the accelerator from |
| uiLocale | describes what UI this string is for. |
| pure virtual |
Translate a menu name. Menu names preceeded by the kDontTranslateChar (
| untranslatedName | of the menu IN/OUT |