1999-11-16 01:51:39 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 11:12:37 +00:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-11-16 01:51:39 +00:00
|
|
|
|
|
|
|
#ifndef nsBaseFilePicker_h__
|
|
|
|
#define nsBaseFilePicker_h__
|
|
|
|
|
2009-04-01 21:59:02 +00:00
|
|
|
#include "nsISupports.h"
|
1999-11-16 01:51:39 +00:00
|
|
|
#include "nsIFilePicker.h"
|
2002-09-07 05:23:45 +00:00
|
|
|
#include "nsISimpleEnumerator.h"
|
2009-03-30 18:08:06 +00:00
|
|
|
#include "nsArrayEnumerator.h"
|
2009-04-01 21:59:02 +00:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
2014-10-08 16:15:22 +00:00
|
|
|
class nsPIDOMWindow;
|
2009-04-01 21:59:02 +00:00
|
|
|
class nsIWidget;
|
1999-11-16 01:51:39 +00:00
|
|
|
|
|
|
|
class nsBaseFilePicker : public nsIFilePicker
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsBaseFilePicker();
|
|
|
|
virtual ~nsBaseFilePicker();
|
|
|
|
|
2004-04-21 23:38:22 +00:00
|
|
|
NS_IMETHOD Init(nsIDOMWindow *aParent,
|
|
|
|
const nsAString& aTitle,
|
2012-08-22 15:56:38 +00:00
|
|
|
int16_t aMode);
|
1999-11-16 01:51:39 +00:00
|
|
|
|
2012-08-17 15:35:01 +00:00
|
|
|
NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback);
|
2012-08-22 15:56:38 +00:00
|
|
|
NS_IMETHOD AppendFilters(int32_t filterMask);
|
|
|
|
NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex);
|
|
|
|
NS_IMETHOD SetFilterIndex(int32_t aFilterIndex);
|
2002-09-07 05:23:45 +00:00
|
|
|
NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles);
|
2012-06-06 02:08:30 +00:00
|
|
|
NS_IMETHOD GetDisplayDirectory(nsIFile * *aDisplayDirectory);
|
|
|
|
NS_IMETHOD SetDisplayDirectory(nsIFile * aDisplayDirectory);
|
2011-09-29 06:19:26 +00:00
|
|
|
NS_IMETHOD GetAddToRecentDocs(bool *aFlag);
|
|
|
|
NS_IMETHOD SetAddToRecentDocs(bool aFlag);
|
2013-07-22 12:46:27 +00:00
|
|
|
NS_IMETHOD GetMode(int16_t *aMode);
|
2000-08-25 02:17:53 +00:00
|
|
|
|
2015-05-18 13:52:26 +00:00
|
|
|
NS_IMETHOD GetDomfile(nsISupports** aDomfile);
|
2013-03-19 17:49:16 +00:00
|
|
|
NS_IMETHOD GetDomfiles(nsISimpleEnumerator** aDomfiles);
|
|
|
|
|
1999-11-16 01:51:39 +00:00
|
|
|
protected:
|
2000-08-25 02:17:53 +00:00
|
|
|
|
2013-07-22 09:12:32 +00:00
|
|
|
virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle) = 0;
|
1999-11-16 01:51:39 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool mAddToRecentDocs;
|
2012-06-06 02:08:30 +00:00
|
|
|
nsCOMPtr<nsIFile> mDisplayDirectory;
|
2014-10-10 16:00:34 +00:00
|
|
|
|
|
|
|
// This is an innerWindow.
|
2014-10-08 16:15:22 +00:00
|
|
|
nsCOMPtr<nsPIDOMWindow> mParent;
|
2013-07-22 09:12:32 +00:00
|
|
|
int16_t mMode;
|
1999-11-16 01:51:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsBaseFilePicker_h__
|