Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r7 - trunk

genelib
Discussion topic

Back to topic list

svn commit: r7 - trunk

Author lotec
Full name Jan Bogaerts
Date 2005-07-15 07:44:50 PDT
Message Author: lotec
Date: Fri Jul 15 07:44:50 2005
New Revision: 7

Added:
   trunk/ComDlg.gen
   trunk/Dialogs.gen
Log:
Added units for common dialogs (not yet working)

Added: trunk/ComDlg.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/trunk/ComDlg​.gen?view=auto&r​ev=7
====================​====================​====================​==================
--- (empty file)
+++ trunk/ComDlg.gen Fri Jul 15 07:44:50 2005
@@ -0,0 +1,110 @@
+//copyright LoTeC (Jan Bogaerts) 2005
+
+//This unit is part of the Gene standarad library
+
+//This program is free software; you can redistribute it and/or modify
+//it under the terms of the Lesser GNU General Public License as published by
+//the Free Software Foundation; either version 2.1 of the License, or
+//(at your option) any later version.
+
+//This program is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//Lesser GNU General Public License for more details.
+
+//You should have received a copy of the Lesser GNU General Public License
+//along with this program; if not, write to the Free Software
+//Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+include windowsCommon;
+
+rename LPOFNHOOKPROC = exp LPOFNHOOKPROC(aHandle: THAndle, adword: dword, aWParam: int, aLParam: int): pointer stdcall static;
+
+struct OPENFILENAMEA =
+ var lStructSize: dword
+ hwndOwner: THandle
+ hInstance: HINSTANCE
+ lpstrFilter: char^
+ lpstrCustomFilter: char^
+ nMaxCustFilter: dword
+ nFilterIndex: dword
+ lpstrFile: char^
+ nMaxFile: dword
+ lpstrFileTitle: char^
+ nMaxFileTitle: dword
+ lpstrInitialDir: char^
+ lpstrTitle char^
+ Flags: dword
+ nFileOffset: word
+ nFileExtension: word
+ lpstrDefExt: char^
+ lCustData: int
+ lpfnHook: LPOFNHOOKPROC
+ lpTemplateName: char^
+;
+
+struct OPENFILENAMEW =
+ var lStructSize: dword
+ hwndOwner: THandle
+ hInstance: HINSTANCE
+ lpstrFilter: short^
+ lpstrCustomFilter: short^
+ nMaxCustFilter: dword
+ nFilterIndex: dword
+ lpstrFile: short^
+ nMaxFile: dword
+ lpstrFileTitle: short^
+ nMaxFileTitle: dword
+ lpstrInitialDir: short^
+ lpstrTitle short^
+ Flags: dword
+ nFileOffset: word
+ nFileExtension: word
+ lpstrDefExt: short^
+ lCustData: int
+ lpfnHook: LPOFNHOOKPROC
+ lpTemplateName: short^
+;
+
+//rename the struct depending on the unicode
+#[#<-UniCode == false->
+ rename OPENFILENAME = OPENFILENAMEA;
+ #<-->
+ rename OPENFILENAME = OPENFILENAMEW;
+#]
+
+
+lib lComdlg32 =
+;
+
+var Comdlg32: lComdlg32;
+
+
+const =
+ OFN_READONLY = 0x00000001
+ OFN_OVERWRITEPROMPT = 0x00000002
+ OFN_HIDEREADONLY = 0x00000004
+ OFN_NOCHANGEDIR = 0x00000008
+ OFN_SHOWHELP = 0x00000010
+ OFN_ENABLEHOOK = 0x00000020
+ OFN_ENABLETEMPLATE = 0x00000040
+ OFN_ENABLETEMPLATEHANDLE = 0x00000080
+ OFN_NOVALIDATE = 0x00000100
+ OFN_ALLOWMULTISELECT = 0x00000200
+ OFN_EXTENSIONDIFFERENT = 0x00000400
+ OFN_PATHMUSTEXIST = 0x00000800
+ OFN_FILEMUSTEXIST = 0x00001000
+ OFN_CREATEPROMPT = 0x00002000
+ OFN_SHAREAWARE = 0x00004000
+ OFN_NOREADONLYRETURN = 0x00008000
+ OFN_NOTESTFILECREATE = 0x00010000
+ OFN_NONETWORKBUTTON = 0x00020000
+ OFN_NOLONGNAMES = 0x00040000
+ OFN_EXPLORER = 0x00080000
+ OFN_NODEREFERENCELINKS = 0x00100000
+ OFN_LONGNAMES = 0x00200000
+ OFN_ENABLEINCLUDENOTIFY = 0x00400000
+ OFN_ENABLESIZING = 0x00800000
+ OFN_DONTADDTORECENT = 0x02000000
+ OFN_FORCESHOWHIDDEN = 0x10000000
+;
\ No newline at end of file

