Updated Swedish translation.
[wine] / dlls / commdlg / filedlgbrowser.h
1 /*
2  *  Implementation of IShellBrowser for the File Open common dialog
3  * 
4  *
5  */
6
7 #ifndef SHBROWSER_H
8 #define SHBROWSER_H TRUE
9
10 #include "shlobj.h"
11 #include "winbase.h"
12 #include "objbase.h"
13 #include "commdlg.h"
14
15 /***********************************************************************
16  * Defines and global variables
17  */
18 #define _ICommDlgBrowser_Offset ((int)(&(((IShellBrowserImpl*)0)->lpVtblCommDlgBrowser)))
19 #define _ICOM_THIS_FromICommDlgBrowser(class, name) class* This = (class*)(((char*)name)-_ICommDlgBrowser_Offset);
20
21 #define _IServiceProvider_Offset ((int)(&(((IShellBrowserImpl*)0)->lpVtblServiceProvider)))
22 #define _ICOM_THIS_FromIServiceProvider(class, name) class* This = (class*)(((char*)name)-_IServiceProvider_Offset);
23
24 /* dialog internal property */
25
26 #define FODPROP_SAVEDLG 0x0001  /* File dialog is a Save file dialog */
27 #define FODPROP_USEVIEW 0x0002  /* Indicates the user selection must be taken 
28                                    from the IShellView */
29
30 /***********************************************************************
31  * Data structure
32  */
33
34
35 typedef struct
36 {
37     
38     LPOPENFILENAMEA ofnInfos;
39     struct {
40         IShellBrowser *FOIShellBrowser; 
41         IShellFolder *FOIShellFolder;
42         IShellView *FOIShellView;
43         IDataObject *FOIDataObject;
44     } Shell;
45
46     struct {
47         HWND hwndOwner;
48         HWND hwndView;
49         RECT rectView;
50         FOLDERSETTINGS folderSettings;
51         LPITEMIDLIST pidlAbsCurrent;
52         LPWSTR lpstrCurrentFilter;
53     } ShellInfos;
54
55     struct {
56         HWND hwndFileTypeCB;
57         HWND hwndLookInCB;
58         HWND hwndFileName;
59         HWND hwndTB;
60         HWND hwndCustomDlg;
61         DWORD dwDlgProp;
62     } DlgInfos;
63
64     struct {
65         UINT fileokstring;
66         UINT lbselchstring;
67         UINT helpmsgstring;
68         UINT sharevistring;
69     } HookMsg;
70
71 } FileOpenDlgInfos;
72
73 /***********************************************************************
74  * Control ID's
75  */
76 #define IDS_ABOUTBOX                    101
77 #define IDS_DOCUMENTFOLDERS             102
78 #define IDS_PERSONAL                    103
79 #define IDS_FAVORITES                   104
80 #define IDS_PATH                        105
81 #define IDS_DESKTOP                     106
82
83 #define IDS_FONTS                       108
84 #define IDS_MYCOMPUTER                  110
85 #define IDS_SYSTEMFOLDERS               112
86 #define IDS_LOCALHARDRIVES              113
87 #define IDS_FILENOTFOUND                114
88 #define IDS_VERIFYFILE                  115
89 #define IDS_CREATEFILE                  116
90 #define IDS_CREATEFOLDER_DENIED         117
91 #define IDS_FILEOPEN_CAPTION            118
92 #define IDL_OVERWRITEFILE               119
93 #define IDS_INVALID_FILENAME_TITLE      120
94 #define IDS_INVALID_FILENAME            121
95 #define IDS_PATHNOTEXISTING             122
96 #define IDS_FILENOTEXISTING             123
97
98 /* File Dialog Tooltips string IDs */
99
100 #define IDS_UPFOLDER                    150
101 #define IDS_NEWFOLDER                   151
102 #define IDS_LISTVIEW                    152
103 #define IDS_REPORTVIEW                  153
104 #define IDS_TODESKTOP                   154
105
106 #define IDC_OPENREADONLY                chx1
107
108 #define IDC_TOOLBARSTATIC               stc1
109 #define IDC_FILETYPESTATIC              stc2
110 #define IDC_FILENAMESTATIC              stc3
111 #define IDC_LOOKINSTATIC                stc4
112
113 #define IDC_SHELLSTATIC                 lst1
114
115 #define IDC_FILETYPE                    cmb1
116 #define IDC_LOOKIN                      cmb2
117
118 #define IDC_FILENAME                    edt1
119
120 #define IDC_TOOLBAR                     ctl1
121
122 /***********************************************************************
123  * Prototypes for the methods of the IShellBrowserImpl class
124  */
125 /* Constructor */
126 IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner);
127
128
129 LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex);
130 UINT GetNumSelected(IDataObject *doSelected);
131
132 /* pidl handling */
133 BOOL IsPidlFolder (LPSHELLFOLDER psf, LPITEMIDLIST pidl);
134
135 /* Functions used by the EDIT box */
136 void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd);
137 int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPSTR * lpstrFileList, UINT * sizeUsed);
138
139 #endif /*SHBROWSER_H*/