VCOM:VectorWorks:Filing:IFolderChooserDialog
From Vectorworks Developer
.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference
Description
namespaceVectorWorks::Filing
Instance of this interface represent one folder in the OS.
This interface allows you to ask the user to choose a folder. The OS choose folder dialog is shown to do that.
Interface
// ---------------------------------------------------------------------------------------------------- // {A162E405-E859-4e0c-B5C8-959C9BEC0565} static const VWIID IID_FolderChooserDialog = { 0xa162e405, 0xe859, 0x4e0c, { 0xb5, 0xc8, 0x95, 0x9c, 0x9b, 0xec, 0x5, 0x65 } }; class IFolderChooserDialog : public IVWUnknown { public: virtual VCOMError VCOM_CALLTYPE SetTitle(const TXString& title) = 0; virtual VCOMError VCOM_CALLTYPE SetDescription(const TXString& desc) = 0; virtual VCOMError VCOM_CALLTYPE GetSelectedPath(IFolderIdentifier** ppOutFolderID) = 0; virtual VCOMError VCOM_CALLTYPE SetSelectedPath(IFolderIdentifier* pFolderID) = 0; virtual VCOMError VCOM_CALLTYPE RunDialog() = 0; };
Members
SetTitle Set the title of the dialog that is to be opened. SetDescription Set description text for the dialog. GetSelectedPath Retrieve the selected path after the dialog is closed. SetSelectedPath Set default path for when the dialog opens. RunDialog Shows the dialog.
Remarks
There is predefined type for smart VCOM pointer VCOMPtr to IFolderChooserDialog:typedef VCOMPtr< IFolderChooserDialog > IFolderChooserDialogPtr;
Example
IFolderChooserDialogPtr folderDlg( IID_FolderChooserDialog ); vcomErr = folderDlg->SetTitle( "This is title" ); vcomErr = folderDlg->SetDescription( "this is desc" ); if ( VCOM_SUCCEEDED( folderDlg->RunDialog() ) ) { IFolderIdentifierPtr folderID; vcomErr = folderDlg->GetSelectedPath( & folderID ); // ... }
Version
Available from: VectorWorks 12See Also
VCOM:VCOMPtr | VCOM:VectorWorks:Filing:IFolderIdentifier[[VCOM:VCOMPtr]] | [[VCOM:VectorWorks:Filing:IFolderIdentifier]]