widget/xpwidgets/nsBaseFilePicker.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/xpwidgets/nsBaseFilePicker.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef nsBaseFilePicker_h__
    1.11 +#define nsBaseFilePicker_h__
    1.12 +
    1.13 +#include "nsISupports.h"
    1.14 +#include "nsIFilePicker.h"
    1.15 +#include "nsISimpleEnumerator.h"
    1.16 +#include "nsArrayEnumerator.h"
    1.17 +#include "nsCOMPtr.h"
    1.18 +
    1.19 +class nsIWidget;
    1.20 +
    1.21 +class nsBaseFilePicker : public nsIFilePicker
    1.22 +{
    1.23 +public:
    1.24 +  nsBaseFilePicker(); 
    1.25 +  virtual ~nsBaseFilePicker();
    1.26 +
    1.27 +  NS_IMETHOD Init(nsIDOMWindow *aParent,
    1.28 +                  const nsAString& aTitle,
    1.29 +                  int16_t aMode);
    1.30 +
    1.31 +  NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback);
    1.32 +  NS_IMETHOD AppendFilters(int32_t filterMask);
    1.33 +  NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex);
    1.34 +  NS_IMETHOD SetFilterIndex(int32_t aFilterIndex);
    1.35 +  NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles);
    1.36 +  NS_IMETHOD GetDisplayDirectory(nsIFile * *aDisplayDirectory);
    1.37 +  NS_IMETHOD SetDisplayDirectory(nsIFile * aDisplayDirectory);
    1.38 +  NS_IMETHOD GetAddToRecentDocs(bool *aFlag);
    1.39 +  NS_IMETHOD SetAddToRecentDocs(bool aFlag);
    1.40 +  NS_IMETHOD GetMode(int16_t *aMode);
    1.41 +
    1.42 +  NS_IMETHOD GetDomfile(nsIDOMFile** aDomfile);
    1.43 +  NS_IMETHOD GetDomfiles(nsISimpleEnumerator** aDomfiles);
    1.44 +
    1.45 +protected:
    1.46 +
    1.47 +  virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle) = 0;
    1.48 +
    1.49 +  bool mAddToRecentDocs;
    1.50 +  nsCOMPtr<nsIFile> mDisplayDirectory;
    1.51 +  int16_t mMode;
    1.52 +};
    1.53 +
    1.54 +#endif // nsBaseFilePicker_h__

mercurial