comment/format
authorClaus Gittinger <cg@exept.de>
Mon, 01 Feb 2010 10:51:29 +0100
changeset 9345 fa51879ca252
parent 9344 9e053bacf75a
child 9346 4a0b3584f5aa
comment/format
Win32FileDialog.st
--- a/Win32FileDialog.st	Thu Jan 28 11:49:30 2010 +0100
+++ b/Win32FileDialog.st	Mon Feb 01 10:51:29 2010 +0100
@@ -46,9 +46,8 @@
 !Win32FileDialog class methodsFor:'initialization'!
 
 startUp
-
-        "Private - Initialize the class variables.  This is called
-         during startup."
+    "Private - Initialize the class variables.  
+     This is called during startup."
 
     InitialDirectory := Directory pathName: Disk drivePathName.
 ! !
@@ -56,8 +55,7 @@
 !Win32FileDialog class methodsFor:'instance creation'!
 
 new
-
-    ^ super new initialize
+    ^ self basicNew initialize
 ! !
 
 !Win32FileDialog class methodsFor:'accessing'!
@@ -81,7 +79,9 @@
 
 commonDialogConstants
 
-    CommonDialogConstants isNil ifTrue:[CommonDialogConstants := self generateCommonDialogConstants ].
+    CommonDialogConstants isNil ifTrue:[
+        CommonDialogConstants := self generateCommonDialogConstants 
+    ].
     ^ CommonDialogConstants
 !
 
@@ -91,113 +91,111 @@
 
     dictionary := Dictionary new.
     dictionary