Added: trunk/Dialogs.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/trunk/Dialog​s.gen?view=auto&​rev=7
====================​====================​====================​==================
--- (empty file)
+++ trunk/Dialogs.gen Fri Jul 15 07:44:50 2005
@@ -0,0 +1,268 @@
+//copyright LoTeC (Jan Bogaerts) 2005
+
+include ComDlg;
+
+space sBaseFileDialog =
+ var fFlags: int = 0 //stores the flags
+ Filter: StringList //the filters to show (as in '*.* *.txt, ...)
+ FilterIndex: int = 0 //the filter that was shozen/the initial filter to use, this is 0 based
+ InitialFile: string //this initial value for the file name
+ Dir: string //the initial dir /upon return, the dir that was selected
+ Extention: string //the extention of the file
+ DefaultExtention: string //the default extention to use if the user doesn't specify one
+ Title: string //the title of the dialog box
+ Owner: THandle //handle to a window that owns the dialog box, needed for the help button
+ prop AskToCreate: bool read exp GetAskToCreate: bool write exp SetAskToCreate(aValue: bool) //OFN_CREATEPROMPT
+ NoAddToRecent: bool read exp GetDontAddToRecent: bool write exp SetDontAddToRecent(aValue: bool) //OFN_DONTADDTORECENT
+ ExtentionDifferent: bool read exp GetExtentionDifferent: bool write exp SetExtentionDifferent(aValue: bool) //OFN_EXTENSIONDIFFERENT
+ FileMustExist: bool read exp GetFileMustExist: bool write exp SetFileMustExist(aValue: bool) //OFN_FILEMUSTEXIST
+ ShowHidden: bool read exp GetShowHidden: bool write exp SetShowHidden(aValue: bool) //OFN_FORCESHOWHIDDEN
+ HideReadOnly: bool read exp GetHideReadOnly: bool write exp SetHideReadOnly(aValue: bool) //OFN_HIDEREADONLY
+ KeepCurrentDir: bool read exp GetKeepCurrentDir: bool write exp SetKeepCurrentDir(aValue: bool) //OFN_NOCHANGEDIR
+ NoDerefLink: bool read exp GetNoDerefLink: bool write exp SetNoDerefLink(aValue: bool) //OFN_NODEREFERENCELINKS
+ NoNetworkBtn: bool read exp GetNoNetworkBtn: bool write exp SetNoNetworkBtn(aValue: bool) //OFN_NONETWORKBUTTON
+ NoReadOnlyReturn: bool read exp GetNoReadOnlyReturn: bool write exp SetNoreadOnlyReturn(aValue: bool) //OFN_NOREADONLYRETURN
+ NoTestFileCreate: bool read exp GetNoTestFileCreate: bool write exp SetNoTestFileCreate(aValue: bool) //OFN_NOTESTFILECREATE
+ NoValidate: bool read exp GetNoValidate: bool write exp SetNoValidate(aValue: bool) //OFN_NOVALIDATE
+ OverWritePrompt: bool read exp GetOverWritePrompt: bool write exp SetOverWritePrompt(aValue: bool) //OFN_OVERWRITEPROMPT
+ PathMustExist: bool read exp GetPathMustExist: bool write exp SetPathMustExist(aValue: bool) //OFN_PATHMUSTEXIST
+ ReadOnly: bool read exp GetReadonly: bool write exp SetReadonly(avalue: bool) //OFN_READONLY
+ ShowHelp: bool read exp GetShowHelp: bool write exp SetShowHelp(aValue: bool) //OFN_SHOWHELP
+ exp Execute abstract
+;
+
+space sSaveFileDialog(sBas​eFileDialog) =
+ var File: string //the name of the file chozen by the user
+ exp Execute override
+;
+
+space sOpenFileDialog(sBas​eFileDialog) =
+ var Files: stringlist //the files to open or the file to save to
+ prop AllowMultiSelect: bool read exp GetMultiSelect: bool write exp SetMultiselect(aValue: bool) //OFN_ALLOWMULTISELECT
+ exp Execute override
+;
+
+//-----------------​--------------------​--------------------​--------------------​--------------------​--
+exp sBaseFileDialog.GetAskToCreate: bool
+=
+ return(fFlags & OFN_CREATEPROMPT)
+;
+
+exp sBaseFileDialog.SetA​skToCreate(aValue: bool) //OFN_CREATEPROMPT
+=
+ [<-aValue == true->
+ fFlags |= OFN_CREATEPROMPT
+ <-->
+ fFlags = fFlags ~ OFN_CREATEPROMPT
+ ]
+;
+
+exp sBaseFileDialog.GetD​ontAddToRecent: bool
+=
+ return(fFlags & OFN_DONTADDTORECENT)
+;
+
+exp sBaseFileDialog.SetD​ontAddToRecent(aValu​e: bool) //OFN_DONTADDTORECENT
+=
+ [<-aValue == true->
+ fFlags |= OFN_DONTADDTORECENT
+ <-->
+ fFlags = fFlags ~ OFN_DONTADDTORECENT
+ ]
+;
+
+exp sBaseFileDialog.GetE​xtentionDifferent: bool
+=
+ return(fFlags & OFN_EXTENSIONDIFFERENT)
+;
+
+exp sBaseFileDialog.SetE​xtentionDifferent(aV​alue: bool) //OFN_EXTENSIONDIFFERENT
+=
+ [<-aValue == true->
+ fFlags |= OFN_EXTENSIONDIFFERENT
+ <-->
+ fFlags = fFlags ~ OFN_EXTENSIONDIFFERENT
+ ]
+;
+
+exp sBaseFileDialog.GetF​ileMustExist: bool
+=
+ return(fFlags & OFN_FILEMUSTEXIST)
+;
+
+exp sBaseFileDialog.SetF​ileMustExist(aValue:​ bool) //OFN_FILEMUSTEXIST
+=
+ [<-aValue == true->
+ fFlags |= OFN_FILEMUSTEXIST
+ <-->
+ fFlags = fFlags ~ OFN_FILEMUSTEXIST
+ ]
+;
+
+exp sBaseFileDialog.GetShowHidden: bool
+=
+ return(fFlags & OFN_FORCESHOWHIDDEN)
+;
+
+exp sBaseFileDialog.SetS​howHidden(aValue: bool) //OFN_FORCESHOWHIDDEN
+=
+ [<-aValue == true->
+ fFlags |= OFN_FORCESHOWHIDDEN
+ <-->
+ fFlags = fFlags ~ OFN_FORCESHOWHIDDEN
+ ]
+;
+
+exp sBaseFileDialog.GetH​ideReadOnly: bool
+=
+ return(fFlags & OFN_HIDEREADONLY)
+;
+
+exp sBaseFileDialog.SetH​ideReadOnly(aValue: bool) //OFN_HIDEREADONLY
+=
+ [<-aValue == true->
+ fFlags |= OFN_HIDEREADONLY
+ <-->
+ fFlags = fFlags ~ OFN_HIDEREADONLY
+ ]
+;
+
+exp sBaseFileDialog.GetK​eepCurrentDir: bool
+=
+ return(fFlags & OFN_NOCHANGEDIR)
+;
+
+exp sBaseFileDialog.SetK​eepCurrentDir(aValue​: bool) //OFN_NOCHANGEDIR
+=
+ [<-aValue == true->
+ fFlags |= OFN_NOCHANGEDIR
+ <-->
+ fFlags = fFlags ~ OFN_NOCHANGEDIR
+ ]
+;
+
+exp sBaseFileDialog.GetNoDerefLink: bool
+=
+ return(fFlags & OFN_NODEREFERENCELINKS)
+;
+
+exp sBaseFileDialog.SetN​oDerefLink(aValue: bool) //OFN_NODEREFERENCELINKS
+=
+ [<-aValue == true->
+ fFlags |= OFN_NODEREFERENCELINKS
+ <-->
+ fFlags = fFlags ~ OFN_NODEREFERENCELINKS
+ ]
+;
+
+exp sBaseFileDialog.GetN​oNetworkBtn: bool
+=
+ return(fFlags & OFN_NONETWORKBUTTON)
+;
+
+exp sBaseFileDialog.SetN​oNetworkBtn(aValue: bool) //OFN_NONETWORKBUTTON
+=
+ [<-aValue == true->
+ fFlags |= OFN_NONETWORKBUTTON
+ <-->
+ fFlags = fFlags ~ OFN_NONETWORKBUTTON
+ ]
+;
+
+exp sBaseFileDialog.GetN​oReadOnlyReturn: bool
+=
+ return(fFlags & OFN_NOREADONLYRETURN)
+;
+
+exp sBaseFileDialog.SetN​oreadOnlyReturn(aVal​ue: bool) //OFN_NOREADONLYRETURN
+=
+ [<-aValue == true->
+ fFlags |= OFN_NOREADONLYRETURN
+ <-->
+ fFlags = fFlags ~ OFN_NOREADONLYRETURN
+ ]
+;
+
+exp sBaseFileDialog.GetN​oTestFileCreate: bool
+=
+ return(fFlags & OFN_NOTESTFILECREATE)
+;
+
+exp sBaseFileDialog.SetN​oTestFileCreate(aVal​ue: bool) //OFN_NOTESTFILECREATE
+=
+ [<-aValue == true->
+ fFlags |= OFN_NOTESTFILECREATE
+ <-->
+ fFlags = fFlags ~ OFN_NOTESTFILECREATE
+ ]
+;
+
+exp sBaseFileDialog.GetNoValidate: bool
+=
+ return(fFlags & OFN_NOVALIDATE)
+;
+
+exp sBaseFileDialog.SetN​oValidate(aValue: bool) //OFN_NOVALIDATE
+=
+ [<-aValue == true->
+ fFlags |= OFN_NOVALIDATE
+ <-->
+ fFlags = fFlags ~ OFN_NOVALIDATE
+ ]
+;
+
+exp sBaseFileDialog.GetO​verWritePrompt: bool
+=
+ return(fFlags & OFN_OVERWRITEPROMPT)
+;
+
+exp sBaseFileDialog.SetO​verWritePrompt(aValu​e: bool) //OFN_OVERWRITEPROMPT
+=
+ [<-aValue == true->
+ fFlags |= OFN_OVERWRITEPROMPT
+ <-->
+ fFlags = fFlags ~ OFN_OVERWRITEPROMPT
+ ]
+;
+
+exp sBaseFileDialog.GetP​athMustExist: bool
+=
+ return(fFlags & OFN_PATHMUSTEXIST)
+;
+
+exp sBaseFileDialog.SetP​athMustExist(aValue:​ bool) //OFN_PATHMUSTEXIST
+=
+ [<-aValue == true->
+ fFlags |= OFN_PATHMUSTEXIST
+ <-->
+ fFlags = fFlags ~ OFN_PATHMUSTEXIST
+ ]
+;
+
+exp sBaseFileDialog.GetReadonly: bool
+=
+ return(fFlags & OFN_READONLY)
+;
+
+exp sBaseFileDialog.SetR​eadonly(avalue: bool) //OFN_READONLY
+=
+ [<-aValue == true->
+ fFlags |= OFN_READONLY
+ <-->
+ fFlags = fFlags ~ OFN_READONLY
+ ]
+;
+
+exp sBaseFileDialog.GetShowHelp: bool
+=
+ return(fFlags & OFN_SHOWHELP)
+;
+
+exp sBaseFileDialog.SetS​howHelp(aValue: bool) //OFN_SHOWHELP
+=
+ [<-aValue == true->
+ fFlags |= OFN_SHOWHELP
+ <-->
+ fFlags = fFlags ~ OFN_SHOWHELP
+ ]
+;

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r7 - trunk lotec Jan Bogaerts 2005-07-15 07:44:50 PDT
Messages per page: