2010-09-30 08:37:36 -07:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
2012-05-21 04:12:37 -07: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/. */
|
2010-09-30 08:37:36 -07:00
|
|
|
|
|
|
|
#ifndef NSFILEPICKER_H
|
|
|
|
#define NSFILEPICKER_H
|
|
|
|
|
2010-11-05 10:43:12 -07:00
|
|
|
#include "nsBaseFilePicker.h"
|
2010-09-30 08:37:36 -07:00
|
|
|
#include "nsString.h"
|
|
|
|
|
2010-11-05 10:43:12 -07:00
|
|
|
class nsFilePicker : public nsBaseFilePicker
|
2010-09-30 08:37:36 -07:00
|
|
|
{
|
|
|
|
public:
|
2010-11-05 10:43:12 -07:00
|
|
|
NS_DECL_ISUPPORTS
|
2010-09-30 08:37:36 -07:00
|
|
|
|
2010-11-05 10:43:12 -07:00
|
|
|
NS_IMETHODIMP Init(nsIDOMWindow *parent, const nsAString& title,
|
2012-08-22 08:56:38 -07:00
|
|
|
int16_t mode);
|
|
|
|
NS_IMETHOD AppendFilters(int32_t aFilterMask);
|
2010-11-05 10:43:12 -07:00
|
|
|
NS_IMETHOD AppendFilter(const nsAString & aTitle,
|
|
|
|
const nsAString & aFilter);
|
|
|
|
NS_IMETHOD GetDefaultString(nsAString & aDefaultString);
|
|
|
|
NS_IMETHOD SetDefaultString(const nsAString & aDefaultString);
|
|
|
|
NS_IMETHOD GetDefaultExtension(nsAString & aDefaultExtension);
|
|
|
|
NS_IMETHOD SetDefaultExtension(const nsAString & aDefaultExtension);
|
2012-06-05 19:08:30 -07:00
|
|
|
NS_IMETHOD GetFile(nsIFile * *aFile);
|
2010-11-05 10:43:12 -07:00
|
|
|
NS_IMETHOD GetFileURL(nsIURI * *aFileURL);
|
2012-06-05 19:08:30 -07:00
|
|
|
NS_IMETHOD SetDisplayDirectory(nsIFile *aDisplayDirectory);
|
|
|
|
NS_IMETHOD GetDisplayDirectory(nsIFile **aDisplayDirectory);
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD Show(int16_t *aReturn);
|
2010-09-30 08:37:36 -07:00
|
|
|
private:
|
2012-08-22 08:56:38 -07:00
|
|
|
void InitNative(nsIWidget*, const nsAString&, int16_t) {};
|
2010-11-05 10:43:12 -07:00
|
|
|
nsString mFilePath;
|
2012-03-18 09:15:56 -07:00
|
|
|
nsString mExtensionsFilter;
|
|
|
|
nsString mMimeTypeFilter;
|
2010-09-30 08:37:36 -07:00
|
|
|
};
|
|
|
|
#endif
|