struct CCL::IFileSelector
Overview
File selector interface. More…
#include <ifileselector.h> struct IFileSelector: public CCL::IUnknown { // enums enum SaveBehavior; enum Type; // methods virtual void CCL_API addFilter (const FileType& type) = 0; virtual int CCL_API countFilters () const = 0; virtual const FileType*CCL_API getFilter (int index) const = 0; virtual void CCL_API setHook (IUnknown* hook) = 0; virtual void CCL_API setFolder (UrlRef path) = 0; virtual void CCL_API setFileName (StringRef fileName) = 0; virtual tbool CCL_API run ( int type, StringRef title = nullptr, int filterIndex = 0, IWindow* window = nullptr ) = 0; virtual IAsyncOperation*CCL_API runAsync ( int type, StringRef title = nullptr, int filterIndex = 0, IWindow* window = nullptr ) = 0; virtual int CCL_API countPaths () const = 0; virtual IUrl*CCL_API getPath (int index = 0) const = 0; virtual int CCL_API getSaveBehavior () const = 0; virtual void CCL_API setSaveContent (UrlRef url) = 0; };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
File selector interface.
Created with ClassID::FileSelector
Methods
virtual void CCL_API addFilter (const FileType& type) = 0
Add file type filter.
virtual int CCL_API countFilters () const = 0
Get number of file type filters.
virtual const FileType*CCL_API getFilter (int index) const = 0
Get file type filter by index.
virtual void CCL_API setHook (IUnknown* hook) = 0
Set hook object (IFileSelectorHook for notifications, IViewFactory for custom view on macOS).
virtual void CCL_API setFolder (UrlRef path) = 0
Set initial folder.
virtual void CCL_API setFileName (StringRef fileName) = 0
Set initial filename.
virtual tbool CCL_API run ( int type, StringRef title = nullptr, int filterIndex = 0, IWindow* window = nullptr ) = 0
Run file selector.
virtual IAsyncOperation*CCL_API runAsync ( int type, StringRef title = nullptr, int filterIndex = 0, IWindow* window = nullptr ) = 0
Run file selector asynchronously.
virtual int CCL_API countPaths () const = 0
Get number of paths selected.
virtual IUrl*CCL_API getPath (int index = 0) const = 0
Get path from result list.
virtual int CCL_API getSaveBehavior () const = 0
Get platform-specific save behavior.
virtual void CCL_API setSaveContent (UrlRef url) = 0
Set content to be saved.