-    at: 'CcPreventfullopen' put: 4;
-    at: 'FrShowhelp' put: 128;
-    at: 'PdEnablesetuptemplate' put: 32768;
-    at: 'FrNoupdown' put: 1024;
-    at: 'CfNosimulations' put: 4096;
-    at: 'OfnPathmustexist' put: 2048;
-    at: 'CfWysiwyg' put: 32768;
-    at: 'PdReturndc' put: 256;
-    at: 'PdEnableprinthook' put: 4096;
-    at: 'CfInittologfontstruct' put: 64;
-    at: 'CfScalableonly' put: 131072;
-    at: 'PdPrinttofile' put: 32;
-    at: 'CfEffects' put: 256;
-    at: 'PdShowhelp' put: 2048;
-    at: 'OfnEnabletemplatehandle' put: 128;
-    at: 'CfBoth' put: 3;
-    at: 'OfnReadonly' put: 1;
-    at: 'PdNopagenums' put: 8;
-    at: 'PdDisableprinttofile' put: 524288;
-    at: 'PdHideprinttofile' put: 1048576;
-    at: 'OfnAllowmultiselect' put: 512;
-    at: 'CfPrinterfonts' put: 2;
-    at: 'CfEnabletemplatehandle' put: 32;
-    at: 'PdSelection' put: 1;
-    at: 'OfnHidereadonly' put: 4;
-    at: 'PdPrintsetup' put: 64;
-    at: 'OfnExtentiondifferent' put: 1024;
-    at: 'FrReplaceall' put: 32;
-    at: 'FrMatchcase' put: 4;
-    at: 'OfnFilemustexist' put: 4096;
-    at: 'PdCollate' put: 16;
-    at: 'CfFixedpitchonly' put: 16384;
-    at: 'PdEnablesetuphook' put: 8192;
-    at: 'OfnShareaware' put: 16384;
-    at: 'CcEnablehook' put: 16;
-    at: 'CfEnabletemplate' put: 16;
-    at: 'Findmsgstring' put: 'commdlgFindreplace';
-    at: 'CfLimitsize' put: 8192;
-    at: 'OfnNochangedir' put: 8;
-    at: 'OfnCreateprompt' put: 8192;
-    at: 'ScreenFonttype' put: 8192;
-    at: 'PdUsedevmodecopies' put: 262144;
-    at: 'CcRgbinit' put: 1;
-    at: 'FrFindnext' put: 8;
-    at: 'CfUsestyle' put: 128;
-    at: 'FrEnablehook' put: 256;
-    at: 'PdEnableprinttemplatehandle' put: 65536;
-    at: 'CfShowhelp' put: 4;
-    at: 'FrNowholeword' put: 4096.
-    dictionary
-    at: 'ShareExist' put: 16448;
-    at: 'OfnOverwriteprompt' put: 2;
-    at: 'OfnEnablehook' put: 32;
-    at: 'OfnShowhelp' put: 16;
-    at: 'CcEnabletemplatehandle' put: 64;
-    at: 'SimulatedFonttype' put: 32768;
-    at: 'FrDown' put: 1;
-    at: 'PdEnableprinttemplate' put: 16384;
-    at: 'CfNovectorfonts' put: 2048;
-    at: 'PdNoselection' put: 4;
-    at: 'CfAnsionly' put: 1024;
-    at: 'OfnNovalidate' put: 256;
-    at: 'CfScreenfonts' put: 1;
-    at: 'FrWholeword' put: 2;
-    at: 'FrEnabletemplatehandle' put: 8192;
-    at: 'PdAllpages' put: 0;
-    at: 'CfForcefontexist' put: 65536;
-    at: 'CcEnabletemplate' put: 32;
-    at: 'PdPagenums' put: 2;
-    at: 'FrReplace' put: 16;
-    at: 'PdEnablesetuptemplatehandle' put: 131072;
-    at: 'CfApply' put: 512;
-    at: 'OfnEnabletemplate' put: 64;
-    at: 'DnDefaultprn' put: 1;
-    at: 'PdNowarning' put: 128;
-    at: 'CfTtonly' put: 262144;
-    at: 'PrinterFonttype' put: 16384;
-    at: 'CcShowhelp' put: 8;
-    at: 'CcFullopen' put: 2;
-    at: 'PdReturnic' put: 512;
-    at: 'FrEnabletemplate' put: 512;
-    at: 'FrDialogterm' put: 64;
-    at: 'Helpmsgstring' put: 'commdlgHelp';
-    at: 'PdReturndefault' put: 1024;
-    at: 'FrNomatchcase' put: 2048;
-    at: 'CfEnablehook' put: 8.
+        at: 'CcPreventfullopen' put: 4;
+        at: 'FrShowhelp' put: 128;
+        at: 'PdEnablesetuptemplate' put: 32768;
+        at: 'FrNoupdown' put: 1024;
+        at: 'CfNosimulations' put: 4096;
+        at: 'OfnPathmustexist' put: 2048;
+        at: 'CfWysiwyg' put: 32768;
+        at: 'PdReturndc' put: 256;
+        at: 'PdEnableprinthook' put: 4096;
+        at: 'CfInittologfontstruct' put: 64;
+        at: 'CfScalableonly' put: 131072;
+        at: 'PdPrinttofile' put: 32;
+        at: 'CfEffects' put: 256;
+        at: 'PdShowhelp' put: 2048;
+        at: 'OfnEnabletemplatehandle' put: 128;
+        at: 'CfBoth' put: 3;
+        at: 'OfnReadonly' put: 1;
+        at: 'PdNopagenums' put: 8;
+        at: 'PdDisableprinttofile' put: 524288;
+        at: 'PdHideprinttofile' put: 1048576;
+        at: 'OfnAllowmultiselect' put: 512;
+        at: 'CfPrinterfonts' put: 2;
+        at: 'CfEnabletemplatehandle' put: 32;
+        at: 'PdSelection' put: 1;
+        at: 'OfnHidereadonly' put: 4;
+        at: 'PdPrintsetup' put: 64;
+        at: 'OfnExtentiondifferent' put: 1024;
+        at: 'FrReplaceall' put: 32;
+        at: 'FrMatchcase' put: 4;
+        at: 'OfnFilemustexist' put: 4096;
+        at: 'PdCollate' put: 16;
+        at: 'CfFixedpitchonly' put: 16384;
+        at: 'PdEnablesetuphook' put: 8192;
+        at: 'OfnShareaware' put: 16384;
+        at: 'CcEnablehook' put: 16;
+        at: 'CfEnabletemplate' put: 16;
+        at: 'Findmsgstring' put: 'commdlgFindreplace';
+        at: 'CfLimitsize' put: 8192;
+        at: 'OfnNochangedir' put: 8;
+        at: 'OfnCreateprompt' put: 8192;
+        at: 'ScreenFonttype' put: 8192;
+        at: 'PdUsedevmodecopies' put: 262144;
+        at: 'CcRgbinit' put: 1;
+        at: 'FrFindnext' put: 8;
+        at: 'CfUsestyle' put: 128;
+        at: 'FrEnablehook' put: 256;
+        at: 'PdEnableprinttemplatehandle' put: 65536;
+        at: 'CfShowhelp' put: 4;
+        at: 'FrNowholeword' put: 4096.
+        dictionary
+        at: 'ShareExist' put: 16448;
+        at: 'OfnOverwriteprompt' put: 2;
+        at: 'OfnEnablehook' put: 32;
+        at: 'OfnShowhelp' put: 16;
+        at: 'CcEnabletemplatehandle' put: 64;
+        at: 'SimulatedFonttype' put: 32768;
+        at: 'FrDown' put: 1;
+        at: 'PdEnableprinttemplate' put: 16384;
+        at: 'CfNovectorfonts' put: 2048;
+        at: 'PdNoselection' put: 4;
+        at: 'CfAnsionly' put: 1024;
+        at: 'OfnNovalidate' put: 256;
+        at: 'CfScreenfonts' put: 1;
+        at: 'FrWholeword' put: 2;
+        at: 'FrEnabletemplatehandle' put: 8192;
+        at: 'PdAllpages' put: 0;
+        at: 'CfForcefontexist' put: 65536;
+        at: 'CcEnabletemplate' put: 32;
+        at: 'PdPagenums' put: 2;
+        at: 'FrReplace' put: 16;
+        at: 'PdEnablesetuptemplatehandle' put: 131072;
+        at: 'CfApply' put: 512;
+        at: 'OfnEnabletemplate' put: 64;
+        at: 'DnDefaultprn' put: 1;
+        at: 'PdNowarning' put: 128;
+        at: 'CfTtonly' put: 262144;
+        at: 'PrinterFonttype' put: 16384;
+        at: 'CcShowhelp' put: 8;
+        at: 'CcFullopen' put: 2;
+        at: 'PdReturnic' put: 512;
+        at: 'FrEnabletemplate' put: 512;
+        at: 'FrDialogterm' put: 64;
+        at: 'Helpmsgstring' put: 'commdlgHelp';
+        at: 'PdReturndefault' put: 1024;
+        at: 'FrNomatchcase' put: 2048;
+        at: 'CfEnablehook' put: 8.
     ^ dictionary
 ! !
 
 !Win32FileDialog class methodsFor:'examples'!
 
 openFile
