InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PnlTrvUtils Class Reference

#include <PnlTrvUtils.h>

Static Public Member Functions

static PMString TruncatePath (const PMString &fromthis)
 
static UIDRef ImportImageAndLoadPlaceGun (const UIDRef &docUIDRef, const PMString &fromPath)
 
static IControlViewGetWidgetOnPanel (const WidgetID &panelWidgetID, const WidgetID &widgetID)
 
static PMString GetFolderSelectedPath ()
 

Detailed Description

A collection of miscellaneous utility methods used by this plug-in.

Member Function Documentation

PMString PnlTrvUtils::GetFolderSelectedPath ()
static

Get path the user has chosen, if it exists

Returns
PMString containing path selected by user, empty if none chosen
IControlView * PnlTrvUtils::GetWidgetOnPanel (const WidgetIDpanelWidgetID,
const WidgetIDwidgetID 
)
static

Get a widget from the specified panel by WidgetID, returning nil if it can't be found.

Parameters
panelWidgetID[IN] specifies the parent widget
widgetID[IN] sought dependent widget
Returns
interface ptr to widget found or nil if it can't be found; not a reference incremented one though.
UIDRef PnlTrvUtils::ImportImageAndLoadPlaceGun (const UIDRefdocUIDRef,
const PMStringfromPath 
)
static

Attempt to import item (which can be any format) from path; loads place gun if item can be imported.

Parameters
docUIDRef[IN] specifies document into which item would be placed
fromPath[IN] specifies the path in the local filesystem of the item to attempt to import
Returns
UIDRef of item imported, or UIDRef::gNull otherwise
PMString PnlTrvUtils::TruncatePath (const PMStringfromthis)
static

Return a version of the supplied path which consists only of the file 'name', removing everything up to and including the last path separator.

Parameters
fromthis[IN] path of interest
Returns
string containing the path-part minus the last segment