InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ILinksUIUtils Class Referenceabstract

#include <ILinksUIUtils.h>

Inheritance diagram for ILinksUIUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ILINKSUIUTILS }
 

Public Member Functions

virtual void SelectLinksInPanel (const UIDList &inLinkUIDsToSelect)=0
 
virtual UIDList GetLinksSelectedInPanel (bool16 inDisplayOrder=kFalse)=0
 
virtual UIDList GetLinkResourcesSelectedInPanel (bool16 inDisplayOrder=kFalse)=0
 
virtual UIDList GetLinksForMenuAction (IPMUnknown *widget, bool16 inDisplayOrder=kFalse) const =0
 
virtual bool16 SomeCanEdit (UIDList &linkList)=0
 
virtual bool16 SomeCanGoToSource (UIDList &linkList)=0
 
virtual bool IsMenuActionEntirelyOnLinkResourceRows (IPMUnknown *widget)=0
 
virtual void GetEditOriginalEditorList (AppInfoList &appList, UIDList &resources)=0
 
virtual void EditOriginal (ILink *link, const AppInfo &appInfo=kNullAppInfo)=0
 
virtual void GoToSource (ILink *link) const =0
 
virtual UIDRef GetSingleLinkUIDRefSelectedInLayout () const =0
 
virtual UIDList GetLinkUIDsOfSelectedItems () const =0
 
virtual UIDList GetResourcesOfLinks (UIDList &links) const =0
 
virtual void EditAllOriginals (UIDList &links, UIDList &resources, const AppInfo &appInfo=kNullAppInfo) const =0
 
virtual void GoToAllSources (UIDList &links, UIDList &resources) const =0
 
virtual void ToggleLinkInfoSectionVisibility (bool onlyShow, bool fitSizeToAvailableInfo)=0
 
virtual void UpdateLinkInfoSectionButtonState ()=0
 
virtual void SetPanelSortProvider (const ILinkInfoProvider *newSortProvider)=0
 
virtual bool16 DoUnembedSelectedLinks (const UIDList &targetLinks, bool16 updateLink) const =0
 
virtual const ILinkInfoProviderQueryLinkInfoProviderFromHeaderWidget (const IPMUnknown *widget)=0
 
virtual ILinkInfoProviderQueryInfoProviderFromLinksUIWidget (const IPMUnknown *widget) const =0
 
virtual ILinkQueryLinkFromLinksUIWidget (const IPMUnknown *widget) const =0
 
virtual ILinkResourceQueryLinkResourceFromLinksUIWidget (const IPMUnknown *widget) const =0
 
virtual NodeID_rv CreateNodeFromLinkUIDRef (UIDRef linkUIDRef)=0
 
virtual IMetaDataAccessQueryMetaDataAccessFromLink (const ILink *link) const =0
 
virtual IImageCacheQueryThumbnailForLink (const ILink *theLink, const ILinkResource *linkResource) const =0
 
virtual void SetupCaptionRowWidget (const IPMUnknown *newRowWidget, const PMString &beforeString, const PMString &providerName, const PMString &afterString) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Utility interface to interact with links panel. Provides access to various routines that may be generally useful.

See Also
ILinkInfoProvider, ILinksUIPanelPrefs

Member Function Documentation

virtual NodeID_rv ILinksUIUtils::CreateNodeFromLinkUIDRef (UIDRef linkUIDRef)
pure virtual

Given a link UIDRef, this creates a Node which will match the existing node in the tree for this link

Parameters
linkUIDRef- UIDRef of the link to create a node for
Returns
- Node that represents the link
virtual void ILinksUIUtils::EditAllOriginals (UIDListlinks,
UIDListresources,
const AppInfoappInfo = kNullAppInfo 
) const
pure virtual

Calls edit original for first link that refers to each resource in the list.

Parameters
links- links to edit in an external application
resources- resources associated with the links in links. use GetResourcesOfLinks to get the list of resources.
appInfo- application to use to edit the links. if kNullAppInfo, then use the default applications
virtual void ILinksUIUtils::EditOriginal (ILinklink,
const AppInfoappInfo = kNullAppInfo 
)
pure virtual

Attempts to edit the resource associated with the passed in link, using either the default editor or the one passed in.

Parameters
link- link to edit in an external application
appInfo- application to use to edit the link. if kNullAppInfo, then use the default application
virtual void ILinksUIUtils::GetEditOriginalEditorList (AppInfoListappList,
UIDListresources 
)
pure virtual

Gets a list of apps which might be able to edit the passed in link resources

Parameters
appList- [out] list of applications registered for editing the link resource files.
resources- list of UID's of link resources you want the editors for.
virtual UIDList ILinksUIUtils::GetLinkResourcesSelectedInPanel (bool16 inDisplayOrder = kFalse)
pure virtual

Returns a list of LinkResource UIDs corresponding to the selected rows in the links panel

Parameters
inDisplayOrder- in the order of their display in the links panel
Returns
- list of UID's of resources selected in the links panel
virtual UIDList ILinksUIUtils::GetLinksForMenuAction (IPMUnknownwidget,
bool16 inDisplayOrder = kFalse 
) const
pure virtual

if widget is in selected links, it returns the selected links, if not, it returns the link represented by the widget

Parameters
widget- widget that was clicked on for the menu. This could be a row inside or outside the selection
inDisplayOrder- in the order of their display in the links panel
Returns
list of selected links or the link represented by widget if widget is outside the selection
virtual UIDList ILinksUIUtils::GetLinksSelectedInPanel (bool16 inDisplayOrder = kFalse)
pure virtual

Returns a list of Link UIDs corresponding to the selected rows in the links panel

Parameters
inDisplayOrder- in the order of their display in the links panel
Returns
- list of UID's of selected links
virtual UIDList ILinksUIUtils::GetLinkUIDsOfSelectedItems () const
pure virtual