+    ^ (Win32FileDialog new openFile: 'c:\untitled.txt') file.
 
     "
-        self openFile
+     self openFile
     "
-
-    ^ (Win32FileDialog new openFile: 'c:\untitled.txt') file.
 !
 
 saveFile
+    ^ (Win32FileDialog new saveFile: 'C:\vsw311\untitled.txt') file.
 
     "
-        self saveFile
+     self saveFile
     "
-
-    ^ (Win32FileDialog new saveFile: 'C:\vsw311\untitled.txt') file.
 ! !
 
 !Win32FileDialog class methodsFor:'filters'!
@@ -254,14 +252,9 @@
 
 !Win32FileDialog class methodsFor:'opening'!
 
-fileDialogFor:ownerWindow 
-         save:isSaveDialog 
-        title:titleOrNil 
-  inDirectory:dirPathOrNil
-initialAnswer:initialOrNil
-       filter:pattern
-    extension:extensionOrNil
-
+fileDialogFor:ownerWindow save:isSaveDialog 
+    title:titleOrNil inDirectory:dirPathOrNil initialAnswer:initialOrNil
+    filter:pattern extension:extensionOrNil
 
     "start a native open-file dialog.
      If not cancelled, the selected fileName is returned; nil otherwise.
@@ -275,14 +268,15 @@
 
     filterArrayOrNil := self filtersFor: pattern.
 
-    filePath := self new
-        openFor:ownerWindow
-           save:isSaveDialog
-          title:titleOrNil
-    inDirectory:dirPathOrNil
-  initialAnswer:initialOrNil
-         filter:filterArrayOrNil
-      extension:extensionOrNil.
+    filePath := 
+        self new
+            openFor:ownerWindow
+            save:isSaveDialog
+            title:titleOrNil
+            inDirectory:dirPathOrNil
+            initialAnswer:initialOrNil
+            filter:filterArrayOrNil
+            extension:extensionOrNil.
 
     ^ filePath
 ! !
@@ -1066,5 +1060,9 @@
 !Win32FileDialog class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Win32FileDialog.st,v 1.6 2008-11-05 14:02:00 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Win32FileDialog.st,v 1.7 2010-02-01 09:51:29 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libtool/Win32FileDialog.st,v 1.7 2010-02-01 09:51:29 cg Exp $'
 ! !