InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ILinksUIUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: lance bushore
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 __ILinksUIUtils__
25 #define __ILinksUIUtils__
26 
27 // ----- Includes -----
28 #include "IPMUnknown.h"
29 #include "LinksUIID.h"
30 #include "AppInfo.h"
31 #include "NodeID.h"
32 
33 class ILink;
34 class ILinkResource;
35 class ILinkInfoProvider;
36 class IMetaDataAccess;
37 class IImageCache;
38 
39  namespace LinksUIUtils
40  {
41  const int kLinksUIColumnGap = 8;
42  };
43 
44 
49 class ILinksUIUtils : public IPMUnknown
50 {
51 public:
52  enum { kDefaultIID = IID_ILINKSUIUTILS };
53 
57  virtual void SelectLinksInPanel(const UIDList& inLinkUIDsToSelect) = 0;
58 
63  virtual UIDList GetLinksSelectedInPanel(bool16 inDisplayOrder = kFalse) = 0;
64 
69  virtual UIDList GetLinkResourcesSelectedInPanel(bool16 inDisplayOrder = kFalse) = 0;
70 
76  virtual UIDList GetLinksForMenuAction(IPMUnknown* widget, bool16 inDisplayOrder = kFalse) const = 0;
77 
82  virtual bool16 SomeCanEdit(UIDList &linkList) = 0;
83 
88  virtual bool16 SomeCanGoToSource(UIDList &linkList) = 0;
89 
94  virtual bool IsMenuActionEntirelyOnLinkResourceRows(IPMUnknown* widget) = 0;
95 
100  virtual void GetEditOriginalEditorList(AppInfoList& appList, UIDList &resources) = 0;
101 
106  virtual void EditOriginal(ILink *link, const AppInfo& appInfo = kNullAppInfo) = 0;
107 
111  virtual void GoToSource(ILink *link) const = 0;
112 
116  virtual UIDRef GetSingleLinkUIDRefSelectedInLayout() const = 0;
117 
121  virtual UIDList GetLinkUIDsOfSelectedItems() const = 0;
122 
127  virtual UIDList GetResourcesOfLinks(UIDList &links) const = 0;
128 
134  virtual void EditAllOriginals(UIDList &links, UIDList &resources, const AppInfo& appInfo = kNullAppInfo) const = 0;
135 
140  virtual void GoToAllSources(UIDList &links, UIDList &resources) const = 0;
141 
146  virtual void ToggleLinkInfoSectionVisibility(bool onlyShow, bool fitSizeToAvailableInfo) = 0;
147 
150  virtual void UpdateLinkInfoSectionButtonState() = 0;
151 
155  virtual void SetPanelSortProvider(const ILinkInfoProvider* newSortProvider) = 0;
156 
157  /* Unembed the passed in Links, by presenting the user with a browse to file dialog. returns true if it worked, false if not. false usually indicates user cancel.
158  @param targetLinks - links to unembed
159  @param updateLink - if true, update the link
160  @return true if it worked, false if not. false usually indicates user cancel.
161  */
162  virtual bool16 DoUnembedSelectedLinks(const UIDList& targetLinks, bool16 updateLink) const = 0;
163 
168  virtual const ILinkInfoProvider* QueryLinkInfoProviderFromHeaderWidget(const IPMUnknown* widget) = 0;
169 
174  virtual ILinkInfoProvider* QueryInfoProviderFromLinksUIWidget(const IPMUnknown* widget) const = 0;
175 
180  virtual ILink* QueryLinkFromLinksUIWidget(const IPMUnknown* widget) const = 0;
181 
186  virtual ILinkResource* QueryLinkResourceFromLinksUIWidget(const IPMUnknown* widget) const = 0;
187 
192  virtual NodeID_rv CreateNodeFromLinkUIDRef(UIDRef linkUIDRef) = 0;
193 
198  virtual IMetaDataAccess* QueryMetaDataAccessFromLink(const ILink* link) const = 0;
199 
205  virtual IImageCache* QueryThumbnailForLink(const ILink * theLink, const ILinkResource * linkResource) const = 0;
206 
208  virtual void SetupCaptionRowWidget(const IPMUnknown* newRowWidget,const PMString& beforeString, const PMString& providerName,const PMString& afterString) const = 0;
209 
210 
211 };
212 
213 #endif