Gets the UIDRefs for the links selected in layout. If there are no links selected, this returns an empty list

Returns
list of UID's of links selected in the layout window. The list can be empty.
virtual UIDList ILinksUIUtils::GetResourcesOfLinks (UIDListlinks) const
pure virtual

Gets the UIDRefs for the resources selected in layout. It returns no duplicates.

Parameters
links- links you want the resource of
Returns
a list of UID's of resources associated with the links. Duplicates are removed.
virtual UIDRef ILinksUIUtils::GetSingleLinkUIDRefSelectedInLayout () const
pure virtual

Gets the UIDRef for the link selected in the window. If there are no links selected, or multiple links selected, this returns kInvalidUIDRef

Returns
UIDRef of selected link or kInvalidUIDRef if there is 0 or multiple links selected
virtual void ILinksUIUtils::GoToAllSources (UIDListlinks,
UIDListresources 
) const
pure virtual

Calls GoToSource for first link that refers to each resource in the list.

Parameters
links- links to open
resources- resources associated with the links in links. use GetResourcesOfLinks to get the list of resources.
virtual void ILinksUIUtils::GoToSource (ILinklink) const
pure virtual

Attempts to open the resource associated with the passed in link.

Parameters
link- link to open in InDesign.
virtual bool ILinksUIUtils::IsMenuActionEntirelyOnLinkResourceRows (IPMUnknownwidget)
pure virtual

Examines panel selection and passed in panel widget to determine if the current panel selection + passed in widget suggests that menus should work on LinkResources, as opposed to Links

Parameters
widget- Widget under the click for the menu.
Returns
true if widget or selection is comprised only of link resources.
virtual ILinkInfoProvider* ILinksUIUtils::QueryInfoProviderFromLinksUIWidget (const IPMUnknownwidget) const
pure virtual

Query for the ILinkInfoProvider associated with this widget in a row in the tree. If this is not a widget in the tree row, will return nil

Parameters
widget- widget in a tree row
Returns
- ILinkInfoProvider for the widget or nil if this isn't in a tree row.
virtual ILink* ILinksUIUtils::QueryLinkFromLinksUIWidget (const IPMUnknownwidget) const
pure virtual

Query for the ILink associated with this widget in a row in the tree. If this is not a widget in the tree row, will return nil

Parameters
widget- widget in a tree row
Returns
- ILink for the widget or nil if this isn't in a tree row.
virtual const ILinkInfoProvider* ILinksUIUtils::QueryLinkInfoProviderFromHeaderWidget (const IPMUnknownwidget)
pure virtual

Query for the ILinkInfoProvider associated with this header widget. If this is not a header widget, will return nil

Parameters
widget- header widget
Returns
- ILinkInfoProvider for the header or nil if this isn't a header.
virtual ILinkResource* ILinksUIUtils::QueryLinkResourceFromLinksUIWidget (const IPMUnknownwidget) const
pure virtual

Query for the ILinkResource associated with this widget in a row in the tree. If this is not a widget in the tree row, will return nil

Parameters
widget- widget in a tree row
Returns
- ILinkResource for the widget or nil if this isn't in a tree row.
virtual IMetaDataAccess* ILinksUIUtils::QueryMetaDataAccessFromLink (const ILinklink) const
pure virtual

Given a link UIDRef, this returns an addref'd IMetaDataAccess, if one can be found

Parameters
link- UIDRef of a link
Returns
IMetaDataAccess for that link or nil if not found
virtual IImageCache* ILinksUIUtils::QueryThumbnailForLink (const ILinktheLink,
const ILinkResourcelinkResource 
) const
pure virtual

Queries for an IImageCache for the given link,linkresource combination. May return nil.

Parameters
theLink- an ILink for a link
linkResource- an ILinkResource for a link resource
Returns
- an IImageCache for the given link,linkresource combination. May return nil.
virtual void ILinksUIUtils::SelectLinksInPanel (const UIDListinLinkUIDsToSelect)
pure virtual

Given a list of link UIDs, select the corresponding rows in the links panel

Parameters
inLinkUIDsToSelect- UID's of links to select
virtual void ILinksUIUtils::SetPanelSortProvider (const ILinkInfoProvidernewSortProvider)
pure virtual

Set a new sort provider for the links panel

Parameters
newSortProvider- new sort provider
virtual void ILinksUIUtils::SetupCaptionRowWidget (const IPMUnknownnewRowWidget,
const PMStringbeforeString,
const PMStringproviderName,
const PMStringafterString 
) const
pure virtual

Sets up a new row widget for the caption setup dialog

virtual bool16 ILinksUIUtils::SomeCanEdit (UIDListlinkList)
pure virtual

returns true if at least one of the links in the passed in list are editable

Parameters
linkList- list of UID's of links
Returns
true if one or more links are editable. An example of an un-editable link would be an embedded link.
virtual bool16 ILinksUIUtils::SomeCanGoToSource (UIDListlinkList)
pure virtual

returns true if at least one of the links in the passed in list are openable in InDesign i.e. are SharedContent links.

Parameters
linkList- list of UID's of links
Returns
true if one or more links can be opened.
virtual void ILinksUIUtils::ToggleLinkInfoSectionVisibility (bool onlyShow,
bool fitSizeToAvailableInfo 
)
pure virtual

show/hide link info section. If onlyShow bool is true, it will not toggle visible to hidden

Parameters
onlyShow- if true, it only shows and doesn't hide
fitSizeToAvailableInfo- true to resize based on content
virtual void ILinksUIUtils::UpdateLinkInfoSectionButtonState ()
pure virtual

Updates the state of the link info show/hide button. The icon switches to indicate if it's showing or hiding.