author | Claus Gittinger <cg@exept.de> |
Fri, 01 Apr 2016 12:47:05 +0200 | |
changeset 16230 | 5258eebd6b23 |
parent 16229 | 09278ae8faed |
child 16231 | 68fa0d6c9b66 |
permissions | -rw-r--r-- |
16169 | 1 |
"{ Encoding: utf8 }" |
2 |
||
8277 | 3 |
" |
4 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
5 |
All Rights Reserved |
8277 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
8015 | 14 |
"{ Package: 'stx:libtool' }" |
15 |
||
16169 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
8015 | 18 |
Object subclass:#Win32FileDialog |
19 |
instanceVariableNames:'fileName openFileNameStruct filters lpstrFilter lpstrFile |
|
20 |
lpstrInitialDir lpstrTitle lpstrDefExt defFilter defExtension |
|
9698 | 21 |
style title smalltalkFileFilters defFilterIndex parent error' |
13577 | 22 |
classVariableNames:'Lock InitialDirectory CommonDialogConstants |
23 |
FilterPatternDescriptions' |
|
16169 | 24 |
poolDictionaries:'Win32Constants' |
16170 | 25 |
category:'OS-Windows' |
8015 | 26 |
! |
27 |
||
28 |
ByteArray variableByteSubclass:#OpenFilenameStructure |
|
29 |
instanceVariableNames:'' |
|
30 |
classVariableNames:'' |
|
31 |
poolDictionaries:'' |
|
32 |
privateIn:Win32FileDialog |
|
33 |
! |
|
34 |
||
8277 | 35 |
!Win32FileDialog class methodsFor:'documentation'! |
36 |
||
37 |
copyright |
|
38 |
" |
|
39 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
40 |
All Rights Reserved |
8277 | 41 |
|
42 |
This software is furnished under a license and may be used |
|
43 |
only in accordance with the terms of that license and with the |
|
44 |
inclusion of the above copyright notice. This software may not |
|
45 |
be provided or otherwise made available to, or used by, any |
|
46 |
other person. No title to or ownership of the software is |
|
47 |
hereby transferred. |
|
48 |
" |
|
9598 | 49 |
! |
50 |
||
51 |
documentation |
|
52 |
" |
|
16169 | 53 |
interface to windows file dialogs. |
54 |
Written by felix madrid. |
|
9598 | 55 |
" |
8277 | 56 |
! ! |
8015 | 57 |
|
8260 | 58 |
!Win32FileDialog class methodsFor:'initialization'! |
59 |
||
9597 | 60 |
initialize |
61 |
Lock := RecursionLock new. |
|
62 |
||
63 |
"Created: / 26-10-2010 / 12:51:23 / cg" |
|
64 |
! |
|
65 |
||
8260 | 66 |
startUp |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
67 |
"Private - Initialize the class variables. |
9345 | 68 |
This is called during startup." |
8260 | 69 |
|
70 |
InitialDirectory := Directory pathName: Disk drivePathName. |
|
71 |
! ! |
|
72 |
||
8015 | 73 |
!Win32FileDialog class methodsFor:'instance creation'! |
74 |
||
75 |
new |
|
9345 | 76 |
^ self basicNew initialize |
8015 | 77 |
! ! |
78 |
||
79 |
!Win32FileDialog class methodsFor:'accessing'! |
|
80 |
||
81 |
getInitialDirectory |
|
9598 | 82 |
^ InitialDirectory |
8015 | 83 |
|
9598 | 84 |
"Modified: / 26-10-2010 / 18:47:46 / cg" |
8015 | 85 |
! |
86 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
87 |
setInitialDirectory:aName |
9598 | 88 |
InitialDirectory := Directory pathName:aName |
8015 | 89 |
|
9598 | 90 |
"Modified: / 26-10-2010 / 18:47:48 / cg" |
8015 | 91 |
! ! |
92 |
||
93 |
!Win32FileDialog class methodsFor:'constants'! |
|
94 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
95 |
commonDialogConstantAt:aString |
9598 | 96 |
^ self commonDialogConstants at:aString |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
97 |
ifAbsent:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
98 |
Transcript showCR:'Common Dialog Constant ' , aString , ' notfound!!' |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
99 |
] |
8015 | 100 |
|
9598 | 101 |
"Modified: / 26-10-2010 / 18:47:51 / cg" |
8015 | 102 |
! |
103 |
||
104 |
commonDialogConstants |
|
9345 | 105 |
CommonDialogConstants isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
106 |
CommonDialogConstants := self generateCommonDialogConstants |
9345 | 107 |
]. |
8015 | 108 |
^ CommonDialogConstants |
9598 | 109 |
|
110 |
"Modified: / 26-10-2010 / 18:47:54 / cg" |
|
8015 | 111 |
! |
112 |
||
113 |
generateCommonDialogConstants |
|
114 |
|dictionary| |
|
115 |
||
116 |
dictionary := Dictionary new. |
|
117 |
dictionary |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
118 |
at:'CcPreventfullopen' put:4; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
119 |
at:'FrShowhelp' put:128; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
120 |
at:'PdEnablesetuptemplate' put:32768; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
121 |
at:'FrNoupdown' put:1024; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
122 |
at:'CfNosimulations' put:4096; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
123 |
at:'OfnPathmustexist' put:2048; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
124 |
at:'CfWysiwyg' put:32768; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
125 |
at:'PdReturndc' put:256; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
126 |
at:'PdEnableprinthook' put:4096; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
127 |
at:'CfInittologfontstruct' put:64; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
128 |
at:'CfScalableonly' put:131072; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
129 |
at:'PdPrinttofile' put:32; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
130 |
at:'CfEffects' put:256; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
131 |
at:'PdShowhelp' put:2048; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
132 |
at:'OfnEnabletemplatehandle' put:128; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
133 |
at:'CfBoth' put:3; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
134 |
at:'OfnReadonly' put:1; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
135 |
at:'PdNopagenums' put:8; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
136 |
at:'PdDisableprinttofile' put:524288; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
137 |
at:'PdHideprinttofile' put:1048576; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
138 |
at:'OfnAllowmultiselect' put:512; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
139 |
at:'CfPrinterfonts' put:2; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
140 |
at:'CfEnabletemplatehandle' put:32; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
141 |
at:'PdSelection' put:1; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
142 |
at:'OfnHidereadonly' put:4; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
143 |
at:'PdPrintsetup' put:64; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
144 |
at:'OfnExtentiondifferent' put:1024; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
145 |
at:'FrReplaceall' put:32; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
146 |
at:'FrMatchcase' put:4; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
147 |
at:'OfnFilemustexist' put:4096; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
148 |
at:'PdCollate' put:16; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
149 |
at:'CfFixedpitchonly' put:16384; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
150 |
at:'PdEnablesetuphook' put:8192; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
151 |
at:'OfnShareaware' put:16384; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
152 |
at:'CcEnablehook' put:16; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
153 |
at:'CfEnabletemplate' put:16; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
154 |
at:'Findmsgstring' put:'commdlgFindreplace'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
155 |
at:'CfLimitsize' put:8192; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
156 |
at:'OfnNochangedir' put:8; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
157 |
at:'OfnCreateprompt' put:8192; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
158 |
at:'ScreenFonttype' put:8192; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
159 |
at:'PdUsedevmodecopies' put:262144; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
160 |
at:'CcRgbinit' put:1; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
161 |
at:'FrFindnext' put:8; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
162 |
at:'CfUsestyle' put:128; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
163 |
at:'FrEnablehook' put:256; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
164 |
at:'PdEnableprinttemplatehandle' put:65536; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
165 |
at:'CfShowhelp' put:4; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
166 |
at:'FrNowholeword' put:4096. |
9598 | 167 |
dictionary |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
168 |
at:'ShareExist' put:16448; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
169 |
at:'OfnOverwriteprompt' put:2; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
170 |
at:'OfnEnablehook' put:32; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
171 |
at:'OfnShowhelp' put:16; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
172 |
at:'CcEnabletemplatehandle' put:64; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
173 |
at:'SimulatedFonttype' put:32768; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
174 |
at:'FrDown' put:1; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
175 |
at:'PdEnableprinttemplate' put:16384; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
176 |
at:'CfNovectorfonts' put:2048; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
177 |
at:'PdNoselection' put:4; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
178 |
at:'CfAnsionly' put:1024; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
179 |
at:'OfnNovalidate' put:256; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
180 |
at:'CfScreenfonts' put:1; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
181 |
at:'FrWholeword' put:2; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
182 |
at:'FrEnabletemplatehandle' put:8192; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
183 |
at:'PdAllpages' put:0; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
184 |
at:'CfForcefontexist' put:65536; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
185 |
at:'CcEnabletemplate' put:32; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
186 |
at:'PdPagenums' put:2; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
187 |
at:'FrReplace' put:16; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
188 |
at:'PdEnablesetuptemplatehandle' put:131072; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
189 |
at:'CfApply' put:512; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
190 |
at:'OfnEnabletemplate' put:64; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
191 |
at:'DnDefaultprn' put:1; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
192 |
at:'PdNowarning' put:128; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
193 |
at:'CfTtonly' put:262144; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
194 |
at:'PrinterFonttype' put:16384; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
195 |
at:'CcShowhelp' put:8; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
196 |
at:'CcFullopen' put:2; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
197 |
at:'PdReturnic' put:512; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
198 |
at:'FrEnabletemplate' put:512; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
199 |
at:'FrDialogterm' put:64; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
200 |
at:'Helpmsgstring' put:'commdlgHelp'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
201 |
at:'PdReturndefault' put:1024; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
202 |
at:'FrNomatchcase' put:2048; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
203 |
at:'CfEnablehook' put:8. |
8015 | 204 |
^ dictionary |
9598 | 205 |
|
206 |
"Modified: / 26-10-2010 / 18:47:57 / cg" |
|
8015 | 207 |
! ! |
208 |
||
209 |
!Win32FileDialog class methodsFor:'examples'! |
|
210 |
||
211 |
openFile |
|
9345 | 212 |
^ (Win32FileDialog new openFile: 'c:\untitled.txt') file. |
8015 | 213 |
|
214 |
" |
|
16171 | 215 |
Win32FileDialog openFile |
8015 | 216 |
" |
217 |
! |
|
218 |
||
219 |
saveFile |
|
9345 | 220 |
^ (Win32FileDialog new saveFile: 'C:\vsw311\untitled.txt') file. |
8015 | 221 |
|
222 |
" |
|
9345 | 223 |
self saveFile |
8015 | 224 |
" |
225 |
! ! |
|
226 |
||
227 |
!Win32FileDialog class methodsFor:'filters'! |
|
228 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
229 |
filterPatternDescription:filterPattern |
9598 | 230 |
^ self filterPatternDescriptions at:filterPattern ifAbsent:'' |
8015 | 231 |
|
9598 | 232 |
"Modified: / 26-10-2010 / 18:48:24 / cg" |
8015 | 233 |
! |
234 |
||
235 |
filterPatternDescriptions |
|
9598 | 236 |
FilterPatternDescriptions isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
237 |
FilterPatternDescriptions := self generateFilterPatternDescriptions |
9598 | 238 |
]. |
239 |
^ FilterPatternDescriptions |
|
8015 | 240 |
|
9598 | 241 |
"Modified: / 26-10-2010 / 18:48:25 / cg" |
8015 | 242 |
! |
243 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
244 |
filtersFor:pattern |
8015 | 245 |
|filters filterPatterns| |
246 |
||
9598 | 247 |
pattern isEmptyOrNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
248 |
^ nil |
9598 | 249 |
]. |
8015 | 250 |
filters := OrderedCollection new. |
9598 | 251 |
filterPatterns := pattern subStrings:$;. |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
252 |
filterPatterns do:[:filterPattern | |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
253 |
filterPattern notEmpty ifTrue:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
254 |
filters add:(Array with:(self filterPatternDescription:filterPattern) |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
255 |
with:filterPattern) |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
256 |
]. |
8015 | 257 |
]. |
258 |
^ filters asArray |
|
9598 | 259 |
|
260 |
"Modified: / 26-10-2010 / 18:48:26 / cg" |
|
8015 | 261 |
! |
262 |
||
263 |
generateFilterPatternDescriptions |
|
9598 | 264 |
^ (Dictionary new) |
16229 | 265 |
at:'*.txt' put:'Text files (*.txt)'; |
266 |
at:'*.st' put:'Smalltalk files (*.st)'; |
|
267 |
at:'*.java' put:'Java files (*.java)'; |
|
268 |
at:'*.csv' put:'CSV files (*.csv)'; |
|
269 |
at:'*.xml' put:'XML files (*.xml)'; |
|
270 |
at:'*.zip' put:'ZIP files (*.zip)'; |
|
271 |
at:'*.xls' put:'Excel files (*.xls)'; |
|
272 |
at:'*.ent' put:'SGML Entity files (*.ent)'; |
|
273 |
at:'*.ccs' put:'CCS files (*.ccs)'; |
|
274 |
at:'*.dll' put:'Shared Library files (*.dll)'; |
|
275 |
at:'*.ini' put:'Configuration files (*.ini)'; |
|
276 |
at:'*.prn' put:'Printer Text files (*.prn)'; |
|
277 |
at:'*.dir' put:'DapasX Database files (*.dir)'; |
|
278 |
at:'*.dat' put:'DapasX Database files (*.dat)'; |
|
279 |
at:'*.prg' put:'DapasX Program files (*.prg)'; |
|
280 |
at:'*.dcf' put:'DapasX Options files (*.dcf)'; |
|
281 |
at:'*.ext' put:'DapasX Backup files (*.ext)'; |
|
282 |
at:'*.mpl' put:'DapasX Project files (*.mpl)'; |
|
283 |
at:'*.expeccoLicense' put:'expecco Lizenzdatei (*.expeccoLicense)'; |
|
284 |
at:'*.lic' put:'Lizenzdatei (*.lic)'; |
|
285 |
yourself |
|
8015 | 286 |
|
9598 | 287 |
"Modified: / 26-10-2010 / 18:48:28 / cg" |
8015 | 288 |
! ! |
289 |
||
290 |
!Win32FileDialog class methodsFor:'opening'! |
|
291 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
292 |
fileDialogFor:ownerWindow save:isSaveDialog |
9345 | 293 |
title:titleOrNil inDirectory:dirPathOrNil initialAnswer:initialOrNil |
294 |
filter:pattern extension:extensionOrNil |
|
8015 | 295 |
|
296 |
"start a native open-file dialog. |
|
297 |
If not cancelled, the selected fileName is returned; nil otherwise. |
|
298 |
Of course, this one looks like the |
|
299 |
Windows file dialog - no matter which viewStyle settings are active. |
|
300 |
Notice: if no ownerWindow is given, the dialog pops up at 0@0. |
|
301 |
||
302 |
EXPERIMENTAL & non-portable: use with caution" |
|
303 |
||
304 |
|filePath filterArrayOrNil| |
|
305 |
||
306 |
filterArrayOrNil := self filtersFor: pattern. |
|
307 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
308 |
filePath := |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
309 |
self new |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
310 |
openFor:ownerWindow |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
311 |
save:isSaveDialog |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
312 |
title:titleOrNil |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
313 |
inDirectory:dirPathOrNil |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
314 |
initialAnswer:initialOrNil |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
315 |
filter:filterArrayOrNil |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
316 |
extension:extensionOrNil. |
8015 | 317 |
|
318 |
^ filePath |
|
319 |
! ! |
|
320 |
||
321 |
!Win32FileDialog methodsFor:'accessing'! |
|
322 |
||
323 |
addAllFilesFilter |
|
324 |
||
325 |
self addFilter: '*.*' description: 'All Files (*.*)'. |
|
326 |
! |
|
327 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
328 |
addFilter:aFilter description:aDescription |
9598 | 329 |
"Add aFilter and aDescription to the list of File dialog filters." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
330 |
|
9598 | 331 |
filters add:(Association key:aFilter value:aDescription). |
8015 | 332 |
|
9598 | 333 |
"Modified: / 26-10-2010 / 18:45:27 / cg" |
8015 | 334 |
! |
335 |
||
336 |
addSmalltalkFileFilters |
|
9598 | 337 |
^ smalltalkFileFilters |
8015 | 338 |
|
9598 | 339 |
"Modified: / 26-10-2010 / 18:45:29 / cg" |
8015 | 340 |
! |
341 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
342 |
defExtension:aDefExtension |
9598 | 343 |
"Specifies the default extension of File dialog." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
344 |
|
9598 | 345 |
defExtension := aDefExtension. |
8015 | 346 |
|
9598 | 347 |
"Modified: / 26-10-2010 / 18:45:54 / cg" |
8015 | 348 |
! |
349 |
||
350 |
defFilter |
|
9598 | 351 |
"Answers the aDefFilterString as the default filter of File dialog." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
352 |
|
9598 | 353 |
^ defFilter |
8015 | 354 |
|
9598 | 355 |
"Modified: / 26-10-2010 / 18:45:56 / cg" |
8015 | 356 |
! |
357 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
358 |
defFilter:aDefFilterString |
9598 | 359 |
"Specifies the aDefFilterString as the default filter of File dialog." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
360 |
|
9598 | 361 |
defFilter := aDefFilterString |
8015 | 362 |
|
9598 | 363 |
"Modified: / 26-10-2010 / 18:45:58 / cg" |
8015 | 364 |
! |
365 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
366 |
defFilterIndex:defaultFilterIndex |
9598 | 367 |
defFilterIndex := defaultFilterIndex. |
8015 | 368 |
|
9598 | 369 |
"Modified: / 26-10-2010 / 18:46:01 / cg" |
8015 | 370 |
! |
371 |
||
372 |
directory |
|
9598 | 373 |
"Answer the selected directory." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
374 |
|
8037 | 375 |
InitialDirectory isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
376 |
^ Filename currentDirectory pathName asFilename |
8037 | 377 |
]. |
378 |
^ InitialDirectory "? OperatingSystem getCurrentDirectory asFilename" |
|
9598 | 379 |
|
380 |
"Modified: / 26-10-2010 / 18:46:03 / cg" |
|
8015 | 381 |
! |
382 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
383 |
directory:directory |
9598 | 384 |
"Sets the initial directory." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
385 |
|
9598 | 386 |
|aFilename| |
8015 | 387 |
|
9598 | 388 |
directory isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
389 |
^ self. |
9598 | 390 |
]. |
391 |
aFilename := directory asFilename. |
|
392 |
aFilename exists ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
393 |
InitialDirectory := aFilename |
9598 | 394 |
]. |
8015 | 395 |
|
9598 | 396 |
"Modified: / 26-10-2010 / 18:46:06 / cg" |
8015 | 397 |
! |
398 |
||
399 |
file |
|
9598 | 400 |
"Answer the selected file." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
401 |
|
9598 | 402 |
^ fileName |
8015 | 403 |
|
9598 | 404 |
"Modified: / 26-10-2010 / 18:46:10 / cg" |
8015 | 405 |
! |
406 |
||
407 |
fileSpec: aFileSpec |
|
9598 | 408 |
"Sets the initial fileName and directory in the File Dialog." |
8015 | 409 |
|
9598 | 410 |
| array dir | |
8015 | 411 |
|
412 |
"SHOULD assign initial fileName and directory separately using #fileName: and #directory" |
|
413 |
||
8358 | 414 |
self breakPoint:#fm. |
8015 | 415 |
fileName := aFileSpec. |
416 |
"/ array := Filename splitPath: aFileSpec in: self directory . |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
417 |
"/ dir := |
8015 | 418 |
"/ (( String with: ( array at: 1 ) with: $: ), |
419 |
"/ ( ( array at: 2 ) isEmpty ifTrue: [ '\' ] ifFalse: [ array at: 2 ] )) asFilename. |
|
420 |
"/ dir exists ifFalse: [ dir := OperatingSystem getCurrentDirectory asFilename ]. |
|
421 |
"/ |
|
422 |
"/ self directory: dir. |
|
423 |
"/ fileName := array at: 3 |
|
9598 | 424 |
|
425 |
"Modified: / 26-10-2010 / 18:46:22 / cg" |
|
8015 | 426 |
! |
427 |
||
428 |
filters |
|
9598 | 429 |
"Private - answers a string containing all filters and sets up |
430 |
the defFilterIndex property" |
|
8015 | 431 |
|
432 |
| filterString count defaultFilterIndex defaultFilter| |
|
433 |
||
434 |
smalltalkFileFilters notNil ifTrue: [ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
435 |
self |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
436 |
addFilter: '*.cls' description: 'Class Files (*.CLS)'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
437 |
addFilter: '*.mth' description: 'Method Files (*.MTH)'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
438 |
addFilter: '*.st' description: 'Smalltalk Files (*.ST)'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
439 |
addFilter: '*.bnd' description: 'Library Bind Files (*.BND)'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
440 |
addFilter: '*.map' description: 'Library Map Files (*.MAP)'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
441 |
addFilter: '*.ini' description: 'Initialization Files (*.INI)'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
442 |
addFilter: '*.obj' description: 'Object Files (*.OBJ)'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
443 |
addFilter: '*.log' description: 'Log Files (*.LOG)' |
8015 | 444 |
]. |
445 |
||
446 |
defaultFilter := self defFilter. |
|
447 |
(fileName notEmptyOrNil and:[defaultFilter isNil]) ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
448 |
|initialFilenameSuffix| |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
449 |
initialFilenameSuffix := fileName asFilename suffix. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
450 |
initialFilenameSuffix notEmptyOrNil ifTrue:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
451 |
defaultFilter := '*.', initialFilenameSuffix. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
452 |
]. |
8015 | 453 |
]. |
454 |
||
455 |
filterString := String new. |
|
456 |
count := 0. |
|
457 |
defaultFilterIndex := 0. |
|
458 |
filters do: [:assoc | |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
459 |
count := count + 1. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
460 |
assoc key = defaultFilter ifTrue: [ defaultFilterIndex := count ]. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
461 |
filterString := filterString, assoc value, #[0] asString, assoc key , #[0] asString. |
8015 | 462 |
]. |
463 |
||
464 |
self defFilterIndex: defaultFilterIndex. |
|
465 |
^filterString |
|
9598 | 466 |
|
467 |
"Modified: / 26-10-2010 / 18:46:35 / cg" |
|
8015 | 468 |
! |
469 |
||
470 |
flags |
|
9598 | 471 |
"Private - Answers the dialog box current flags. |
472 |
For compatibility reasons -> use style instead" |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
473 |
|
9598 | 474 |
^ openFileNameStruct flags |
8015 | 475 |
|
9598 | 476 |
"Modified: / 26-10-2010 / 18:46:38 / cg" |
8015 | 477 |
! |
478 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
479 |
flags:flags |
9598 | 480 |
"Private - Specifies the dialog box creation flags. |
481 |
Kept for compatibility reasons. Use style: instead" |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
482 |
|
9598 | 483 |
self style:flags |
8015 | 484 |
|
9598 | 485 |
"Modified: / 26-10-2010 / 18:46:42 / cg" |
8015 | 486 |
! |
487 |
||
488 |
hideReadonly |
|
9598 | 489 |
"Hides the file dialog's Readonly check box. " |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
490 |
|
16171 | 491 |
self style:(self style bitOr:OFN_HIDEREADONLY) |
8015 | 492 |
|
9598 | 493 |
"Modified: / 26-10-2010 / 18:46:48 / cg" |
8015 | 494 |
! |
495 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
496 |
initialFileName:filename |
9598 | 497 |
"Sets the initial fileName string in the File Dialog." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
498 |
|
9598 | 499 |
|aString| |
8015 | 500 |
|
9598 | 501 |
filename isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
502 |
^ self. |
9598 | 503 |
]. |
8015 | 504 |
aString := filename. |
9598 | 505 |
filename isFilename ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
506 |
aString := filename baseName |
9598 | 507 |
]. |
8015 | 508 |
fileName := aString. |
9598 | 509 |
|
510 |
"Modified: / 26-10-2010 / 18:46:50 / cg" |
|
8015 | 511 |
! |
512 |
||
513 |
overwritePrompt |
|
9598 | 514 |
"Prompt if the user attempts to overwrite a file" |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
515 |
|
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
516 |
self style:(self style |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
517 |
bitOr: (self class commonDialogConstantAt:'OfnOverwriteprompt')) |
8015 | 518 |
|
9598 | 519 |
"Modified: / 26-10-2010 / 18:47:19 / cg" |
8015 | 520 |
! |
521 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
522 |
owner:ownerWindow |
9598 | 523 |
"Sets the owner of the Dialog box." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
524 |
|
8015 | 525 |
|mainView handle| |
526 |
||
9598 | 527 |
ownerWindow isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
528 |
^ self |
9598 | 529 |
]. |
8015 | 530 |
mainView := ownerWindow windowGroup mainView. |
531 |
mainView notNil ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
532 |
handle := mainView id. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
533 |
handle notNil ifTrue:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
534 |
parent := handle address |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
535 |
]. |
8015 | 536 |
]. |
537 |
||
9598 | 538 |
"/ super owner: anOwner. |
539 |
"/ owner isWindow |
|
540 |
"/ ifTrue: [ parent := owner ] |
|
541 |
"/ ifFalse: [ parent := owner mainView. |
|
542 |
"/ parent isWindow ifFalse: [ |
|
543 |
"/ parent := Notifier findWindow: WindowHandle queryActive ]]. |
|
544 |
||
545 |
"Modified: / 26-10-2010 / 18:47:22 / cg" |
|
8015 | 546 |
! |
547 |
||
548 |
pathMustExist |
|
11948 | 549 |
self style:(self style bitOr: 16r800). |
8015 | 550 |
|
9598 | 551 |
"Modified: / 26-10-2010 / 18:47:27 / cg" |
8015 | 552 |
! |
553 |
||
554 |
shareAware |
|
9598 | 555 |
"Allows a previously opened file to be opened |
556 |
(e.g. change.log)" |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
557 |
|
16171 | 558 |
self style:(self style bitOr:OFN_SHAREAWARE) |
8015 | 559 |
|
9598 | 560 |
"Modified: / 26-10-2010 / 18:47:36 / cg" |
8015 | 561 |
! |
562 |
||
563 |
style |
|
9606 | 564 |
style isNil ifTrue:[^ self class commonDialogConstantAt:'OfnNochangedir']. |
565 |
^ style |
|
566 |
||
567 |
"Modified: / 27-10-2010 / 11:07:41 / cg" |
|
8015 | 568 |
! |
569 |
||
570 |
style:something |
|
571 |
style := something. |
|
572 |
! |
|
573 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
574 |
title:aTitle |
9598 | 575 |
"Specifies the string to be placed in the title bar of the |
576 |
File dialog." |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
577 |
|
9598 | 578 |
title := aTitle |
8015 | 579 |
|
9598 | 580 |
"Modified: / 26-10-2010 / 18:47:41 / cg" |
8015 | 581 |
! ! |
582 |
||
583 |
!Win32FileDialog methodsFor:'dapas'! |
|
584 |
||
585 |
dapasOpenFile |
|
9598 | 586 |
"Brings up the default open file dialog " |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
587 |
|
9598 | 588 |
self |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
589 |
hideReadonly; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
590 |
shareAware; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
591 |
addFilter:'*.*' description:'All Files (*.*)'. |
9598 | 592 |
self defFilter isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
593 |
self defFilter:'*.*' |
9598 | 594 |
]. |
595 |
self open. |
|
8015 | 596 |
|
9598 | 597 |
"Modified: / 26-10-2010 / 18:45:46 / cg" |
8015 | 598 |
! |
599 |
||
600 |
dapasSaveFile |
|
9598 | 601 |
"Brings up the file save dialog." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
602 |
|
9598 | 603 |
self |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
604 |
hideReadonly; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
605 |
overwritePrompt; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
606 |
addFilter:'*.*' description:'All Files (*.*)'. |
9598 | 607 |
self save. |
8015 | 608 |
|
9598 | 609 |
"Modified: / 26-10-2010 / 18:45:52 / cg" |
8015 | 610 |
! |
611 |
||
612 |
openFileXml |
|
9598 | 613 |
"Brings up the default open file dialog " |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
614 |
|
9598 | 615 |
self |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
616 |
hideReadonly; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
617 |
shareAware; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
618 |
addFilter:'*.xml' description:'XML-Files'. |
9598 | 619 |
self defFilter isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
620 |
self defFilter:'*.*' |
9598 | 621 |
]. |
622 |
self open. |
|
8015 | 623 |
|
9598 | 624 |
"Modified: / 26-10-2010 / 18:49:00 / cg" |
8015 | 625 |
! |
626 |
||
627 |
openFileXmlZip |
|
9598 | 628 |
"Brings up the default open file dialog " |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
629 |
|
9598 | 630 |
self |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
631 |
hideReadonly; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
632 |
shareAware; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
633 |
addFilter:'*.xml' description:'XML-Datei'; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
634 |
addFilter:'*.zip' description:'ZIP-Datei'. |
9598 | 635 |
self defFilter isNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
636 |
self defFilter:'*.*' |
9598 | 637 |
]. |
638 |
self open. |
|
8015 | 639 |
|
9598 | 640 |
"Modified: / 26-10-2010 / 18:47:14 / cg" |
8015 | 641 |
! ! |
642 |
||
9668 | 643 |
!Win32FileDialog methodsFor:'initialization & release'! |
8015 | 644 |
|
645 |
cleanUp |
|
9598 | 646 |
"Private - Free openFileNameStruct." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
647 |
|
9598 | 648 |
self style:self flags. |
649 |
lpstrFilter notNil ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
650 |
lpstrFilter free |
9598 | 651 |
]. |
652 |
lpstrFile notNil ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
653 |
lpstrFile free |
9598 | 654 |
]. |
655 |
lpstrInitialDir notNil ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
656 |
lpstrInitialDir free |
9598 | 657 |
]. |
658 |
lpstrTitle notNil ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
659 |
lpstrTitle free |
9598 | 660 |
]. |
661 |
lpstrDefExt notNil ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
662 |
lpstrDefExt free |
9598 | 663 |
]. |
664 |
openFileNameStruct := nil |
|
8015 | 665 |
|
9598 | 666 |
"Modified: / 26-10-2010 / 18:45:33 / cg" |
8015 | 667 |
! |
668 |
||
669 |
initialize |
|
9598 | 670 |
"Private - Initialize openFileNameStruct" |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
671 |
|
8015 | 672 |
super initialize. |
9598 | 673 |
openFileNameStruct := OpenFilenameStructure new. |
674 |
openFileNameStruct lStructSize:openFileNameStruct sizeInBytes. |
|
9606 | 675 |
|
8015 | 676 |
fileName := String new. |
677 |
filters := OrderedCollection new. |
|
9598 | 678 |
self style:(self class commonDialogConstantAt:'OfnNochangedir') |
679 |
||
9606 | 680 |
"Modified: / 27-10-2010 / 10:56:21 / cg" |
8015 | 681 |
! ! |
682 |
||
683 |
!Win32FileDialog methodsFor:'opening'! |
|
684 |
||
9698 | 685 |
asynchronousOpen |
686 |
|rslt sema| |
|
687 |
||
688 |
sema := Semaphore new. |
|
689 |
[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
690 |
[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
691 |
self basicOpen |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
692 |
] ensure:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
693 |
sema signal. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
694 |
]. |
9698 | 695 |
] fork. |
696 |
sema wait. |
|
697 |
^ rslt |
|
698 |
||
699 |
"Created: / 23-01-2011 / 10:59:35 / cg" |
|
700 |
! |
|
701 |
||
702 |
basicOpen |
|
9597 | 703 |
"Brings up the open file dialog." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
704 |
|
9698 | 705 |
|rslt openFileNameStructExternalBytes| |
8015 | 706 |
|
9606 | 707 |
[ |
16171 | 708 |
self fillStruct. |
709 |
parent notNil ifTrue:[ |
|
710 |
openFileNameStruct hwndOwner:parent. |
|
711 |
]. |
|
712 |
style notNil ifTrue:[ |
|
713 |
openFileNameStruct flags:style |
|
714 |
]. |
|
715 |
openFileNameStructExternalBytes := ExternalBytes from:openFileNameStruct asByteArray. |
|
716 |
rslt := OperatingSystem getOpenFilename:openFileNameStructExternalBytes. |
|
717 |
rslt ifTrue:[ |
|
718 |
self getFileName |
|
719 |
] ifFalse:[ |
|
720 |
fileName := nil. |
|
721 |
error := OperatingSystem commDlgExtendedError. |
|
722 |
self error:('GetOpenFile failed with error: %1' bindWith:error). |
|
723 |
]. |
|
9606 | 724 |
] ensure:[ |
16171 | 725 |
openFileNameStructExternalBytes notNil ifTrue:[openFileNameStructExternalBytes free]. |
726 |
self cleanUp. |
|
9606 | 727 |
]. |
9698 | 728 |
|
729 |
"Created: / 23-01-2011 / 10:58:30 / cg" |
|
13923 | 730 |
"Modified: / 11-02-2014 / 11:24:23 / cg" |
9698 | 731 |
! |
732 |
||
733 |
open |
|
734 |
"Brings up the open file dialog." |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
735 |
|
9698 | 736 |
true "false" ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
737 |
self synchronousOpen. |
9698 | 738 |
] ifFalse:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
739 |
self asynchronousOpen. |
9698 | 740 |
]. |
9597 | 741 |
(error notNil and:[ error ~= 0 ]) ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
742 |
self error:error |
8015 | 743 |
]. |
744 |
||
9698 | 745 |
"Modified: / 23-01-2011 / 11:05:46 / cg" |
8015 | 746 |
! |
747 |
||
748 |
openFile |
|
9598 | 749 |
"Brings up the default open file dialog. The title is set to 'Open File' |
750 |
and fileSpec is set to '*.*'." |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
751 |
|
9598 | 752 |
self openFile:'*.*'. |
8015 | 753 |
|
9598 | 754 |
"Modified: / 26-10-2010 / 18:47:00 / cg" |
8015 | 755 |
! |
756 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
757 |
openFile:initialFileName |
9598 | 758 |
"Brings up the default open file dialog. The title is set to 'Open File' |
759 |
and fileSpec is set to patternString." |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
760 |
|
9598 | 761 |
self title:'Open'. |
762 |
initialFileName notNil ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
763 |
self initialFileName:initialFileName |
9598 | 764 |
]. |
8015 | 765 |
self |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
766 |
hideReadonly; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
767 |
shareAware; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
768 |
addAllFilesFilter; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
769 |
addFilter:'*.txt' description:'Text Files (*.txt)'. |
9598 | 770 |
Smalltalk isStandAloneApp ifFalse:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
771 |
self addSmalltalkFileFilters |
9598 | 772 |
]. |
773 |
self defFilter isNil ifTrue:[ |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
774 |
self defFilter:'*.*' |
9598 | 775 |
]. |
8015 | 776 |
self open. |
9598 | 777 |
|
778 |
"Modified: / 26-10-2010 / 18:47:03 / cg" |
|
8015 | 779 |
! |
780 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
781 |
openFor:ownerWindow save:isSaveDialog title:titleOrNil inDirectory:dirPathOrNil initialAnswer:initialOrNil filter:filterArrayOrNil extension:extensionOrNil |
9598 | 782 |
self |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
783 |
owner:ownerWindow; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
784 |
title:titleOrNil; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
785 |
initialFileName:initialOrNil; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
786 |
defFilter:extensionOrNil; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
787 |
directory:dirPathOrNil. |
9606 | 788 |
|
8015 | 789 |
filterArrayOrNil notNil ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
790 |
filterArrayOrNil do:[:each | |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
791 |
self addFilter:each last description:each first |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
792 |
]. |
8015 | 793 |
]. |
794 |
self addAllFilesFilter. |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
795 |
|
8015 | 796 |
"/ self defFilter isNil ifTrue:[ self defFilter: '*.*']. |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
797 |
|
9598 | 798 |
isSaveDialog ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
799 |
self |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
800 |
hideReadonly; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
801 |
overwritePrompt; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
802 |
save. |
9598 | 803 |
] ifFalse:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
804 |
self |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
805 |
hideReadonly; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
806 |
shareAware; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
807 |
open. |
9598 | 808 |
]. |
809 |
^ self file |
|
8015 | 810 |
|
9606 | 811 |
"Modified: / 27-10-2010 / 11:10:38 / cg" |
8015 | 812 |
! |
813 |
||
814 |
save |
|
9597 | 815 |
"Brings up the save file dialog." |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
816 |
|
9597 | 817 |
|error rslt openFileNameStructExternalBytes| |
8015 | 818 |
|
9606 | 819 |
[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
820 |
self fillStruct. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
821 |
parent notNil ifTrue:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
822 |
openFileNameStruct hwndOwner:parent. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
823 |
]. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
824 |
style notNil ifTrue:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
825 |
openFileNameStruct flags:style |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
826 |
]. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
827 |
openFileNameStructExternalBytes := ExternalBytes |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
828 |
from:openFileNameStruct asByteArray. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
829 |
rslt := OperatingSystem getSaveFilename:openFileNameStructExternalBytes. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
830 |
rslt ifTrue:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
831 |
self getFileName |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
832 |
] ifFalse:[ |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
833 |
fileName := nil. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
834 |
error := OperatingSystem commDlgExtendedError. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
835 |
]. |
9606 | 836 |
] ensure:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
837 |
openFileNameStructExternalBytes free. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
838 |
self cleanUp. |
9606 | 839 |
]. |
9597 | 840 |
(error notNil and:[ error ~= 0 ]) ifTrue:[ |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
841 |
self error:error |
8015 | 842 |
]. |
843 |
||
13924 | 844 |
"Modified: / 11-02-2014 / 21:13:43 / cg" |
8015 | 845 |
! |
846 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
847 |
saveFile:aString |
9598 | 848 |
"Brings up the save file dialog with aString as the |
849 |
default name. The title is set to 'Save File'." |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
850 |
|
9598 | 851 |
self saveTitle:'Save File' fileName:aString |
8015 | 852 |
|
9598 | 853 |
"Modified: / 26-10-2010 / 18:47:32 / cg" |
8015 | 854 |
! |
855 |
||
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
856 |
saveTitle:aTitle fileName:initialFileName |
9598 | 857 |
"Brings up the file save dialog with aTitle and aString |
858 |
as the default name." |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
859 |
|
9598 | 860 |
self |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
861 |
title:aTitle; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
862 |
initialFileName:initialFileName; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
863 |
hideReadonly; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
864 |
overwritePrompt; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
865 |
addAllFilesFilter; |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
866 |
addFilter:'*.txt' description:'Text Files (*.txt)'. |
9598 | 867 |
self save. |
8015 | 868 |
|
9598 | 869 |
"Modified: / 26-10-2010 / 18:47:35 / cg" |
9698 | 870 |
! |
871 |
||
872 |
synchronousOpen |
|
873 |
"Brings up the open file dialog." |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
874 |
|
9698 | 875 |
self basicOpen. |
876 |
||
877 |
"Modified: / 23-01-2011 / 10:59:20 / cg" |
|
8015 | 878 |
! ! |
879 |
||
880 |
!Win32FileDialog methodsFor:'private'! |
|
881 |
||
882 |
fillStruct |
|
9598 | 883 |
"Private - fills the openFileNameStruct" |
8015 | 884 |
|
16171 | 885 |
|maxPath lpstrFileInOut| |
8015 | 886 |
|
16171 | 887 |
maxPath := 1024. |
16228 | 888 |
lpstrFileInOut := lpstrFile := ExternalBytes new:maxPath. |
16171 | 889 |
lpstrFileInOut replaceFrom:1 to:fileName size with:fileName startingAt:1. |
8015 | 890 |
|
8037 | 891 |
lpstrFilter := ExternalBytes newNullTerminatedFromString: self filters. |
892 |
lpstrInitialDir := ExternalBytes newNullTerminatedFromString: self directory pathName. |
|
8015 | 893 |
|
894 |
openFileNameStruct |
|
16171 | 895 |
lpstrFile: lpstrFileInOut address ; |
896 |
nMaxFile: maxPath; |
|
897 |
lpstrFilter: lpstrFilter address ; |
|
898 |
nFilterIndex: defFilterIndex ; "set by filters" |
|
899 |
lpstrInitialDir: lpstrInitialDir address. |
|
8015 | 900 |
|
16171 | 901 |
defExtension notNil ifTrue: [ |
902 |
lpstrDefExt := ExternalBytes newNullTerminatedFromString: defExtension. |
|
903 |
openFileNameStruct lpstrDefExt: lpstrDefExt address]. |
|
8015 | 904 |
|
16171 | 905 |
title notNil ifTrue: [ |
906 |
lpstrTitle := ExternalBytes newNullTerminatedFromString: title. |
|
907 |
openFileNameStruct lpstrTitle: lpstrTitle address ]. |
|
9598 | 908 |
|
9606 | 909 |
"Modified: / 27-10-2010 / 10:56:01 / cg" |
8015 | 910 |
! |
911 |
||
912 |
getFileName |
|
9598 | 913 |
"Private - get the filename" |
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
914 |
|
9598 | 915 |
|directory| |
8015 | 916 |
|
9598 | 917 |
self style:self flags. |
918 |
fileName := lpstrFile stringAt:1. |
|
919 |
directory := fileName copyFrom:1 to:openFileNameStruct nFileOffset. |
|
920 |
self directory:directory asFilename. |
|
921 |
||
922 |
"Modified: / 26-10-2010 / 18:46:45 / cg" |
|
8015 | 923 |
! ! |
924 |
||
925 |
!Win32FileDialog::OpenFilenameStructure class methodsFor:'accessing'! |
|
926 |
||
16227 | 927 |
fieldNames |
16230 | 928 |
^ #(lStructSize hwndOwner hInstance Flags lpstrFilter lCustData lpstrCustomFilter lpfnHook |
929 |
lpstrDefExt lpstrFile lpstrFileTitle lpstrInitialDir lpTemplateName |
|
930 |
lpstrTitle nFileExtension nFileOffset nFilterIndex nMaxCustFilter nMaxFile |
|
931 |
nMaxFileTitle ) |
|
16227 | 932 |
|
933 |
" |
|
934 |
OLEStructure getFieldInfoFor:self |
|
935 |
" |
|
936 |
! |
|
937 |
||
8015 | 938 |
sizeInBytes |
16169 | 939 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 940 |
^ 152 |
16169 | 941 |
] ifFalse:[ |
942 |
^ 76 |
|
943 |
] |
|
16227 | 944 |
! |
945 |
||
946 |
structureName |
|
947 |
^ 'OPENFILENAME' |
|
948 |
||
949 |
" |
|
950 |
OLEStructure getFieldInfoFor:self |
|
951 |
" |
|
16169 | 952 |
! ! |
8015 | 953 |
|
16169 | 954 |
!Win32FileDialog::OpenFilenameStructure class methodsFor:'documentation'! |
955 |
||
956 |
documentation |
|
957 |
" |
|
958 |
definitely needs a rewrite to use inline C code. |
|
959 |
This is unmaintanable... |
|
960 |
||
961 |
32bit 64bit |
|
962 |
typedef struct tagOFNA { |
|
963 |
DWORD lStructSize; 4 0 4 0 |
|
964 |
HWND hwndOwner; 4 4 8 4 |
|
965 |
HINSTANCE hInstance; 4 8 8 12 |
|
966 |
LPCSTR lpstrFilter; 4 12 8 20 |
|
967 |
LPSTR lpstrCustomFilter; 4 16 8 28 |
|
968 |
DWORD nMaxCustFilter; 4 20 4 36 |
|
969 |
DWORD nFilterIndex; 4 24 4 40 |
|
970 |
LPSTR lpstrFile; 4 28 8 44 |
|
971 |
DWORD nMaxFile; 4 32 4 52 |
|
972 |
LPSTR lpstrFileTitle; 4 36 8 56 |
|
973 |
DWORD nMaxFileTitle; 4 40 4 64 |
|
974 |
LPCSTR lpstrInitialDir; 4 44 8 68 |
|
975 |
LPCSTR lpstrTitle; 4 48 8 76 |
|
976 |
DWORD Flags; 4 52 4 84 |
|
977 |
WORD nFileOffset; 2 56 2 88 |
|
978 |
WORD nFileExtension; 2 58 2 90 |
|
979 |
LPCSTR lpstrDefExt; 4 60 8 92 |
|
980 |
LPARAM lCustData; 4 64 8 100 |
|
981 |
LPOFNHOOKPROC lpfnHook; 4 68 8 108 |
|
982 |
LPCSTR lpTemplateName; 4 72 8 116 |
|
983 |
void *pvReserved; 4 76 8 124 |
|
984 |
DWORD dwReserved; 4 80 4 132 |
|
985 |
DWORD FlagsEx; 4 84 4 136 |
|
986 |
} OPENFILENAMEA,*LPOPENFILENAMEA; 88 140 |
|
987 |
||
988 |
" |
|
8015 | 989 |
! ! |
990 |
||
991 |
!Win32FileDialog::OpenFilenameStructure class methodsFor:'instance creation'! |
|
992 |
||
993 |
new |
|
994 |
||
995 |
^ super new: self sizeInBytes |
|
996 |
! ! |
|
997 |
||
998 |
!Win32FileDialog::OpenFilenameStructure methodsFor:'accessing'! |
|
999 |
||
1000 |
flags |
|
1001 |
"Answer the receiver's flags field as a Smalltalk object." |
|
1002 |
||
16169 | 1003 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16227 | 1004 |
^ self unsignedInt32At: 96+1 |
16169 | 1005 |
] ifFalse:[ |
1006 |
^ self unsignedInt32At: 52+1 |
|
1007 |
] |
|
8015 | 1008 |
! |
1009 |
||
1010 |
flags: anObject |
|
1011 |
"Set the receiver's flags field as a Smalltalk object." |
|
1012 |
||
16169 | 1013 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16227 | 1014 |
self unsignedInt32At: 96+1 put: anObject |
16169 | 1015 |
] ifFalse:[ |
1016 |
self unsignedInt32At: 52+1 put: anObject |
|
1017 |
] |
|
8015 | 1018 |
! |
1019 |
||
1020 |
hInstance |
|
1021 |
"Get the receiver's hInstance field." |
|
1022 |
||
16169 | 1023 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16227 | 1024 |
^ self unsignedInt64At: 16+1 |
16169 | 1025 |
] ifFalse:[ |
1026 |
^ self unsignedInt32At: 8+1 |
|
1027 |
] |
|
8015 | 1028 |
! |
1029 |
||
16169 | 1030 |
hInstance: anInteger |
1031 |
"Set the receiver's hInstance field to the value of anInteger." |
|
8015 | 1032 |
|
16169 | 1033 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16227 | 1034 |
self unsignedInt64At: 16+1 put: anInteger |
16169 | 1035 |
] ifFalse:[ |
1036 |
self unsignedInt32At: 8+1 put: anInteger |
|
1037 |
] |
|
8015 | 1038 |
! |
1039 |
||
1040 |
hwndOwner |
|
1041 |
"Get the receiver's hwndOwner field." |
|
1042 |
||
16169 | 1043 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16227 | 1044 |
^ self unsignedInt64At: 8+1 |
16169 | 1045 |
] ifFalse:[ |
1046 |
^ self unsignedInt32At: 4+1 |
|
1047 |
] |
|
8015 | 1048 |
! |
1049 |
||
16169 | 1050 |
hwndOwner: anInteger |
1051 |
"Set the receiver's hwndOwner field to the value of anInteger." |
|
8015 | 1052 |
|
16169 | 1053 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16227 | 1054 |
self unsignedInt64At: 8+1 put: anInteger |
16169 | 1055 |
] ifFalse:[ |
1056 |
self unsignedInt32At: 4+1 put: anInteger |
|
1057 |
] |
|
8015 | 1058 |
! |
1059 |
||
1060 |
lCustData |
|
1061 |
"Get the receiver's lCustData field." |
|
1062 |
||
16169 | 1063 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1064 |
^ self unsignedInt64At: 112+1 |
16169 | 1065 |
] ifFalse:[ |
1066 |
^ self unsignedInt32At: 64+1 |
|
1067 |
] |
|
8015 | 1068 |
! |
1069 |
||
1070 |
lCustData: anObject |
|
1071 |
"Set the receiver's lCustData field as a Smalltalk object." |
|
1072 |
||
16169 | 1073 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1074 |
self unsignedInt64At: 112+1 put: anObject |
16169 | 1075 |
] ifFalse:[ |
1076 |
self unsignedInt32At: 64+1 put: anObject |
|
1077 |
] |
|
8015 | 1078 |
! |
1079 |
||
1080 |
lStructSize |
|
1081 |
"Get the receiver's lStructSize field." |
|
1082 |
||
16169 | 1083 |
^ self unsignedInt32At: 0+1 |
8015 | 1084 |
! |
1085 |
||
1086 |
lStructSize: anObject |
|
1087 |
"Set the receiver's lStructSize field to the value of anObject." |
|
1088 |
||
16169 | 1089 |
self unsignedInt32At:0+1 put:anObject |
8015 | 1090 |
! |
1091 |
||
1092 |
lpfnHook |
|
1093 |
"Get the receiver's lpfnHook field." |
|
1094 |
||
16169 | 1095 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1096 |
^ self unsignedInt64At: 120+1 |
16169 | 1097 |
] ifFalse:[ |
1098 |
^ self unsignedInt32At: 68+1 |
|
1099 |
] |
|
8015 | 1100 |
! |
1101 |
||
1102 |
lpfnHook: anObject |
|
1103 |
"Set the receiver's lpfnHook field to the value of anObject." |
|
1104 |
||
16169 | 1105 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1106 |
^ self unsignedInt64At: 120+1 put: anObject |
16169 | 1107 |
] ifFalse:[ |
1108 |
^ self unsignedInt32At: 68+1 put: anObject |
|
1109 |
] |
|
8015 | 1110 |
! |
1111 |
||
1112 |
lpstrCustomFilter |
|
1113 |
"Get the receiver's lpstrCustomFilter field." |
|
1114 |
||
16169 | 1115 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1116 |
^ self unsignedInt64At: 32+1 |
16169 | 1117 |
] ifFalse:[ |
1118 |
^ self unsignedInt32At: 16+1 |
|
1119 |
] |
|
8015 | 1120 |
! |
1121 |
||
1122 |
lpstrCustomFilter: anObject |
|
1123 |
"Set the receiver's lpstrCustomFilter field to the value of anObject." |
|
1124 |
||
16169 | 1125 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1126 |
^ self unsignedInt64At: 32+1 put: anObject |
16169 | 1127 |
] ifFalse:[ |
1128 |
^ self unsignedInt32At: 16+1 put: anObject |
|
1129 |
] |
|
8015 | 1130 |
! |
1131 |
||
1132 |
lpstrDefExt |
|
1133 |
"Get the receiver's lpstrDefExt field." |
|
1134 |
||
16169 | 1135 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1136 |
^ self unsignedInt64At: 104+1 |
16169 | 1137 |
] ifFalse:[ |
1138 |
^ self unsignedInt32At: 60+1 |
|
1139 |
] |
|
8015 | 1140 |
! |
1141 |
||
1142 |
lpstrDefExt: anObject |
|
1143 |
"Set the receiver's lpstrDefExt field to the value of anObject." |
|
1144 |
||
16169 | 1145 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1146 |
^ self unsignedInt64At: 104+1 put: anObject |
16169 | 1147 |
] ifFalse:[ |
1148 |
^ self unsignedInt32At: 60+1 put: anObject |
|
1149 |
] |
|
8015 | 1150 |
! |
1151 |
||
1152 |
lpstrFile |
|
1153 |
"Get the receiver's lpstrFile field." |
|
1154 |
||
16169 | 1155 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1156 |
^ self unsignedInt64At: 48+1 |
16169 | 1157 |
] ifFalse:[ |
1158 |
^ self unsignedInt32At: 28+1 |
|
1159 |
] |
|
8015 | 1160 |
! |
1161 |
||
1162 |
lpstrFile: anObject |
|
1163 |
"Set the receiver's lpstrFile field to the value of anObject." |
|
1164 |
||
16169 | 1165 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1166 |
^ self unsignedInt64At: 48+1 put: anObject |
16169 | 1167 |
] ifFalse:[ |
1168 |
^ self unsignedInt32At: 28+1 put: anObject |
|
1169 |
] |
|
8015 | 1170 |
! |
1171 |
||
1172 |
lpstrFileTitle |
|
1173 |
"Get the receiver's lpstrFileTitle field." |
|
1174 |
||
16169 | 1175 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1176 |
^ self unsignedInt64At: 64+1 |
16169 | 1177 |
] ifFalse:[ |
1178 |
^ self unsignedInt32At: 36+1 |
|
1179 |
] |
|
8015 | 1180 |
! |
1181 |
||
1182 |
lpstrFileTitle: anObject |
|
1183 |
"Set the receiver's lpstrFileTitle field to the value of anObject." |
|
1184 |
||
16169 | 1185 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1186 |
^ self unsignedInt64At: 64+1 put: anObject |
16169 | 1187 |
] ifFalse:[ |
1188 |
^ self unsignedInt32At: 36+1 put: anObject |
|
1189 |
] |
|
8015 | 1190 |
! |
1191 |
||
1192 |
lpstrFilter |
|
1193 |
"Get the receiver's lpstrFilter field." |
|
1194 |
||
16169 | 1195 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1196 |
^ self unsignedInt64At: 24+1 |
16169 | 1197 |
] ifFalse:[ |
1198 |
^ self unsignedInt32At: 12+1 |
|
1199 |
] |
|
8015 | 1200 |
! |
1201 |
||
1202 |
lpstrFilter: anObject |
|
1203 |
"Set the receiver's lpstrFilter field to the value of anObject." |
|
1204 |
||
16169 | 1205 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1206 |
^ self unsignedInt64At: 24+1 put: anObject |
16169 | 1207 |
] ifFalse:[ |
1208 |
^ self unsignedInt32At: 12+1 put: anObject |
|
1209 |
] |
|
8015 | 1210 |
! |
1211 |
||
1212 |
lpstrInitialDir |
|
1213 |
"Get the receiver's lpstrInitialDir field." |
|
1214 |
||
16169 | 1215 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1216 |
^ self unsignedInt64At: 80+1 |
16169 | 1217 |
] ifFalse:[ |
1218 |
^ self unsignedInt32At: 44+1 |
|
1219 |
] |
|
8015 | 1220 |
! |
1221 |
||
1222 |
lpstrInitialDir: anObject |
|
1223 |
"Set the receiver's lpstrInitialDir field to the value of anObject." |
|
1224 |
||
16169 | 1225 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1226 |
^ self unsignedInt64At: 80+1 put: anObject |
16169 | 1227 |
] ifFalse:[ |
1228 |
^ self unsignedInt32At: 44+1 put: anObject |
|
1229 |
] |
|
8015 | 1230 |
! |
1231 |
||
1232 |
lpstrTemplateName |
|
1233 |
"Get the receiver's lpstrTemplateName field." |
|
1234 |
||
16169 | 1235 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1236 |
^ self unsignedInt64At: 128+1 |
16169 | 1237 |
] ifFalse:[ |
1238 |
^ self unsignedInt32At: 72+1 |
|
1239 |
] |
|
8015 | 1240 |
! |
1241 |
||
1242 |
lpstrTemplateName: anObject |
|
1243 |
"Set the receiver's lpstrTemplateName field to the value of anObject." |
|
1244 |
||
16169 | 1245 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1246 |
^ self unsignedInt64At: 128+1 put: anObject |
16169 | 1247 |
] ifFalse:[ |
1248 |
^ self unsignedInt32At: 72+1 put: anObject |
|
1249 |
] |
|
8015 | 1250 |
! |
1251 |
||
1252 |
lpstrTitle |
|
1253 |
"Get the receiver's lpstrTitle field." |
|
1254 |
||
16169 | 1255 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1256 |
^ self unsignedInt64At: 88+1 |
16169 | 1257 |
] ifFalse:[ |
1258 |
^ self unsignedInt32At: 48+1 |
|
1259 |
] |
|
8015 | 1260 |
! |
1261 |
||
1262 |
lpstrTitle: anObject |
|
1263 |
"Set the receiver's lpstrTitle field to the value of anObject." |
|
1264 |
||
16169 | 1265 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1266 |
^ self unsignedInt64At: 88+1 put: anObject |
16169 | 1267 |
] ifFalse:[ |
1268 |
^ self unsignedInt32At: 48+1 put: anObject |
|
1269 |
] |
|
8015 | 1270 |
! |
1271 |
||
1272 |
nFileExtension |
|
1273 |
"Get the receiver's nFileExtension field." |
|
1274 |
||
16169 | 1275 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1276 |
^ self unsignedInt16At: 102+1 |
16169 | 1277 |
] ifFalse:[ |
1278 |
^ self unsignedInt16At: 58+1 |
|
1279 |
] |
|
8015 | 1280 |
! |
1281 |
||
1282 |
nFileExtension: anObject |
|
1283 |
"Set the receiver's nFileExtension field to the value of anObject." |
|
1284 |
||
16169 | 1285 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1286 |
^ self unsignedInt16At: 102+1 put: anObject |
16169 | 1287 |
] ifFalse:[ |
1288 |
^ self unsignedInt16At: 58+1 put: anObject |
|
1289 |
] |
|
8015 | 1290 |
! |
1291 |
||
1292 |
nFileOffset |
|
1293 |
"Get the receiver's nFileOffset field." |
|
1294 |
||
16169 | 1295 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1296 |
^ self unsignedInt16At: 100+1 |
16169 | 1297 |
] ifFalse:[ |
1298 |
^ self unsignedInt16At: 56+1 |
|
1299 |
] |
|
8015 | 1300 |
! |
1301 |
||
1302 |
nFileOffset: anObject |
|
1303 |
"Set the receiver's nFileOffset field to the value of anObject." |
|
1304 |
||
16169 | 1305 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1306 |
^ self unsignedInt16At: 100+1 put: anObject |
16169 | 1307 |
] ifFalse:[ |
1308 |
^ self unsignedInt16At: 56+1 put: anObject |
|
1309 |
] |
|
8015 | 1310 |
! |
1311 |
||
1312 |
nFilterIndex |
|
1313 |
"Get the receiver's nFilterIndex field." |
|
1314 |
||
16169 | 1315 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1316 |
^ self unsignedInt32At: 44+1 |
16169 | 1317 |
] ifFalse:[ |
1318 |
^ self unsignedInt32At: 24+1 |
|
1319 |
] |
|
8015 | 1320 |
! |
1321 |
||
1322 |
nFilterIndex: anObject |
|
1323 |
"Set the receiver's nFilterIndex field to the value of anObject." |
|
1324 |
||
16169 | 1325 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1326 |
^ self unsignedInt32At: 44+1 put: anObject |
16169 | 1327 |
] ifFalse:[ |
1328 |
^ self unsignedInt32At: 24+1 put: anObject |
|
1329 |
] |
|
8015 | 1330 |
! |
1331 |
||
1332 |
nMaxCustFilter |
|
1333 |
"Get the receiver's nMaxCustFilter field." |
|
1334 |
||
16169 | 1335 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1336 |
^ self unsignedInt32At: 40+1 |
16169 | 1337 |
] ifFalse:[ |
1338 |
^ self unsignedInt32At: 20+1 |
|
1339 |
] |
|
8015 | 1340 |
! |
1341 |
||
1342 |
nMaxCustFilter: anObject |
|
1343 |
"Set the receiver's nMaxCustFilter field to the value of anObject." |
|
1344 |
||
16169 | 1345 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1346 |
^ self unsignedInt32At: 40+1 put: anObject |
16169 | 1347 |
] ifFalse:[ |
1348 |
^ self unsignedInt32At: 20+1 put: anObject |
|
1349 |
] |
|
8015 | 1350 |
! |
1351 |
||
1352 |
nMaxFile |
|
1353 |
"Get the receiver's nMaxFile field." |
|
1354 |
||
16169 | 1355 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1356 |
^ self unsignedInt32At: 56+1 |
16169 | 1357 |
] ifFalse:[ |
1358 |
^ self unsignedInt32At: 32+1 |
|
1359 |
] |
|
8015 | 1360 |
! |
1361 |
||
1362 |
nMaxFile: anObject |
|
1363 |
"Set the receiver's nMaxFile field to the value of anObject." |
|
1364 |
||
16169 | 1365 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1366 |
^ self unsignedInt32At: 56+1 put: anObject |
16169 | 1367 |
] ifFalse:[ |
1368 |
^ self unsignedInt32At: 32+1 put: anObject |
|
1369 |
] |
|
8015 | 1370 |
! |
1371 |
||
1372 |
nMaxFileTitle |
|
1373 |
"Get the receiver's nMaxFileTitle field." |
|
1374 |
||
16169 | 1375 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1376 |
^ self unsignedInt32At: 72+1 |
16169 | 1377 |
] ifFalse:[ |
1378 |
^ self unsignedInt32At: 40+1 |
|
1379 |
] |
|
8015 | 1380 |
! |
1381 |
||
1382 |
nMaxFileTitle: anObject |
|
1383 |
"Set the receiver's nMaxFileTitle field to the value of anObject." |
|
1384 |
||
16169 | 1385 |
ExternalAddress pointerSize == 8 ifTrue:[ |
16230 | 1386 |
^ self unsignedInt32At: 72+1 put: anObject |
16169 | 1387 |
] ifFalse:[ |
1388 |
^ self unsignedInt32At: 40+1 put: anObject |
|
1389 |
] |
|
8015 | 1390 |
! |
1391 |
||
1392 |
sizeInBytes |
|
1393 |
||
1394 |
^ self class sizeInBytes |
|
1395 |
! ! |
|
1396 |
||
1397 |
!Win32FileDialog::OpenFilenameStructure methodsFor:'printing'! |
|
1398 |
||
1399 |
printOn: aStream |
|
1400 |
||
1401 |
super printOn: aStream. |
|
1402 |
aStream cr. |
|
1403 |
aStream nextPutAll:'flags: ', self flags printString; cr. |
|
1404 |
aStream nextPutAll:'hInstance: ', self hInstance printString; cr. |
|
1405 |
aStream nextPutAll:'hwndOwner: ', self hwndOwner printString; cr. |
|
1406 |
aStream nextPutAll:'lCustData: ', self lCustData printString; cr. |
|
1407 |
aStream nextPutAll:'lpfnHook: ', self lpfnHook printString; cr. |
|
1408 |
aStream nextPutAll:'lpstrCustomFilter: ', self lpstrCustomFilter printString; cr. |
|
1409 |
aStream nextPutAll:'lpstrDefExt: ', self lpstrDefExt printString; cr. |
|
1410 |
aStream nextPutAll:'lpstrFile: ', self lpstrFile printString; cr. |
|
1411 |
aStream nextPutAll:'lpstrFileTitle: ', self lpstrFileTitle printString; cr. |
|
1412 |
aStream nextPutAll:'lpstrFilter: ', self lpstrFilter printString; cr. |
|
1413 |
aStream nextPutAll:'lpstrInitialDir: ', self lpstrInitialDir printString; cr. |
|
1414 |
aStream nextPutAll:'lpstrTemplateName: ', self lpstrTemplateName printString; cr. |
|
1415 |
aStream nextPutAll:'lStructSize: ', self lStructSize printString; cr. |
|
14829
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
1416 |
aStream nextPutAll:'nFileExtension: ', self nFileExtension printString; cr. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
1417 |
aStream nextPutAll:'nFileOffset: ', self nFileOffset printString; cr. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
1418 |
aStream nextPutAll:'nFilterIndex: ', self nFilterIndex printString; cr. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
1419 |
aStream nextPutAll:'nMaxCustFilter: ', self nMaxCustFilter printString; cr. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
1420 |
aStream nextPutAll:'nMaxFile: ', self nMaxFile printString; cr. |
82b109435616
do not hardcode program files
Claus Gittinger <cg@exept.de>
parents:
13924
diff
changeset
|
1421 |
aStream nextPutAll:'nMaxFileTitle: ', self nMaxFileTitle printString; cr. |
8015 | 1422 |
! ! |
1423 |
||
1424 |
!Win32FileDialog class methodsFor:'documentation'! |
|
1425 |
||
1426 |
version |
|
16169 | 1427 |
^ '$Header$' |
9345 | 1428 |
! |
1429 |
||
1430 |
version_CVS |
|
16169 | 1431 |
^ '$Header$' |
8015 | 1432 |
! ! |
9597 | 1433 |
|
13577 | 1434 |
|
9597 | 1435 |
Win32FileDialog initialize! |