![]() | InDesign SDK 20.5 |
#include <SDKFileHelper.h>

Public Member Functions | |
| SDKFilePlaceChooser () | |
| virtual | ~SDKFilePlaceChooser () |
| void | ShowDialog () |
| void | SetShowFilterPrefs (bool16 showFilterPrefs) |
| void | SetRetainFormat (bool16 retainFormat) |
| void | SetConvertQuotes (bool16 convertQuotes) |
| void | SetReplaceSelectedItem (bool16 replaceSelectedItem) |
| void | SetApplyCJKGrid (bool16 applyGrid) |
| void | SetShowPreview (bool16 showPreview) |
| bool16 | GetShowFilterPrefs () const |
| bool16 | GetRetainFormat () const |
| bool16 | GetConvertQuotes () const |
| bool16 | GetReplaceSelectedItem () const |
| bool16 | GetApplyCJKGrid () const |
| bool16 | GetShowPreview () const |
Public Member Functions inherited from SDKFileHelper | |
| SDKFileHelper (const PMString &path) | |
| SDKFileHelper (const IDFile &file) | |
| virtual | ~SDKFileHelper () |
| bool16 | IsExisting () const |
| bool16 | IsChosen () const |
| PMString | GetPath () const |
| IDFile | GetIDFile () const |
| IDFile | GetAbsoluteFromRelative (const PMString &relativePath) const |
| PMString | GetParentFolderAsString () const |
Protected Member Functions | |
| IImportManager * | queryImportManager () |
| IImportManagerOptions * | queryImportManagerOptions () |
Protected Member Functions inherited from SDKFileHelper | |
| SDKFileHelper () | |
| void | initFromString () |
| void | initFromSysFile () |
| void | traceInitializeDiagnostics (int32 e) const |
| PMString | calcDefaultFileName () const |
| void | setChosen (bool16 chsen) |
| void | setIDFile (const IDFile &file) |
| void | setPath (const PMString &path) |
| PMString | absoluteFromRelative (const PMString &folder, const PMString &path) const |
| bool16 | isAbsolutePath (const PMString &path) const |
| bool16 | isUnixPath (const PMString &path) const |
| bool16 | isMacPath (const PMString &path) const |
| bool16 | isWinPath (const PMString &path) const |
| PMString | getMinusLastElement (const PMString &path) const |
| PMString | getMinusFirstElement (const PMString &path) const |
| PMString | getAsMacPath (const PMString &path) const |
| PMString | getAsWinPath (const PMString &path) const |
Additional Inherited Members | |
Static Public Member Functions inherited from SDKFileHelper | |
| static bool16 | isMacPosixPathEnabled () |
Provides a mechanism for the user to choose a file to be placed, note this class does not actually place the file, it just lets the user choose a file.
The code below pops a file place chooser dialog for all importable files.
SDKFilePlaceChooser fileChooser; fileChooser.ShowDialog(); if (fileChooser.IsChosen()) { IDFile chosenFile = fileChooser.GetIDFile(); }
The options available on the file place chooser dialog can be set by the caller before the dialog is opened. For example call SDKFilePlaceChooser::SetShowPreview to control the state of the preview checkbox. Once the dialog has been dismissed the options given by the user can be obtained, for example call SDKFilePlaceChooser::SetShowFilterPrefs to see if the import provider's option dialog should be shown when the file is actually imported.
| SDKFilePlaceChooser::SDKFilePlaceChooser | ( | ) |
Constructor.
| virtual |
Destructor.
| bool16 SDKFilePlaceChooser::GetApplyCJKGrid | ( | ) | const |
| bool16 SDKFilePlaceChooser::GetConvertQuotes | ( | ) | const |
| bool16 SDKFilePlaceChooser::GetReplaceSelectedItem | ( | ) | const |
| bool16 SDKFilePlaceChooser::GetRetainFormat | ( | ) | const |
| bool16 SDKFilePlaceChooser::GetShowFilterPrefs | ( | ) | const |
| bool16 SDKFilePlaceChooser::GetShowPreview | ( | void | ) | const |
| protected |
Query the service registry for the IImportManager service.
| protected |
Query the service registry for the import manager service's options.
| void SDKFilePlaceChooser::SetApplyCJKGrid | ( | bool16 | applyGrid | ) |
Set state of IImportManagerOption's applyCJKGrid option.
| applyGrid | IN kTrue if dialog checkbox should be checked, kFalse unchecked. |
| void SDKFilePlaceChooser::SetConvertQuotes | ( | bool16 | convertQuotes | ) |
Set state of IImportManagerOption's convertQuotes option.
| convertQuotes | IN kTrue if dialog checkbox should be checked, kFalse unchecked. |
| void SDKFilePlaceChooser::SetReplaceSelectedItem | ( | bool16 | replaceSelectedItem | ) |
Set state of IImportManagerOption's replaceSelectedItem option.
| replaceSelectedItem | IN kTrue if dialog checkbox should be checked, kFalse unchecked. |
| void SDKFilePlaceChooser::SetRetainFormat | ( | bool16 | retainFormat | ) |
Set state of IImportManagerOption's retainFormatoption.
| retainFormat | IN kTrue if dialog checkbox should be checked, kFalse unchecked. |
| void SDKFilePlaceChooser::SetShowFilterPrefs | ( | bool16 | showFilterPrefs | ) |
Set state of IImportManagerOption's showFilterPrefs option.
| showFilterPrefs | IN kTrue if dialog checkbox should be checked, kFalse unchecked. |
| void SDKFilePlaceChooser::SetShowPreview | ( | bool16 | showPreview | ) |
Set state of IImportManagerOption's showPreview option.
| showPreview | IN kTrue if dialog checkbox should be checked, kFalse unchecked. |
| void SDKFilePlaceChooser::ShowDialog | ( | ) |
Pops a file browse dialog to allow the user to choose a file to be placed.