InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMenuUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IMenuUtils__
25 #define __IMenuUtils__
26 
27 // ----- Interfaces -----
28 
29 #include "IInterfaceColors.h"
30 #include "IPMUnknown.h"
31 
32 // ----- Includes -----
33 
34 #include "InterfaceFontInfo.h"
35 #include "LocaleSetting.h"
36 #include "PMString.h"
37 
38 // ----- Utility files -----
39 
40 #include "Utils.h"
41 
42 // ----- ID.h files -----
43 
44 #include "AppFrameworkID.h"
45 
46 class IGraphicsContext;
47 
51 class IMenuUtils : public IPMUnknown
52 {
53 public:
54  enum { kDefaultIID = IID_IMENUUTILS };
55 
56 
62  virtual void PlatformStripMenuAccelerator(PMString* inOutString, int16 uiLocale = LocaleSetting::GetLocale().GetUserInterfaceId()) = 0;
63 
69  virtual void StripMenuAccelerator(PMString* inOutString, int16 uiLocale) = 0;
70 
80  virtual void InsertAmpersandForDisplay(PMString* inOutString, int16 uiLocale = LocaleSetting::GetLocale().GetUserInterfaceId()) = 0;
81 
86  virtual bool16 RemoveLastMenuPart(PMString *inOutString) = 0;
87 
92  virtual bool16 RemoveAllButLastMenuPart(PMString *inOutString) = 0;
93 
98  virtual int32 GetNumMenuParts(const PMString& menuPath) = 0;
99 
105  virtual PMString GetNthMenuPart(const PMString& menuPath,int32 index) = 0;
106 
115  virtual void DrawMenuString(SysPort port, const PMString& menuString, const SysRect& bounds, int16 alignment, bool16 hilited, bool16 disabled ) = 0;
116 
126  virtual void DrawMenuString(IGraphicsContext* gc, const PMPoint& startPt, const PMString& str, const InterfaceFontInfo& fontInfo,
127  IInterfaceColors::InterfaceColor color = kInterfaceBlack, bool16 convertAmpersandToUnderline = kFalse, bool16 disabled = kFalse) = 0;
128 
133  virtual void TranslateMenuName(PMString& untranslatedName) = 0 ;
134 
145  virtual PMString GetMenuNameFromFileName(const PMString &fileName, int32 position) = 0;
146 };
147 
148 #endif // __IMenuUtils__