Add new GetFile method that uses an nsFileSpec instead of an nsString

git-svn-id: svn://10.0.0.236/trunk@25985 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sdagley%netscape.com
1999-04-02 02:06:16 +00:00
parent d1a2dd4e7d
commit fa6239efa1
3 changed files with 19 additions and 1 deletions

View File

@@ -20,6 +20,7 @@
#define nsIFileWidget_h__
#include "nsString.h"
#include "nsFileSpec.h"
// {F8030015-C342-11d1-97F0-00609703C14E}
#define NS_IFILEWIDGET_IID \
@@ -34,7 +35,10 @@ enum nsMode {
/// Load a file or directory
eMode_load,
/// Save a file or directory
eMode_save };
eMode_save,
/// Select a fodler/directory
eMode_getfolder
};
/**
* File selector widget.
@@ -94,6 +98,14 @@ public:
*/
NS_IMETHOD GetFile(nsString& aFile) = 0;
/**
* Get the nsFileSpec for the file or directory.
*
* @param aFile on exit it contains the file or directory selected
*/
NS_IMETHOD GetFile(nsFileSpec& aFile) = 0;
/**

View File

@@ -227,6 +227,11 @@ NS_IMETHODIMP nsFileWidget::GetFile(nsString& aFile)
return NS_OK;
}
NS_IMETHODIMP nsFileWidget::GetFile(nsFileSpec& aFile)
{
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Get the file + path

View File

@@ -67,6 +67,7 @@ class nsFileWidget : public nsWindow, public nsIFileWidget
virtual PRBool Show();
NS_IMETHOD GetFile(nsString& aFile);
NS_IMETHOD GetFile(nsFileSpec& aFile);
NS_IMETHOD SetDefaultString(nsString& aString);
NS_IMETHOD SetFilterList(PRUint32 aNumberOfFilters,
const nsString aTitles[],