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"
|
|
|
|
|
|
|
|
class nsIWidget;
|
1999-11-16 04:51:39 +03:00
|
|
|
|
2005-01-14 14:41:37 +03:00
|
|
|
#define BASEFILEPICKER_HAS_DISPLAYDIRECTORY 1
|
|
|
|
|
1999-11-16 04:51:39 +03:00
|
|
|
class nsBaseFilePicker : public nsIFilePicker
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsBaseFilePicker();
|
|
|
|
virtual ~nsBaseFilePicker();
|
|
|
|
|
2004-04-22 03:38:22 +04:00
|
|
|
NS_IMETHOD Init(nsIDOMWindow *aParent,
|
|
|
|
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);
|
2005-01-14 14:41:37 +03:00
|
|
|
#ifdef BASEFILEPICKER_HAS_DISPLAYDIRECTORY
|
2012-06-06 06:08:30 +04:00
|
|
|
NS_IMETHOD GetDisplayDirectory(nsIFile * *aDisplayDirectory);
|
|
|
|
NS_IMETHOD SetDisplayDirectory(nsIFile * aDisplayDirectory);
|
2005-01-14 14:41:37 +03:00
|
|
|
#endif
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHOD GetAddToRecentDocs(bool *aFlag);
|
|
|
|
NS_IMETHOD SetAddToRecentDocs(bool aFlag);
|
2000-08-25 06:17:53 +04:00
|
|
|
|
1999-11-16 04:51:39 +03:00
|
|
|
protected:
|
2000-08-25 06:17:53 +04:00
|
|
|
|
2004-04-22 03:38:22 +04:00
|
|
|
virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle,
|
2012-08-22 19:56:38 +04:00
|
|
|
int16_t aMode) = 0;
|
1999-11-16 04:51:39 +03:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mAddToRecentDocs;
|
2005-01-14 14:41:37 +03:00
|
|
|
#ifdef BASEFILEPICKER_HAS_DISPLAYDIRECTORY
|
2012-06-06 06:08:30 +04:00
|
|
|
nsCOMPtr<nsIFile> mDisplayDirectory;
|
2005-01-14 14:41:37 +03:00
|
|
|
#endif
|
1999-11-16 04:51:39 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsBaseFilePicker_h__
|