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

Public Member Functions

 SnpChooseFile ()
 
virtual ~SnpChooseFile ()
 
ErrorCode ChooseDocumentToOpen (IDFile &chosenFile)
 
ErrorCode ChooseFileToOpen (IDFile &chosenFile)
 
ErrorCode ChooseMultiFilesToOpen (K2Vector< IDFile > &chosenFileList)
 
ErrorCode ChooseFileToSave (IDFile &chosenFile)
 
ErrorCode ChooseFileToPlace (IDFile &chosenFile)
 
ErrorCode ChooseFolder (IDFile &chosenFolder)
 

Detailed Description

  • How to pop a browse dialog to choose a document to be opened,
  • how to pop a browse dialog to choose a file to be opened,
  • how to pop a browse dialog to choose a file to be saved,
  • how to filter the files these dialogs show,
  • how to pop a browse dialog to choose a file to be placed,
  • how to pop a browse dialog to choose a folder.

Note this snippet does not actually open, save or place any files, it just shows how to use file browse dialogs to choose files. Taking an action such as opening, saving or placing the chosen file is not within the scope of this snippet.

See Also
SDKFileHelper
FileTypeRegistry
ShuksanID.h

Constructor & Destructor Documentation

SnpChooseFile::SnpChooseFile ()
inline

Constructor.

virtual SnpChooseFile::~SnpChooseFile ()
inlinevirtual

Destructor.

Member Function Documentation

ErrorCode SnpChooseFile::ChooseDocumentToOpen (IDFilechosenFile)

Shows how to use SDKFileDocumentChooser to allow the user to choose a document to be opened. Note that the file is not actually opened by this method, all that happens is the user is allowed to choose a document using a document file browse dialog.

Parameters
chosenFileis the file selected by the user.
Returns
kSuccess if file was chosen, kCancel otherwise.
ErrorCode SnpChooseFile::ChooseFileToOpen (IDFilechosenFile)

Shows how to use SDKFileOpenChooser to allow the user to choose a file to be opened. Note that the file is not actually opened by this method, all that happens is the user is allowed to choose a file using an open file browse dialog.

Parameters
chosenFileis the file selected by the user.
Returns
kSuccess if file was chosen, kCancel otherwise.
ErrorCode SnpChooseFile::ChooseFileToPlace (IDFilechosenFile)

Shows how to use SDKFilePlaceChooser to allow the user to choose a file. Note that the file is not actually placed by this method, all that happens is the user is allowed to choose a file using a place file browse dialog.

Parameters
chosenFileis the file selected by the user.
Returns
kSuccess if file was chosen, kCancel otherwise.
ErrorCode SnpChooseFile::ChooseFileToSave (IDFilechosenFile)

Shows how to use SDKFileSaveChooser to allow the user to choose a file. Note that the file is not actually saved by this method, all that happens is the user is allowed to choose a file using a save file browse dialog.

Parameters
chosenFileis the file selected by the user.
Returns
kSuccess if file was chosen, kCancel otherwise.
ErrorCode SnpChooseFile::ChooseFolder (IDFilechosenFolder)

Shows how to use SDKFolderChooser to allow the user to choose a folder.

Parameters
chosenFolderis the folder chosen by the user.
Returns
kSuccess if folder was chosen, kCancel otherwise.
ErrorCode SnpChooseFile::ChooseMultiFilesToOpen (K2Vector< IDFile > & chosenFileList)

Shows how to use SDKFileOpenChooser to allow the user to choose multiple files to be opened. Note that these files are not actually opened by this method, all that happens is the user is allowed to choose files using an open file browse dialog.

Parameters
chosenFileListis the file list selected by the user.
Returns
kSuccess if file was chosen, kCancel otherwise.