1999-11-16 04:51:39 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 15:12:37 +04: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 04:51:39 +03:00
|
|
|
|
|
|
|
#ifndef nsBaseFilePicker_h__
|
|
|
|
#define nsBaseFilePicker_h__
|
|
|
|
|
2009-04-02 01:59:02 +04:00
|
|
|
#include "nsISupports.h"
|
1999-11-16 04:51:39 +03:00
|
|
|
#include "nsIFilePicker.h"
|
2002-09-07 09:23:45 +04:00
|
|
|
#include "nsISimpleEnumerator.h"
|
2009-03-30 22:08:06 +04:00
|
|
|
#include "nsArrayEnumerator.h"
|
2009-04-02 01:59:02 +04:00
|
|
|
#include "nsCOMPtr.h"
|
2016-08-24 02:07:21 +03:00
|
|
|
#include "nsString.h"
|
2009-04-02 01:59:02 +04:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
class nsPIDOMWindowOuter;
|
2009-04-02 01:59:02 +04:00
|
|
|
class nsIWidget;
|
1999-11-16 04:51:39 +03:00
|
|
|
|
|
|
|
class nsBaseFilePicker : public nsIFilePicker
|
|
|
|
{
|
2017-08-06 07:15:31 +03:00
|
|
|
class AsyncShowFilePicker;
|
1999-11-16 04:51:39 +03:00
|
|
|
public:
|
|
|
|
nsBaseFilePicker();
|
|
|
|
virtual ~nsBaseFilePicker();
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
NS_IMETHOD Init(mozIDOMWindowProxy* aParent,
|
2004-04-22 03:38:22 +04:00
|
|
|
const nsAString& aTitle,
|
2012-08-22 19:56:38 +04:00
|
|
|
int16_t aMode);
|
1999-11-16 04:51:39 +03:00
|
|
|
|
2012-08-17 19:35:01 +04:00
|
|
|
NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback);
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD AppendFilters(int32_t filterMask);
|
|
|
|
NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex);
|
|
|
|
NS_IMETHOD SetFilterIndex(int32_t aFilterIndex);
|
2002-09-07 09:23:45 +04:00
|
|
|
NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles);
|
2012-06-06 06:08:30 +04:00
|
|
|
NS_IMETHOD GetDisplayDirectory(nsIFile * *aDisplayDirectory);
|
|
|
|
NS_IMETHOD SetDisplayDirectory(nsIFile * aDisplayDirectory);
|
2017-04-26 19:20:19 +03:00
|
|
|
NS_IMETHOD GetDisplaySpecialDirectory(nsAString& aDisplayDirectory);
|
|
|
|
NS_IMETHOD SetDisplaySpecialDirectory(const nsAString& aDisplayDirectory);
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHOD GetAddToRecentDocs(bool *aFlag);
|
|
|
|
NS_IMETHOD SetAddToRecentDocs(bool aFlag);
|
2013-07-22 16:46:27 +04:00
|
|
|
NS_IMETHOD GetMode(int16_t *aMode);
|
2016-08-24 02:07:21 +03:00
|
|
|
NS_IMETHOD SetOkButtonLabel(const nsAString& aLabel);
|
|
|
|
NS_IMETHOD GetOkButtonLabel(nsAString& aLabel);
|
2000-08-25 06:17:53 +04:00
|
|
|
|
2016-01-12 22:18:15 +03:00
|
|
|
NS_IMETHOD GetDomFileOrDirectory(nsISupports** aValue);
|
|
|
|
NS_IMETHOD GetDomFileOrDirectoryEnumerator(nsISimpleEnumerator** aValue);
|
2013-03-19 21:49:16 +04:00
|
|
|
|
1999-11-16 04:51:39 +03:00
|
|
|
protected:
|
2000-08-25 06:17:53 +04:00
|
|
|
|
2013-07-22 13:12:32 +04:00
|
|
|
virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle) = 0;
|
2017-08-06 07:15:31 +03:00
|
|
|
virtual nsresult Show(int16_t *_retval) = 0;
|
1999-11-16 04:51:39 +03:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mAddToRecentDocs;
|
2012-06-06 06:08:30 +04:00
|
|
|
nsCOMPtr<nsIFile> mDisplayDirectory;
|
2017-04-26 19:20:19 +03:00
|
|
|
nsString mDisplaySpecialDirectory;
|
2014-10-10 20:00:34 +04:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
nsCOMPtr<nsPIDOMWindowOuter> mParent;
|
2013-07-22 13:12:32 +04:00
|
|
|
int16_t mMode;
|
2016-08-24 02:07:21 +03:00
|
|
|
nsString mOkButtonLabel;
|
1999-11-16 04:51:39 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsBaseFilePicker_h__
|