xref: /aosp_15_r20/external/lzma/CPP/Windows/CommonDialog.h (revision f6dc9357d832569d4d1f5d24eacdb3935a1ae8e6)
1 // Windows/CommonDialog.h
2 
3 #ifndef ZIP7_INC_WINDOWS_COMMON_DIALOG_H
4 #define ZIP7_INC_WINDOWS_COMMON_DIALOG_H
5 
6 #include "../Common/MyString.h"
7 
8 namespace NWindows {
9 
10 struct CCommonDialogInfo
11 {
12   /* (FilterIndex == -1) means no selected filter.
13        and (-1) also is reserved for unsupported custom filter.
14      if (FilterIndex >= 0), then FilterIndex is index of filter */
15   int FilterIndex;    // [in / out]
16   bool SaveMode;
17  #ifdef UNDER_CE
18   bool OpenFolderMode;
19  #endif
20   HWND hwndOwner;
21   // LPCWSTR lpstrInitialDir;
22   LPCWSTR lpstrTitle;
23   UString FilePath;   // [in / out]
24 
CCommonDialogInfoCCommonDialogInfo25   CCommonDialogInfo()
26   {
27     FilterIndex = -1;
28     SaveMode = false;
29    #ifdef UNDER_CE
30     OpenFolderMode = false;
31    #endif
32     hwndOwner = NULL;
33     // lpstrInitialDir = NULL;
34     lpstrTitle = NULL;
35   }
36 
37   /* (filters) : 2 sequential vector strings (Description, Masks) represent each filter */
38   bool CommonDlg_BrowseForFile(LPCWSTR lpstrInitialDir, const UStringVector &filters);
39 };
40 
41 }
42 
43 #endif
44