InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IOpenFileDialog.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Lonnie Millett
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IOpenFileDialog__
25 #define __IOpenFileDialog__
26 
27 #include "IPMUnknown.h"
28 #include "DocumentID.h"
29 
30 #ifdef WINDOWS
31 #include "ShObjIdl.h"
32 #endif
33 
34 class PMString;
35 class SysFileList;
36 
37 //----------------------------------------------------------------------------------------
38 // Constants
39 //----------------------------------------------------------------------------------------
40 #ifdef MACINTOSH
41 const OSType kAllFileTypes = 'all '; // used to indicate that we want to show all files regardless of type
42 #endif
43 
44 namespace OpenFileDialog
45 {
46  // Filter name for "All Files"
47  extern const PMString kAllFilesFilterName;
48 }
49 
63 {
64 public:
65  enum
66  {
67  kDefaultIID = IID_IOPENFILEDIALOG
68  };
69 
78  virtual bool16 DoDialog(IDFile *defaultFile, SysFileList &resultFiles, bool16 allowMultipleFiles = kTrue,
79  const PMString *title = nil, const PMString *infoMessage = nil) = 0;
80 
86  virtual void AddExtension(const PMString *family, const PMString *extension) = 0;
87 
88 #ifdef WINDOWS
89 
93  virtual void AppendAllFilesToFilterList() = 0;
94 
100  virtual void SetAdditionalFOSFlags(uint32 flags) = 0;
101 
110  virtual void SetDefaultExtension(const PMString &extension) = 0;
111 
115  virtual void SetDefaultFilter(const PMString &filterName) = 0;
116 
117 #elif defined(MACINTOSH)
118 
121  virtual void AddType(SysOSType theType) = 0;
122 
127  virtual void AddCustomMenu(const PMString &theName, SysOSType theType) = 0;
128 #endif
129 };
130 
131 #endif