InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ILinkResourceHelper.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Manohar Gour
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // ADOBE CONFIDENTIAL
16 //
17 // Copyright 2016 Adobe
18 // All Rights Reserved.
19 //
20 // NOTICE: Adobe permits you to use, modify, and distribute this file in
21 // accordance with the terms of the Adobe license agreement accompanying
22 // it. If you have received this file from a source other than Adobe,
23 // then your use, modification, or distribution of it requires the prior
24 // written permission of Adobe.
25 //
26 // Description:
27 // This class defines an interface used to maintain and access UI properties of a linked resource.
28 //
29 //========================================================================================
30 
31 #ifndef __ILinkResourceHelper__
32 #define __ILinkResourceHelper__
33 
34 // ----- Includes -----
35 #include "IPMUnknown.h"
36 #include "LinksID.h"
37 #include "LinksUIID.h"
38 #include "AppInfo.h"
39 
40 
41 class FileTypeInfo;
42 class IDTime;
43 class PMString;
44 class UIDList;
45 class URI;
46 class WideString;
47 class ILink;
48 
53 {
54 public:
55  enum { kDefaultIID = IID_ILINKRESOURCEHELPER };
56  /*caution: Please don't change values of this enum as it is use to sort icons in shared content ui.
57  this value will be decisive in case of multiple page items in a group */
58  enum IconState {
59  kIconUnknown = 0,
60  kIconEmbedded = 5,
61  kIconOk = 10,
62  kIconMissing = 15,
63  kIconInaccessible = 20,
64  kIconModified = 25
65  };
66 
67  struct IconStatus {
68 
69  IconStatus(PMRsrcID icon, IconState state, int32 priority,PMString msg=PMString("")) :
70  fIcon(icon), fState(state), fPriority(priority),fmsg(msg) {}
71 
72  PMRsrcID fIcon;
73  IconState fState;
74  int32 fPriority;
75  PMString fmsg;
76  };
77 
83  virtual IconStatus GetIcon(const ILink* link) const = 0;
84  virtual IconStatus GetPageItemAdornmentIcon(const ILink* link) const = 0;
85 
86  virtual bool CanDoDoubleClickInaccessibleAction() const = 0;
87  virtual void DoubleClickInaccessibleAction() const = 0;
88  virtual void ReplaceWithOriginalAsset() const = 0;
89  virtual bool IsInaccessibleActionSupportedURIScheme() const = 0;
90  virtual void InaccessibleActionOnOpenDoc() const = 0;
91  virtual PMString InaccessibleLinksWarningMessage(int32 count) const = 0;
92 
93 
98  virtual bool CanProvideSupportedApplicationList() const = 0;
99 
107  virtual void GetSupportedApplicationList(AppInfoList& appList, bool16 bDefaultEditorOnly = false) const = 0;
108 };
109 
110 
111 //Some well known Adobe icon priorities
112 const int32 kDefaultLinkIconPriority = 10;
113 const int32 kFileLinkIconPriority = kDefaultLinkIconPriority + 10;
114 const int32 kCCLibLinkIconPriority = kFileLinkIconPriority + 10;
115 const int32 kHTTPLinkIconPriority = kCCLibLinkIconPriority + 10;
116 const int32 kHTTPFPOLinkIconPriority = kHTTPLinkIconPriority + 10;
117 const int32 kAALLinkIconPriority = kHTTPFPOLinkIconPriority + 10;
118 const int32 kAALFPOLinkIconPriority = kAALLinkIconPriority + 10;
119 const int32 kCCACLibLinkIconPriority = kAALFPOLinkIconPriority + 10;
120 
121 
122 
123 #endif // __ILinkResource__