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

#include <SDKFileHelper.h>

Inheritance diagram for SDKFolderChooser:
SDKFileHelper

Public Member Functions

 SDKFolderChooser ()
 
virtual ~SDKFolderChooser ()
 
void ShowDialog ()
 
void SetTitle (const PMString &title)
 
- 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

void initFromSysFile ()
 
- 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 ()
 

Detailed Description

Provides a mechanism for the user to choose a folder.

The code below pops a folder chooser dialog.


SDKFolderChooser folderChooser;

folderChooser.ShowDialog();

if (folderChooser.IsChosen()) {

    IDFile chosenFolder = folderChooser.GetIDFile();

}

See Also
ISelectFolderDialog
kSelectFolderDialogBoss

Constructor & Destructor Documentation

SDKFolderChooser::SDKFolderChooser ()

Constructor.

SDKFolderChooser::~SDKFolderChooser ()
virtual

Destructor.

Member Function Documentation

void SDKFolderChooser::SetTitle (const PMStringtitle)

Set the title of the dialog.

Parameters
titleIN dialog title (translatable string keys passed here will be translated before display in the dialog).
void SDKFolderChooser::ShowDialog ()

Pops a dialog to allow the user to choose a folder.

Postcondition
SDKFileHelper::IsChosen is kTrue if a folder was chosen, kFalse otherwise.
SDKFileHelper::GetIDFile contains the chosen folder if SDKFileHelper::IsChosen is kTrue.
SDKFileHelper::GetPath contains the path to the chosen folder if SDKFileHelper::IsChosen is kTrue.