├── ANI.pas ├── Accordion.pas ├── AdjustControl.pas ├── BMP.pas ├── BitmapEx.pas ├── BlendModes.pas ├── BoxBlurInternal.inc ├── CIntf.pas ├── ColQuant.pas ├── ColSpaces.pas ├── ColorSwatches.pas ├── Components ├── Accordion.lrs ├── Accordion.pas ├── AdjustControl.pas ├── ColSpaces.pas ├── ColorSwatches.lrs ├── ColorSwatches.pas ├── DoubleBufPB.lrs ├── DoubleBufPB.pas ├── FastDiv.pas ├── HSBMap.lrs ├── HSBMap.pas ├── ImageAnchors.lrs ├── ImageAnchors.pas ├── NumberEdit.pas ├── PaintScrollBar.lrs ├── PaintScrollBar.pas ├── gfListBox.lrs └── gfListBox.pas ├── DdeServer.pas ├── DocClass.pas ├── DoubleBufPB.pas ├── FastDiv.pas ├── FileAssoc.pas ├── FilterDialog.lfm ├── FilterDialog.pas ├── Filters.pas ├── FloatFormula.pas ├── GFIEFormat.pas ├── GIF.pas ├── GenericList.pas ├── Greenfish Homepage.url ├── Greenfish_Homepage.url ├── HSBMap.pas ├── ICNS.pas ├── ICO.pas ├── ImageAnchors.pas ├── ImageConverter ├── GFIEFormat.cs ├── GfDataTree.cs ├── ImageConverter.csproj ├── ImageConverter.sh ├── ImageConverter.sln └── Program.cs ├── ImageConverter_Intf.pas ├── ImageTransform.pas ├── Jpeg2000.pas ├── LICENSE ├── LangPack.pas ├── Layers.pas ├── Locales.pas ├── Main.lfm ├── Main.pas ├── MapClass.pas ├── NinePatch.pas ├── NumberEdit.pas ├── PCX.pas ├── PNG.pas ├── PSImportMath.pas ├── PaintScrollBar.pas ├── Palette.inc ├── PixelFormats.pas ├── PortableAnyMap.pas ├── README.md ├── RIFF.pas ├── ResList.pas ├── Resources ├── bigcross.cur ├── bigcrossnoinv.cur ├── brush.cur ├── brushnoinv.cur ├── bucket.cur ├── bucketnoinv.cur ├── crop.cur ├── cropnoinv.cur ├── ellipse.cur ├── ellipsenoinv.cur ├── eraser.cur ├── erasernoinv.cur ├── eyedropper.cur ├── eyedroppernoinv.cur ├── gradient.cur ├── gradientnoinv.cur ├── hand.cur ├── handgrab.cur ├── handpoint.cur ├── iclstub16.bin ├── iclstub32.dll ├── line.cur ├── linenoinv.cur ├── pencil.cur ├── pencilnoinv.cur ├── recolor.cur ├── recolornoinv.cur ├── rect.cur ├── rectnoinv.cur ├── retouch.cur ├── retouchnoinv.cur ├── rotate.cur ├── select.cur ├── selectadd.cur ├── selectaddnoinv.cur ├── selectint.cur ├── selectintnoinv.cur ├── selectnoinv.cur ├── selectsub.cur └── selectsubnoinv.cur ├── ShellEx.pas ├── StreamEx.pas ├── Targa.pas ├── UndoObject.pas ├── Utils3d.pas ├── XPM.pas ├── _LResources.inc ├── before_build.bat ├── bmExUtils.pas ├── build.bat ├── c ├── gfiec.cbp ├── imgformats.cpp ├── imgformats.h ├── libpng │ ├── png.c │ ├── png.h │ ├── pngconf.h │ ├── pngdebug.h │ ├── pngerror.c │ ├── pngget.c │ ├── pnginfo.h │ ├── pnglibconf.h │ ├── pngmem.c │ ├── pngpread.c │ ├── pngpriv.h │ ├── pngread.c │ ├── pngrio.c │ ├── pngrtran.c │ ├── pngrutil.c │ ├── pngset.c │ ├── pngstruct.h │ ├── pngtrans.c │ ├── pngwio.c │ ├── pngwrite.c │ ├── pngwtran.c │ └── pngwutil.c ├── openjpeg │ ├── bio.c │ ├── bio.h │ ├── cio.c │ ├── cio.h │ ├── dwt.c │ ├── dwt.h │ ├── event.c │ ├── event.h │ ├── fix.h │ ├── image.c │ ├── image.h │ ├── int.h │ ├── j2k.c │ ├── j2k.h │ ├── j2k_lib.c │ ├── j2k_lib.h │ ├── jp2.c │ ├── jp2.h │ ├── jpt.c │ ├── jpt.h │ ├── mct.c │ ├── mct.h │ ├── mqc.c │ ├── mqc.h │ ├── openjpeg.c │ ├── openjpeg.h │ ├── opj_config.h │ ├── opj_includes.h │ ├── opj_malloc.h │ ├── pi.c │ ├── pi.h │ ├── raw.c │ ├── raw.h │ ├── t1.c │ ├── t1.h │ ├── t1_generate_luts.c │ ├── t1_luts.h │ ├── t2.c │ ├── t2.h │ ├── tcd.c │ ├── tcd.h │ ├── tgt.c │ └── tgt.h └── zlib │ ├── adler32.c │ ├── compress.c │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── gzclose.c │ ├── gzguts.h │ ├── gzlib.c │ ├── gzread.c │ ├── gzwrite.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── zconf.h │ ├── zlib.h │ ├── zutil.c │ └── zutil.h ├── compile_resources.bat ├── dlgBatchConvert.lfm ├── dlgBatchConvert.pas ├── dlgBevel.lfm ├── dlgBevel.pas ├── dlgBlur.lfm ├── dlgBlur.pas ├── dlgCellGrid.lfm ├── dlgCellGrid.pas ├── dlgColor.lfm ├── dlgColor.pas ├── dlgCreateAndroidIcon.lfm ├── dlgCreateAndroidIcon.pas ├── dlgCreateIcon.lfm ├── dlgCreateIcon.pas ├── dlgCreateMacIcon.lfm ├── dlgCreateMacIcon.pas ├── dlgDebug.lfm ├── dlgDebug.pas ├── dlgDoc.lfm ├── dlgDoc.pas ├── dlgDocPage.lfm ├── dlgDocPage.pas ├── dlgExeFormat.lfm ├── dlgExeFormat.pas ├── dlgExposure.lfm ├── dlgExposure.pas ├── dlgFormulae.lfm ├── dlgFormulae.pas ├── dlgGlow.lfm ├── dlgGlow.pas ├── dlgHueSaturation.lfm ├── dlgHueSaturation.pas ├── dlgLanguage.lfm ├── dlgLanguage.pas ├── dlgLayerProp.lfm ├── dlgLayerProp.pas ├── dlgLayers.lfm ├── dlgLayers.pas ├── dlgLib.lfm ├── dlgLib.pas ├── dlgMatte.lfm ├── dlgMatte.pas ├── dlgMetadata.lfm ├── dlgMetadata.pas ├── dlgOpacity.lfm ├── dlgOpacity.pas ├── dlgPreferences.lfm ├── dlgPreferences.pas ├── dlgPrint.lfm ├── dlgPrint.pas ├── dlgRGBChannels.lfm ├── dlgRGBChannels.pas ├── dlgResProp.lfm ├── dlgResProp.pas ├── dlgSaveOptions.lfm ├── dlgSaveOptions.pas ├── dlgScript.lfm ├── dlgScript.pas ├── dlgShadow.lfm ├── dlgShadow.pas ├── dlgSplash.lfm ├── dlgSplash.pas ├── dlgStartupFrame.lfm ├── dlgStartupFrame.pas ├── dlgSvgOpenOptions.lfm ├── dlgSvgOpenOptions.pas ├── dlgTest.lfm ├── dlgTest.pas ├── dlgText.lfm ├── dlgText.pas ├── dlgToolSet.lfm ├── dlgToolSet.pas ├── dlgToolbar.lfm ├── dlgToolbar.pas ├── dlgTransform.lfm ├── dlgTransform.pas ├── dlgUnsharpMask.lfm ├── dlgUnsharpMask.pas ├── fnvHash.pas ├── gfDataTree.pas ├── gfGauge.pas ├── gfListBox.pas ├── gfMath.pas ├── gfie.dpr ├── gfie.lpi ├── gfie.res ├── how-to-compile.txt ├── ieShared.pas ├── license.txt ├── linux_before_build.sh ├── linux_build.sh ├── make_pascalscript_import.py ├── misc.lrs ├── misc.lrs.txt ├── pascalscript ├── Source │ ├── PascalScriptFCL.pas │ ├── PascalScriptLCL.pas │ ├── PascalScript_Core_Ext_Reg.pas │ ├── PascalScript_Core_Reg.pas │ ├── PascalScript_Core_Reg_noDB.pas │ ├── license.md │ ├── pascalscript.pas │ ├── uPSC_DB.pas │ ├── uPSC_buttons.pas │ ├── uPSC_classes.pas │ ├── uPSC_comobj.pas │ ├── uPSC_controls.pas │ ├── uPSC_dateutils.pas │ ├── uPSC_dll.pas │ ├── uPSC_extctrls.pas │ ├── uPSC_forms.pas │ ├── uPSC_graphics.pas │ ├── uPSC_menus.pas │ ├── uPSC_std.pas │ ├── uPSC_stdctrls.pas │ ├── uPSCompiler.pas │ ├── uPSComponent.pas │ ├── uPSComponentExt.pas │ ├── uPSComponent_COM.pas │ ├── uPSComponent_Controls.pas │ ├── uPSComponent_DB.pas │ ├── uPSComponent_Default.pas │ ├── uPSComponent_Forms.pas │ ├── uPSComponent_StdCtrls.pas │ ├── uPSDebugger.pas │ ├── uPSDisassembly.pas │ ├── uPSI_ComCtrls.pas │ ├── uPSI_Dialogs.pas │ ├── uPSI_ExtCtrls.pas │ ├── uPSPreProcessor.pas │ ├── uPSR_DB.pas │ ├── uPSR_buttons.pas │ ├── uPSR_classes.pas │ ├── uPSR_comobj.pas │ ├── uPSR_controls.pas │ ├── uPSR_dateutils.pas │ ├── uPSR_dll.pas │ ├── uPSR_extctrls.pas │ ├── uPSR_forms.pas │ ├── uPSR_graphics.pas │ ├── uPSR_menus.pas │ ├── uPSR_std.pas │ ├── uPSR_stdctrls.pas │ ├── uPSRuntime.pas │ └── uPSUtils.pas └── unit-importing │ ├── CMDimp.lpi │ ├── CMDimp.lpr │ ├── ParserU.pas │ ├── ParserUtils.pas │ ├── TB_ReadMe.txt │ ├── conv.ini │ └── readme.txt └── readme.html /ColSpaces.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/ColSpaces.pas -------------------------------------------------------------------------------- /Components/Accordion.lrs: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Controls - Accordion 3 | Copyright © 2013 Balázs Szalkai 4 | This file is released under the zlib license: 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 22 | 3. This notice may not be removed or altered from any source 23 | distribution. 24 | *) 25 | LazarusResources.Add('TAccordion','PNG',[ 26 | #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0 27 | +#0#1'MIDATH'#199#237#147#193'm'#194'0'#20#134#191'T='#3'#x'#128#28','#22#0#22 28 | +#0'Fp'#164#168'G'#146'Q'#128#11#170'| b'#3'2'#129#195#157#3#136#1#128#9#162 29 | +#12#208#215#19#174#2#8'*U'#156#154'O'#178','#127#182#242#242#252#203#208#208 30 | +#240'W'#2#0#17#145#151'|<'#8#130#183'Ww'#240#171#2#231#243#153#253'~_s'#215 31 | +#235#135#200#19#140'1'#210#239#247'k'#238'z}'#15#128'w'#128'4M'#9#195#208#23 32 | +'<'#28#14'L'#167'S'#0#170#170#226'x<2'#24#12#200#243#156#225'p'#232#207#173 33 | +'V+'#202#178#196#24'C'#171#213#186'q'#254#138#194'0$'#142'c'#22'_'#11#226'8' 34 | +#174#21#203#178#140'('#138'0'#198#176'\.'#189'w'#206'Q'#150'%J)z'#189#30#0'Q' 35 | +#20'y7'#26#141'~'#174#200'Z+'#221#207#174#31#214'Z'#223#166'RJ'#138#162#144 36 | +#162'(Dk-'#167#211'IDD'#180#214#254'L'#154#166'~'#255#194'n'#183#147'Z'#200 37 | +#219#143'mm'#6#216'l6('#165'p'#206#225#156'CkM'#150'e'#0't:'#157#155','#239 38 | +'9'#0#146'$'#17'k'#173#31'I'#146#248'p/'#127'|'#29'. '#179#217'L'#214#235#181 39 | +'w'#198#24#239#198#227#177'<}h'#243#249#156#201'dRsy'#158#163#181#198'9'#7'P' 40 | +#11#185#170'*'#223#161'1'#134'v'#187#29#252#147#151#220#208#240#144'o9'#203 41 | +'6u'#139'YI'#219#0#0#0#0'IEND'#174'B`'#130 42 | ]); 43 | -------------------------------------------------------------------------------- /Components/ColSpaces.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Components/ColSpaces.pas -------------------------------------------------------------------------------- /Components/ColorSwatches.lrs: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Controls - ColorSwatches 3 | Copyright © 2013 Balázs Szalkai 4 | This file is released under the zlib license: 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 22 | 3. This notice may not be removed or altered from any source 23 | distribution. 24 | *) 25 | LazarusResources.Add('TColorSwatches','PNG',[ 26 | #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0 27 | +#0#0'lIDATH'#199#237#145'1'#10#192'0'#8'E'#253#165#7#243'\'#153#156'r.o'#150 28 | +'.'#29#26#251#233#150'b@'#23#241')'#10'>'#145#197#129';'#143'U'#187#207#239 29 | +#25'{'#215#4#137#5#248#168#143#213'/'#218#255#192#127#146#169#187'@M'#140#250 30 | +#236#189'O'#172#181'V'#146'3Jv'#247#169#171#170#228'.('#146#17' P'#146'3J' 31 | +#166#238#2#133#128#250#28#1#162'$'#167#146#188#127'\'#30'K .w'#149'Lk'#0#0#0 32 | +#0'IEND'#174'B`'#130 33 | ]); 34 | -------------------------------------------------------------------------------- /Components/DoubleBufPB.lrs: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Controls - Double-buffered paint box 3 | Copyright © 2013 Balázs Szalkai 4 | This file is released under the zlib license: 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 22 | 3. This notice may not be removed or altered from any source 23 | distribution. 24 | *) 25 | LazarusResources.Add('TDoubleBufPB','PNG',[ 26 | #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0 27 | +#0#1#28'IDATH'#199#221#149#189'j'#195'0'#20'FOL'#210#197#143#224'IK&yJ'#192 28 | +#217'b'#186#249#17#250' '#153#218#130' '#238#148#161#143#209'G'#232#22#154'M' 29 | +'C;'#217'SG'#143#6#15#30#4#197')'#180#147'CLc'#252#147#186#180#253'@'#232'"}' 30 | +#186'GBW'#8#254#186'Fe'#160#148#250#248#206#196'J'#169#17#192#248'x'#240#246 31 | +'r'#215#184'0'#8''''#135#248#241'f'#127#210#179#222'.'#15#241#184#203#174#130 32 | +'p'#130#231'y'#0#24'c'#8#194#184#22'R'#202#234'zt'#223#247'q]'#183#181#191'3' 33 | +' '#203'2'#146'$'#25#14#0#144#231#249'p'#128'('#138':'#249#173#161#223#129 34 | +#213#167#130#0'l'#219'FJY)'#219#222#128'2'#185'1'#166#210#128'F'#136#213'&' 35 | +#185#148#146'4M'#191#0#202'&'#132#168#133#180'zhq'#28#247#190#131'F'#128#16 36 | +#130#205#230#138#151#231#152#217'\'#214#246#171#213#3#240#250#139#171#232#199 37 | +#0#179#185#172#244'g'#223'A'#169#253#251#20#173#139#19'3'#211#243#0#142#147 38 | +#160'u'#193'bqQ'#235#209#186#192'q'#146'~'#128'k'#255#141#187#167'{'#180'n' 39 | +#246'5'#2#142#127#162#174'Zo'#249#167#250#4#166'cp'#8#1#185#235'S'#0#0#0#0'I' 40 | +'END'#174'B`'#130 41 | ]); 42 | -------------------------------------------------------------------------------- /Components/FastDiv.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Components/FastDiv.pas -------------------------------------------------------------------------------- /Components/HSBMap.lrs: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Controls - HSBMap 3 | Copyright © 2013 Balázs Szalkai 4 | This file is released under the zlib license: 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 22 | 3. This notice may not be removed or altered from any source 23 | distribution. 24 | *) 25 | LazarusResources.Add('THSBMap','PNG',[ 26 | #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0 27 | +#0#2':IDATH'#199#237#148#189'n'#20'1'#20'F'#207#189'wv'#6#10#132#132#16#13'E' 28 | +#144#2'J'#129'(i'#232#168'h'#200'K'#228#21'hi'#145'x'#138'}'#137'HPPF'#162 29 | +#161'@'#162'%'#8#4#18#20#208'B'#214#222#177'Ma{'#188#155#31#134#7#136'[Ks' 30 | +#230'|'#223#189#134#203'3s'#4#224#217#253#157'4\'#251#9#247#224#207'm'#248 31 | +#164'p'#12'|'#163''''#178#11#236#194#250#14'|'#238#224'#'#216#23#216'Y'#195 32 | +']`'#151#192#192'W'#224#152#184#183#224#229#251#183#178'\.'#19#192#193#193 33 | +#129't'#0']'#8'<'#127#8'<'#133'_'#143#224#181#193'!'#240#131#171'x'#30#0#251 34 | +#240#251'1'#188#185#2#135#176#248#14'{k'#216#7#158#224#185#206#17'p'#200#139 35 | +#248'!'#255#181#200'd'#208#1'DU'#156#12#16'`'#237' '#25#24#208#211'#('#16#192 36 | +'y'#8#2#6'C'#15'6B'#4''#162#10#200#17'u'#205' '#248#169#28#237#193#172#1'b5'#176#127'D' 47 | +#228'k'#7'['#17#25#169#150#28#218#252'j'#15#26'O'#3#230#246#160'<'#21#163'k' 48 | +#128#1'-'#128#0#177#141#151#12'y'#147#243#30'$'#194#252'&'#183#136'B'#137'(' 49 | +#143#169#228#183#129#8#177#168')HY'#180'X'#0':'#255#154'*'#175#142#222#229'o' 50 | +'i'#158#137'P'#22')'#187#216#153#11#221#184#161'L'#210#141'[7'#207#0'.'#207 51 | +#236#249#11'A6g'#142#166'E'#152#249#0#0#0#0'IEND'#174'B`'#130 52 | ]); 53 | -------------------------------------------------------------------------------- /Components/ImageAnchors.lrs: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Controls - ImageAnchors 3 | Copyright © 2013 Balázs Szalkai 4 | This file is released under the zlib license: 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 22 | 3. This notice may not be removed or altered from any source 23 | distribution. 24 | *) 25 | LazarusResources.Add('TImageAnchors','PNG',[ 26 | #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0 27 | +#0#0'TIDATH'#199#237#147'1'#10#0' '#12#3#19#241#255'_'#174#139#131#130'HQ' 28 | +#227#148'L'#29'RB'#27#142#0#2'kq'#152#143'='#21'IE'#204#251'$S'#158#2#177'v' 29 | +#23'D'#230#176#155#128''''#29'P]'#178#228'-'#163'G^'#178'<'#128'_@;'#133#200 30 | +#160#25'4'#131'f'#208#12'ZW'#3'H"<''_8'#25';'#0#0#0#0'IEND'#174'B`'#130 31 | ]); 32 | -------------------------------------------------------------------------------- /Components/PaintScrollBar.lrs: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Controls - PaintScrollBar 3 | Copyright © 2013 Balázs Szalkai 4 | This file is released under the zlib license: 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 22 | 3. This notice may not be removed or altered from any source 23 | distribution. 24 | *) 25 | LazarusResources.Add('TPaintScrollBar','PNG',[ 26 | #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0 27 | +#0#0'dIDATH'#199#237#147'Q'#10#128'0'#12'CS'#241'T;'#192#206#245'n^'#127'TdN' 28 | +#17'f'#5#161#15#250#155#180'4'#145#146'$'#18'o'#7#240'0'#147#8#241#221'dD' 29 | +#220#154'm'#223#196'N'#6#189'E'#193'T'#171#171#148#231#202'`'#2#4#216#20#157 30 | +#148#255#27#220#230'~d'#182#228#205#199#175#247#226#184'>+'#254#170#208#22 31 | +#127#209#230'$'#185'f'#1#198'#Db'#199#163#174#9#0#0#0#0'IEND'#174'B`'#130 32 | ]); 33 | -------------------------------------------------------------------------------- /Components/gfListBox.lrs: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Controls - gfListBox 3 | Copyright © 2013 Balázs Szalkai 4 | This file is released under the zlib license: 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 22 | 3. This notice may not be removed or altered from any source 23 | distribution. 24 | *) 25 | LazarusResources.Add('TgfListBox','PNG',[ 26 | #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0 27 | +#0#2#8'IDATH'#199#213#149#205'j'#26'Q'#24#134#159#134'H'#230#24'j'#166'b7' 28 | +#133'V'#11#165'2'#1#9#180#165'!'#162'Bn@'#188#5'o'#194#139#200#213'H'#246#221 29 | +'f'#209'EQZ'#153#169#208'0'#179#168#210#140#233#184'9#n'#252#186'0N3'#26#127 30 | +'i'#23#249'`'#224'p~'#190#231'|'#239';'#231#28'x'#236#241'd'#214'('#22#139 31 | +#242#175#146'^]]Ey'#247#239#15'\^^'#238#148#176'Z'#173#210'h4'#0#184#184#184 32 | +#136#141#237#207'O'#182#251#135#8#130#136#128#128' '#252#246#127'a$'#15#17#17 33 | +#12'#'#25#27#255#248'vo%|'#1' '#8#159#207'_'#1#240#225#147#139'{'#237#240#253 34 | +#219#23#4#225'i'#202'$'#127#252#14'A0'#14#14'9Pj'#10'z`'#231#203#1#242#215 35 | +#138'Q'#168#241#251'?y'#241#242'5"'#194'('#212#252#232'~E'#4#158#165#159#147 36 | +'{s'#28#205#175#213'j'#0'4'#155#205#213#0'd'#186#243#153#4#239#207#206'cr-' 37 | +#180#215#196#2#224#204'J "[}['#1'noo'#163#133#190#239#163#148'"'#153'LF}Zk' 38 | +#212#157#246'"'#130'i'#154'['#154'|'#183#176#219#237#210'n'#183'1M'#147#147 39 | +#147#19'D'#132' '#8'p]'#151#211#211#211#24'dk'#128#214#154'^'#175'G.'#151'Ck' 40 | +'M'#167#211#137#18'%'#18#9'<'#207'#'#159#207#199#0#243#230#174#4'('#165#168 41 | +'T*'#177#138#214'i'#223'h4'#176','#139'z'#189#190#26#144'N'#167'w2'#217#178 42 | +',l'#219#222#204#228#251#213#220#220#220#160#148#138'i'#30#134'!J)'#0'R'#169 43 | +#212#244#6#176'm,'#203'Z'#15#152#133#239#251#4'A@'#171#213#226#232#232#136'B' 44 | +#161#128#136'0'#28#14#233#247#251#148'J'#165#221'*'#0'"c'#1#178#217',Zk'#28 45 | +#199#137#18'f2'#153#5#137'6'#174'`fr'#185'\^i'#236#188#201#27'W`'#154#230'N&' 46 | +#207#255'=K'#1'A'#16'0'#153'Lb''vf'#234'`0'#136'N'#181'a'#24#136'Hd'#242#178 47 | +#247'`'#239'!'#137#194'0d<'#30#3#16#134'!'#158#231'1'#26#141#176'm'#27#199'q' 48 | +'p]w'#227#187#232#191'?'#153#143'?'#254#0#189#148#233'2a'#196#174#131#0#0#0#0 49 | +'IEND'#174'B`'#130 50 | ]); 51 | -------------------------------------------------------------------------------- /DdeServer.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | unit DdeServer; 19 | 20 | {$IFNDEF WINDOWS} 21 | {$WARNING DdeServer: unit is specific to Windows} 22 | interface 23 | implementation 24 | {$ELSE} 25 | interface 26 | 27 | uses 28 | Windows, Messages, LclIntf, LclType, SysUtils, ieShared, DocClass, Main; 29 | 30 | const 31 | sDDEServerName = 'GFIEPro'; 32 | sDDETopic = 'System'; 33 | 34 | var 35 | ddeInited: boolean = False; 36 | ddeInst: Cardinal; 37 | ddeServerName: THandle; 38 | ddeTopic: THandle; 39 | 40 | implementation 41 | 42 | procedure ddeParseString(Message: PChar; var cmd, param: string); 43 | var 44 | p1, p2, p3, p4: PChar; 45 | 46 | begin 47 | // text between [ and ( : cmd 48 | p1 := FindInPChar(Message, '['); 49 | inc(p1); 50 | p2 := FindInPChar(p1, '('); 51 | 52 | // text between " and " : param 53 | p3 := FindInPChar(p2, '"'); 54 | inc(p3); 55 | p4 := FindInPChar(p3, '"'); 56 | 57 | SetLength(cmd, p2-p1); 58 | Move(p1^, cmd[1], Length(cmd)); 59 | cmd := UpperCase(cmd); 60 | 61 | SetLength(param, p4-p3); 62 | Move(p3^, param[1], Length(param)); 63 | end; 64 | 65 | function ddeCallback(uType, uFmt: UINT; hConv, hsz1, hsz2, hData: THandle; 66 | dwData1, dwData2: DWORD): THandle; stdcall; 67 | var 68 | szExecute: array of char; 69 | cmd, param: string; 70 | 71 | begin 72 | Result := 0; 73 | 74 | case uType of 75 | XTYP_CONNECT: Result := Ord((hsz1 = ddeTopic) and (hsz2 = ddeServerName)); 76 | XTYP_EXECUTE: begin 77 | SetLength(szExecute, DdeGetData(hData, nil, 0, 0) + 10); 78 | FillChar(szExecute[0], Length(szExecute), #0); 79 | DdeGetData(hData, @szExecute[0], Length(szExecute), 0); 80 | ddeParseString(@szExecute[0], cmd, param); 81 | if cmd = 'OPEN' then frmMain.DoOpen(param); 82 | end; 83 | end; 84 | end; 85 | 86 | const 87 | APPCMD_FILTERINITS = $20; 88 | 89 | initialization 90 | if DdeInitialize(@ddeInst, @ddeCallback, APPCMD_FILTERINITS, 0) = 0 then 91 | begin 92 | ddeServerName := DdeCreateStringHandle(ddeInst, sDDEServerName, CP_WINANSI); 93 | ddeTopic := DdeCreateStringHandle(ddeInst, sDDETopic, CP_WINANSI); 94 | 95 | // register server name 96 | DdeNameService(ddeInst, ddeServerName, 0, DNS_REGISTER); 97 | 98 | // success 99 | ddeInited := True; 100 | end; 101 | finalization 102 | if ddeInited then 103 | begin 104 | ddeInited := False; 105 | 106 | DdeFreeStringHandle(ddeInst, ddeServerName); 107 | DdeFreeStringHandle(ddeInst, ddeTopic); 108 | DdeUninitialize(ddeInst); 109 | end; 110 | {$ENDIF} 111 | end. 112 | -------------------------------------------------------------------------------- /FastDiv.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/FastDiv.pas -------------------------------------------------------------------------------- /FilterDialog.lfm: -------------------------------------------------------------------------------- 1 | object FilterDialog: TFilterDialog 2 | Left = 0 3 | Height = 240 4 | Top = 0 5 | Width = 320 6 | LCLVersion = '1.1' 7 | end 8 | -------------------------------------------------------------------------------- /Greenfish Homepage.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://greenfishsoftware.blogspot.com/ 3 | -------------------------------------------------------------------------------- /Greenfish_Homepage.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://greenfishsoftware.blogspot.com/ 3 | -------------------------------------------------------------------------------- /ImageConverter/ImageConverter.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9E243AA1-2982-4179-BFA5-141FCED32CB6} 8 | Exe 9 | Properties 10 | ImageConverter 11 | ImageConverter 12 | v3.5 13 | 512 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | packages\Svg.2.1.0\lib\Svg.dll 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 66 | -------------------------------------------------------------------------------- /ImageConverter/ImageConverter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mono $(dirname "$0")/bin/Debug/ImageConverter.exe "$@" 3 | -------------------------------------------------------------------------------- /ImageConverter/ImageConverter.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2012 for Windows Desktop 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageConverter", "ImageConverter.csproj", "{9E243AA1-2982-4179-BFA5-141FCED32CB6}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {9E243AA1-2982-4179-BFA5-141FCED32CB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {9E243AA1-2982-4179-BFA5-141FCED32CB6}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {9E243AA1-2982-4179-BFA5-141FCED32CB6}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {9E243AA1-2982-4179-BFA5-141FCED32CB6}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /PNG.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | unit PNG; 19 | 20 | interface 21 | 22 | uses 23 | LclIntf, LclType, CIntf, SysUtils, Classes, Graphics, BitmapEx, Math; 24 | 25 | const 26 | SIG_PNG = $474e5089; // PNG file signature 27 | PNG_COMPRESSION_NORMAL = 5; 28 | PNG_COMPRESSION_HIGH = 9; 29 | 30 | function pngDetect(Data: Pointer; Size: integer): boolean; 31 | 32 | function pngLoadFromStream(bm: TBitmap32; s: TStream; out dpi: double): boolean; 33 | procedure pngSaveToStream(bm: TBitmap32; s: TStream; 34 | CompressionLevel: integer; dpi: double); 35 | function pngLoadFromFile(bm: TBitmap32; const fn: string): boolean; 36 | procedure pngSaveToFile(bm: TBitmap32; const fn: string; CompressionLevel: integer); 37 | 38 | // Loads a PNG file into a TBitmap object 39 | function pngLoadFromFileBM(bm: TBitmap; const fn: string; BackColor: TColor): boolean; 40 | 41 | implementation 42 | 43 | function pngDetect; 44 | begin 45 | Result := (Size >= 4) and (PCardinal(Data)^ = SIG_PNG); 46 | end; 47 | 48 | function pngLoadFromStream; 49 | var 50 | p, w, h: integer; 51 | 52 | begin 53 | dpi := 0; 54 | Result := False; 55 | try 56 | p := s.Position; 57 | Result := pngLoad(nil, @w, @h, @dpi, IOFunction_ReadFromStream, s); 58 | s.Position := p; 59 | if not Result then Exit; 60 | 61 | bm.Resize(w, h); 62 | Result := pngLoad(bm.Data, @w, @h, @dpi, IOFunction_ReadFromStream, s); 63 | if not Result then Exit; 64 | 65 | Result := True; 66 | except 67 | end; 68 | end; 69 | 70 | procedure pngSaveToStream; 71 | begin 72 | pngSave(bm.Data, bm.Width, bm.Height, dpi, IOFunction_WriteToStream, s, 73 | CompressionLevel); 74 | end; 75 | 76 | function pngLoadFromFile; 77 | var 78 | s: TStream; 79 | dpi: double; 80 | 81 | begin 82 | try 83 | s := TFileStream.Create(fn, fmOpenRead); 84 | try 85 | Result := pngLoadFromStream(bm, s, dpi); 86 | finally 87 | s.Free; 88 | end; 89 | except 90 | Result := False; 91 | end; 92 | end; 93 | 94 | procedure pngSaveToFile; 95 | var 96 | s: TStream; 97 | 98 | begin 99 | s := TFileStream.Create(fn, fmCreate); 100 | try 101 | pngSaveToStream(bm, s, CompressionLevel, 0.0); 102 | finally 103 | s.Free; 104 | end; 105 | end; 106 | 107 | function pngLoadFromFileBM; 108 | var 109 | bm32: TBitmap32; 110 | 111 | begin 112 | bm32 := TBitmap32.Create; 113 | try 114 | Result := pngLoadFromFile(bm32, fn); 115 | if not Result then Exit; 116 | bm32.ToBitmap(bm, BackColor); 117 | finally 118 | bm32.Free; 119 | end; 120 | end; 121 | 122 | end. 123 | -------------------------------------------------------------------------------- /PSImportMath.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | // Duplicates functions of the Math unit 19 | // so the PascalScript autoimporter can import them. 20 | unit PSImportMath; 21 | 22 | {$mode delphi} 23 | 24 | interface 25 | 26 | procedure Randomize; 27 | function Random: extended; 28 | function RandomRange(l, h: int64): int64; 29 | function Round(x: extended): int64; 30 | function Floor(x: extended): integer; 31 | function Ceil(x: extended): integer; 32 | function Min(x, y: int64): int64; 33 | function Max(x, y: int64): int64; 34 | function Min2(x, y: extended): extended; 35 | function Max2(x, y: extended): extended; 36 | function Exp(x: extended): extended; 37 | function Ln(x: extended): extended; 38 | function ArcCos(x: extended): extended; 39 | function ArcSin(x: extended): extended; 40 | function ArcTan2(y, x: extended): extended; 41 | function Tan(x: extended): extended; 42 | function Power(x, y: extended): extended; 43 | function IsInfinite(x: double): boolean; 44 | function IsNaN(x: extended): boolean; 45 | 46 | implementation 47 | 48 | uses 49 | SysUtils, Math; 50 | 51 | procedure Randomize; 52 | begin 53 | System.Randomize; 54 | end; 55 | 56 | function Random: extended; 57 | begin 58 | Result := System.Random; 59 | end; 60 | 61 | function RandomRange(l, h: int64): int64; 62 | begin 63 | Result := Math.RandomRange(l, h); 64 | end; 65 | 66 | function Round(x: extended): int64; 67 | begin 68 | Result := System.Round(x); 69 | end; 70 | 71 | function Floor(x: extended): integer; 72 | begin 73 | Result := Math.floor(x); 74 | end; 75 | 76 | function Ceil(x: extended): integer; 77 | begin 78 | Result := Math.ceil(x); 79 | end; 80 | 81 | function Min(x, y: int64): int64; 82 | begin 83 | Result := Math.Min(x, y); 84 | end; 85 | 86 | function Max(x, y: int64): int64; 87 | begin 88 | Result := Math.Max(x, y); 89 | end; 90 | 91 | function Min2(x, y: extended): extended; 92 | begin 93 | Result := Math.Min(x, y); 94 | end; 95 | 96 | function Max2(x, y: extended): extended; 97 | begin 98 | Result := Math.Max(x, y); 99 | end; 100 | 101 | function Exp(x: extended): extended; 102 | begin 103 | Result := System.Exp(x); 104 | end; 105 | 106 | function Ln(x: extended): extended; 107 | begin 108 | Result := System.Ln(x); 109 | end; 110 | 111 | function ArcCos(x: extended): extended; 112 | begin 113 | Result := Math.arccos(x); 114 | end; 115 | 116 | function ArcSin(x: extended): extended; 117 | begin 118 | Result := Math.arcsin(x); 119 | end; 120 | 121 | function ArcTan2(y, x: extended): extended; 122 | begin 123 | Result := Math.arctan2(y, x); 124 | end; 125 | 126 | function Tan(x: extended): extended; 127 | begin 128 | Result := Math.tan(x); 129 | end; 130 | 131 | function Power(x, y: extended): extended; 132 | begin 133 | Result := Math.power(x, y); 134 | end; 135 | 136 | function IsInfinite(x: double): boolean; 137 | begin 138 | Result := Math.IsInfinite(x); 139 | end; 140 | 141 | function IsNaN(x: extended): boolean; 142 | begin 143 | Result := Math.IsNan(x); 144 | end; 145 | 146 | end. 147 | 148 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gfie-src 2 | Greenfish Icon Editor src code extracted from the download at http://greenfishsoftware.org/gfie.php 3 | -------------------------------------------------------------------------------- /Resources/bigcross.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/bigcross.cur -------------------------------------------------------------------------------- /Resources/bigcrossnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/bigcrossnoinv.cur -------------------------------------------------------------------------------- /Resources/brush.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/brush.cur -------------------------------------------------------------------------------- /Resources/brushnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/brushnoinv.cur -------------------------------------------------------------------------------- /Resources/bucket.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/bucket.cur -------------------------------------------------------------------------------- /Resources/bucketnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/bucketnoinv.cur -------------------------------------------------------------------------------- /Resources/crop.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/crop.cur -------------------------------------------------------------------------------- /Resources/cropnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/cropnoinv.cur -------------------------------------------------------------------------------- /Resources/ellipse.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/ellipse.cur -------------------------------------------------------------------------------- /Resources/ellipsenoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/ellipsenoinv.cur -------------------------------------------------------------------------------- /Resources/eraser.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/eraser.cur -------------------------------------------------------------------------------- /Resources/erasernoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/erasernoinv.cur -------------------------------------------------------------------------------- /Resources/eyedropper.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/eyedropper.cur -------------------------------------------------------------------------------- /Resources/eyedroppernoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/eyedroppernoinv.cur -------------------------------------------------------------------------------- /Resources/gradient.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/gradient.cur -------------------------------------------------------------------------------- /Resources/gradientnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/gradientnoinv.cur -------------------------------------------------------------------------------- /Resources/hand.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/hand.cur -------------------------------------------------------------------------------- /Resources/handgrab.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/handgrab.cur -------------------------------------------------------------------------------- /Resources/handpoint.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/handpoint.cur -------------------------------------------------------------------------------- /Resources/iclstub16.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/iclstub16.bin -------------------------------------------------------------------------------- /Resources/iclstub32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/iclstub32.dll -------------------------------------------------------------------------------- /Resources/line.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/line.cur -------------------------------------------------------------------------------- /Resources/linenoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/linenoinv.cur -------------------------------------------------------------------------------- /Resources/pencil.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/pencil.cur -------------------------------------------------------------------------------- /Resources/pencilnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/pencilnoinv.cur -------------------------------------------------------------------------------- /Resources/recolor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/recolor.cur -------------------------------------------------------------------------------- /Resources/recolornoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/recolornoinv.cur -------------------------------------------------------------------------------- /Resources/rect.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/rect.cur -------------------------------------------------------------------------------- /Resources/rectnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/rectnoinv.cur -------------------------------------------------------------------------------- /Resources/retouch.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/retouch.cur -------------------------------------------------------------------------------- /Resources/retouchnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/retouchnoinv.cur -------------------------------------------------------------------------------- /Resources/rotate.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/rotate.cur -------------------------------------------------------------------------------- /Resources/select.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/select.cur -------------------------------------------------------------------------------- /Resources/selectadd.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/selectadd.cur -------------------------------------------------------------------------------- /Resources/selectaddnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/selectaddnoinv.cur -------------------------------------------------------------------------------- /Resources/selectint.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/selectint.cur -------------------------------------------------------------------------------- /Resources/selectintnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/selectintnoinv.cur -------------------------------------------------------------------------------- /Resources/selectnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/selectnoinv.cur -------------------------------------------------------------------------------- /Resources/selectsub.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/selectsub.cur -------------------------------------------------------------------------------- /Resources/selectsubnoinv.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/Resources/selectsubnoinv.cur -------------------------------------------------------------------------------- /ShellEx.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | unit ShellEx; 19 | 20 | interface 21 | 22 | uses 23 | {$IFDEF WINDOWS} Windows, Messages, {$ENDIF} 24 | FileUtil, Forms, LclIntf, LclType, SysUtils, Dialogs; 25 | 26 | const 27 | // Open/Save dialog view modes (WPARAM) 28 | DVM_ICONS = $7029; 29 | DVM_LIST = $702B; 30 | DVM_DETAILS = $702C; 31 | DVM_THUMBS = $702D; 32 | DVM_TILES = $702E; 33 | 34 | dvm: array[0..4] of word = (DVM_ICONS, DVM_LIST, DVM_DETAILS, 35 | DVM_THUMBS, DVM_TILES); 36 | 37 | // Displays a 'Browse for folder' dialog box 38 | // Returns '' if the dialog was cancelled. 39 | function BrowseForFolder(const Title, InitFolder: string): string; 40 | // Sets the view mode of the listview in the specified Open/Save dialog 41 | procedure DlgSetViewMode(Dialog: THandle; Value: Cardinal); 42 | 43 | implementation 44 | 45 | function BrowseForFolder; 46 | var 47 | sdd: TSelectDirectoryDialog; 48 | 49 | begin 50 | sdd := TSelectDirectoryDialog.Create(Application); 51 | try 52 | sdd.Title := Title; 53 | sdd.FileName := SysToUTF8(InitFolder); 54 | if sdd.Execute then Result := UTF8ToSys(sdd.FileName) else Result := ''; 55 | finally 56 | sdd.Free; 57 | end; 58 | end; 59 | 60 | procedure DlgSetViewMode; 61 | begin 62 | {$IFDEF WINDOWS} 63 | SendMessage(GetDlgItem(GetParent(Dialog), $0461), WM_COMMAND, Value, 0); 64 | {$ENDIF} 65 | end; 66 | 67 | end. 68 | 69 | -------------------------------------------------------------------------------- /_LResources.inc: -------------------------------------------------------------------------------- 1 | ,LResources 2 | -------------------------------------------------------------------------------- /before_build.bat: -------------------------------------------------------------------------------- 1 | python make_pascalscript_import.py 2 | -------------------------------------------------------------------------------- /build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Greenfish Icon Editor Pro 3 | rem Copyright (c) 2012-13 B. Szalkai 4 | 5 | rem This program is free software: you can redistribute it and/or modify 6 | rem it under the terms of the GNU General Public License as published by 7 | rem the Free Software Foundation, either version 3 of the License, or 8 | rem (at your option) any later version. 9 | 10 | rem This program is distributed in the hope that it will be useful, 11 | rem but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | rem GNU General Public License for more details. 14 | 15 | rem You should have received a copy of the GNU General Public License 16 | rem along with this program. If not, see . 17 | 18 | rem Set 32-bit Lazarus installation location here. 19 | set lazarus32=c:\lazarus32 20 | rem Set 32-bit Lazarus config path here. 21 | set lazarus32config=%lazarus32%\__config 22 | rem Set 64-bit Lazarus installation location here. 23 | set lazarus64=c:\lazarus 24 | rem Set 64-bit Lazarus config path here. 25 | set lazarus64config=%lazarus64%\__config 26 | 27 | "%lazarus64%\lazbuild" --primary-config-path="%lazarus64config%" --build-mode=Release gfie.lpi 28 | 29 | rem Modify output exe name 30 | sed s/gfie64/gfie32/g gfie.lpi > gfie32.lpi 31 | cp gfie.ico gfie32.ico 32 | cp gfie.res gfie32.res 33 | "%lazarus32%\lazbuild" --primary-config-path="%lazarus32config%" --build-mode=Release --operating-system=win32 --cpu=i386 gfie32.lpi 34 | -------------------------------------------------------------------------------- /c/imgformats.h: -------------------------------------------------------------------------------- 1 | /* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef __IMGFORMATS_H 20 | #define __IMGFORMATS_H 21 | 22 | #include 23 | 24 | #ifndef false 25 | #define false 0 26 | #endif 27 | #ifndef true 28 | #define true 1 29 | #endif 30 | 31 | #define NEWA(x, count) ((x*)calloc(sizeof(x), count)) 32 | #define NEW(x) NEWA(x, 1) 33 | 34 | #ifdef WINDOWS 35 | #define CALLCONV _cdecl 36 | #else 37 | #define CALLCONV __attribute__((__cdecl__)) 38 | #endif 39 | 40 | #if defined(_MSC_VER) 41 | // Microsoft 42 | #define EXPORT extern "C" __declspec(dllexport) CALLCONV 43 | #elif defined(__GNUC__) 44 | // GCC 45 | #define EXPORT extern "C" __attribute__((visibility("default"))) CALLCONV 46 | #else 47 | #define EXPORT 48 | #pragma warning Unknown dynamic link import/export semantics. 49 | #endif 50 | 51 | typedef char mybool; 52 | typedef uint32_t Color32; 53 | typedef int32_t Color; 54 | #define cl32Transparent 0 55 | #define cl32Opaque 0xff000000 56 | 57 | // Callback routine to read/write 'count' bytes to/from 'data' from/to a stream resource specified by 'userData' 58 | typedef int32_t CALLCONV (*IOFunction)(void *userData, char *data, int32_t count); 59 | 60 | /////////////// PNG 61 | 62 | // Uncompresses PNG data into 32-bit bitmap. Returns true if succeeded, false otherwise. 63 | // w and h will contain image dimensions 64 | // dpi will contain image dpi, or 0 if not set 65 | // If bm==NULL, then it just returns image dimensions into w and h 66 | EXPORT mybool pngLoad(Color32 *bm, int32_t *w, int32_t *h, double *dpi, 67 | IOFunction readCallback, void *userData); 68 | // Saves bitmap as PNG image to stream. 69 | EXPORT mybool pngSave(Color32 *bm, int32_t w, int32_t h, double dpi, 70 | IOFunction writeCallback, void *userData, int32_t compressionLevel); 71 | 72 | //////////////// JPEG-2000 73 | 74 | // Uncompresses JP2 data into 32-bit bitmap. Returns true if succeeded, false otherwise. 75 | // w and h will contain image dimensions 76 | // bm will contain a pointer to the image -- this must be freed with jp2Free when done with processing 77 | // loads the image from (data, dataSize) 78 | EXPORT mybool jp2Load(Color32 **bm, int32_t *w, int32_t *h, void *data, int32_t dataSize); 79 | // Saves bitmap as JP2 image to memory 80 | // data must be freed with jp2Free afterwards 81 | // quality is the Peak Signal to Noise Ratio. if quality = 0, then lossless compression is used 82 | EXPORT mybool jp2Save(Color32 *bm, int32_t w, int32_t h, float quality, void **data, int32_t *dataSize); 83 | // Frees memory allocated by jp2Load and jp2Save 84 | // If those functions return false, there is no need to call jp2Free, because the returned pointer is null 85 | EXPORT void jp2Free(void *p); 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /c/openjpeg/cio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium 3 | * Copyright (c) 2002-2007, Professor Benoit Macq 4 | * Copyright (c) 2001-2003, David Janssens 5 | * Copyright (c) 2002-2003, Yannick Verschueren 6 | * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe 7 | * Copyright (c) 2005, Herve Drolon, FreeImage Team 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions 12 | * are met: 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __CIO_H 33 | #define __CIO_H 34 | /** 35 | @file cio.h 36 | @brief Implementation of a byte input-output process (CIO) 37 | 38 | The functions in CIO.C have for goal to realize a byte input / output process. 39 | */ 40 | 41 | /** @defgroup CIO CIO - byte input-output stream */ 42 | /*@{*/ 43 | 44 | /** @name Exported functions (see also openjpeg.h) */ 45 | /*@{*/ 46 | /* ----------------------------------------------------------------------- */ 47 | /** 48 | Number of bytes left before the end of the stream 49 | @param cio CIO handle 50 | @return Returns the number of bytes before the end of the stream 51 | */ 52 | int cio_numbytesleft(opj_cio_t *cio); 53 | /** 54 | Get pointer to the current position in the stream 55 | @param cio CIO handle 56 | @return Returns a pointer to the current position 57 | */ 58 | unsigned char *cio_getbp(opj_cio_t *cio); 59 | /** 60 | Write some bytes 61 | @param cio CIO handle 62 | @param v Value to write 63 | @param n Number of bytes to write 64 | @return Returns the number of bytes written or 0 if an error occured 65 | */ 66 | unsigned int cio_write(opj_cio_t *cio, unsigned int v, int n); 67 | /** 68 | Read some bytes 69 | @param cio CIO handle 70 | @param n Number of bytes to read 71 | @return Returns the value of the n bytes read 72 | */ 73 | unsigned int cio_read(opj_cio_t *cio, int n); 74 | /** 75 | Skip some bytes 76 | @param cio CIO handle 77 | @param n Number of bytes to skip 78 | */ 79 | void cio_skip(opj_cio_t *cio, int n); 80 | /* ----------------------------------------------------------------------- */ 81 | /*@}*/ 82 | 83 | /*@}*/ 84 | 85 | #endif /* __CIO_H */ 86 | 87 | -------------------------------------------------------------------------------- /c/openjpeg/event.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/event.c -------------------------------------------------------------------------------- /c/openjpeg/event.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/event.h -------------------------------------------------------------------------------- /c/openjpeg/fix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium 3 | * Copyright (c) 2002-2007, Professor Benoit Macq 4 | * Copyright (c) 2001-2003, David Janssens 5 | * Copyright (c) 2002-2003, Yannick Verschueren 6 | * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe 7 | * Copyright (c) 2005, Herve Drolon, FreeImage Team 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions 12 | * are met: 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | #ifndef __FIX_H 32 | #define __FIX_H 33 | 34 | #if defined(_MSC_VER) || defined(__BORLANDC__) 35 | #define int64 __int64 36 | #else 37 | #define int64 long long 38 | #endif 39 | 40 | /** 41 | @file fix.h 42 | @brief Implementation of operations of specific multiplication (FIX) 43 | 44 | The functions in FIX.H have for goal to realize specific multiplication. 45 | */ 46 | 47 | /** @defgroup FIX FIX - Implementation of operations of specific multiplication */ 48 | /*@{*/ 49 | 50 | /** 51 | Multiply two fixed-precision rational numbers. 52 | @param a 53 | @param b 54 | @return Returns a * b 55 | */ 56 | static INLINE int fix_mul(int a, int b) { 57 | int64 temp = (int64) a * (int64) b ; 58 | temp += temp & 4096; 59 | return (int) (temp >> 13) ; 60 | } 61 | 62 | /*@}*/ 63 | 64 | #endif /* __FIX_H */ 65 | -------------------------------------------------------------------------------- /c/openjpeg/image.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/image.c -------------------------------------------------------------------------------- /c/openjpeg/image.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/image.h -------------------------------------------------------------------------------- /c/openjpeg/j2k_lib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/j2k_lib.c -------------------------------------------------------------------------------- /c/openjpeg/j2k_lib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/j2k_lib.h -------------------------------------------------------------------------------- /c/openjpeg/jp2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/jp2.c -------------------------------------------------------------------------------- /c/openjpeg/jpt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium 3 | * Copyright (c) 2002-2007, Professor Benoit Macq 4 | * Copyright (c) 2002-2003, Yannick Verschueren 5 | * Copyright (c) 2005, Herve Drolon, FreeImage Team 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef __JPT_H 31 | #define __JPT_H 32 | /** 33 | @file jpt.h 34 | @brief JPT-stream reader (JPEG 2000, JPIP) 35 | 36 | JPT-stream functions are implemented in J2K.C. 37 | */ 38 | 39 | /** 40 | Message Header JPT stream structure 41 | */ 42 | typedef struct opj_jpt_msg_header { 43 | /** In-class Identifier */ 44 | unsigned int Id; 45 | /** Last byte information */ 46 | unsigned int last_byte; 47 | /** Class Identifier */ 48 | unsigned int Class_Id; 49 | /** CSn : index identifier */ 50 | unsigned int CSn_Id; 51 | /** Message offset */ 52 | unsigned int Msg_offset; 53 | /** Message length */ 54 | unsigned int Msg_length; 55 | /** Auxiliary for JPP case */ 56 | unsigned int Layer_nb; 57 | } opj_jpt_msg_header_t; 58 | 59 | /* ----------------------------------------------------------------------- */ 60 | 61 | /** 62 | Initialize the value of the message header structure 63 | @param header Message header structure 64 | */ 65 | void jpt_init_msg_header(opj_jpt_msg_header_t * header); 66 | 67 | /** 68 | Read the message header for a JPP/JPT - stream 69 | @param cinfo Codec context info 70 | @param cio CIO handle 71 | @param header Message header structure 72 | */ 73 | void jpt_read_msg_header(opj_common_ptr cinfo, opj_cio_t *cio, opj_jpt_msg_header_t *header); 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /c/openjpeg/openjpeg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/openjpeg.c -------------------------------------------------------------------------------- /c/openjpeg/opj_config.h: -------------------------------------------------------------------------------- 1 | /* opj_config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define if building universal (internal helper macro) */ 4 | #undef AC_APPLE_UNIVERSAL_BUILD 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 10 | #undef HAVE_FSEEKO 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_INTTYPES_H 14 | 15 | /* Define to 1 if you have the `lcms' library (-llcms). */ 16 | #undef HAVE_LIBLCMS 17 | 18 | /* define to 1 if you have lcms version 1.x */ 19 | #undef HAVE_LIBLCMS1 20 | 21 | /* define to 1 if you have lcms version 2.x */ 22 | #undef HAVE_LIBLCMS2 23 | 24 | /* define to 1 if you have libpng */ 25 | #define HAVE_LIBPNG 26 | 27 | /* define to 1 if you have libtiff */ 28 | #undef HAVE_LIBTIFF 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_MEMORY_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #define HAVE_STDINT_H 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #define HAVE_STDLIB_H 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #define HAVE_STRINGS_H 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #define HAVE_STRING_H 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #undef HAVE_SYS_STAT_H 47 | 48 | /* Define to 1 if you have the header file. */ 49 | #undef HAVE_SYS_TYPES_H 50 | 51 | /* Define to 1 if you have the header file. */ 52 | #undef HAVE_UNISTD_H 53 | 54 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 55 | */ 56 | #undef LT_OBJDIR 57 | 58 | /* Name of package */ 59 | #undef PACKAGE 60 | 61 | /* Define to the address where bug reports for this package should be sent. */ 62 | #undef PACKAGE_BUGREPORT 63 | 64 | /* Define to the full name of this package. */ 65 | #undef PACKAGE_NAME 66 | 67 | /* Define to the full name and version of this package. */ 68 | #undef PACKAGE_STRING 69 | 70 | /* Define to the one symbol short name of this package. */ 71 | #undef PACKAGE_TARNAME 72 | 73 | /* Define to the home page for this package. */ 74 | #undef PACKAGE_URL 75 | 76 | /* Define to the version of this package. */ 77 | #define PACKAGE_VERSION "1.4" 78 | 79 | /* Define to 1 if you have the ANSI C header files. */ 80 | #undef STDC_HEADERS 81 | 82 | /* Version number of package */ 83 | #undef VERSION 84 | 85 | /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most 86 | significant byte first (like Motorola and SPARC, unlike Intel). */ 87 | #if defined AC_APPLE_UNIVERSAL_BUILD 88 | # if defined __BIG_ENDIAN__ 89 | # define WORDS_BIGENDIAN 1 90 | # endif 91 | #else 92 | # ifndef WORDS_BIGENDIAN 93 | # undef WORDS_BIGENDIAN 94 | # endif 95 | #endif 96 | 97 | /* Number of bits in a file offset, on hosts where this is settable. */ 98 | #undef _FILE_OFFSET_BITS 99 | 100 | /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 101 | #undef _LARGEFILE_SOURCE 102 | 103 | /* Define for large files, on AIX-style hosts. */ 104 | #undef _LARGE_FILES 105 | -------------------------------------------------------------------------------- /c/openjpeg/opj_includes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/opj_includes.h -------------------------------------------------------------------------------- /c/openjpeg/opj_malloc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/c/openjpeg/opj_malloc.h -------------------------------------------------------------------------------- /c/openjpeg/raw.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium 3 | * Copyright (c) 2002-2007, Professor Benoit Macq 4 | * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe 5 | * Copyright (c) 2005, Herve Drolon, FreeImage Team 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include "opj_includes.h" 31 | 32 | /* 33 | ========================================================== 34 | local functions 35 | ========================================================== 36 | */ 37 | 38 | 39 | /* 40 | ========================================================== 41 | RAW encoding interface 42 | ========================================================== 43 | */ 44 | 45 | opj_raw_t* raw_create(void) { 46 | opj_raw_t *raw = (opj_raw_t*)opj_malloc(sizeof(opj_raw_t)); 47 | return raw; 48 | } 49 | 50 | void raw_destroy(opj_raw_t *raw) { 51 | if(raw) { 52 | opj_free(raw); 53 | } 54 | } 55 | 56 | int raw_numbytes(opj_raw_t *raw) { 57 | return raw->bp - raw->start; 58 | } 59 | 60 | void raw_init_dec(opj_raw_t *raw, unsigned char *bp, int len) { 61 | raw->start = bp; 62 | raw->lenmax = len; 63 | raw->len = 0; 64 | raw->c = 0; 65 | raw->ct = 0; 66 | } 67 | 68 | int raw_decode(opj_raw_t *raw) { 69 | int d; 70 | if (raw->ct == 0) { 71 | raw->ct = 8; 72 | if (raw->len == raw->lenmax) { 73 | raw->c = 0xff; 74 | } else { 75 | if (raw->c == 0xff) { 76 | raw->ct = 7; 77 | } 78 | raw->c = *(raw->start + raw->len); 79 | raw->len++; 80 | } 81 | } 82 | raw->ct--; 83 | d = (raw->c >> raw->ct) & 0x01; 84 | 85 | return d; 86 | } 87 | 88 | -------------------------------------------------------------------------------- /c/zlib/compress.c: -------------------------------------------------------------------------------- 1 | /* compress.c -- compress a memory buffer 2 | * Copyright (C) 1995-2005 Jean-loup Gailly. 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id$ */ 7 | 8 | #define ZLIB_INTERNAL 9 | #include "zlib.h" 10 | 11 | /* =========================================================================== 12 | Compresses the source buffer into the destination buffer. The level 13 | parameter has the same meaning as in deflateInit. sourceLen is the byte 14 | length of the source buffer. Upon entry, destLen is the total size of the 15 | destination buffer, which must be at least 0.1% larger than sourceLen plus 16 | 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 17 | 18 | compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 19 | memory, Z_BUF_ERROR if there was not enough room in the output buffer, 20 | Z_STREAM_ERROR if the level parameter is invalid. 21 | */ 22 | int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) 23 | Bytef *dest; 24 | uLongf *destLen; 25 | const Bytef *source; 26 | uLong sourceLen; 27 | int level; 28 | { 29 | z_stream stream; 30 | int err; 31 | 32 | stream.next_in = (Bytef*)source; 33 | stream.avail_in = (uInt)sourceLen; 34 | #ifdef MAXSEG_64K 35 | /* Check for source > 64K on 16-bit machine: */ 36 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 37 | #endif 38 | stream.next_out = dest; 39 | stream.avail_out = (uInt)*destLen; 40 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; 41 | 42 | stream.zalloc = (alloc_func)0; 43 | stream.zfree = (free_func)0; 44 | stream.opaque = (voidpf)0; 45 | 46 | err = deflateInit(&stream, level); 47 | if (err != Z_OK) return err; 48 | 49 | err = deflate(&stream, Z_FINISH); 50 | if (err != Z_STREAM_END) { 51 | deflateEnd(&stream); 52 | return err == Z_OK ? Z_BUF_ERROR : err; 53 | } 54 | *destLen = stream.total_out; 55 | 56 | err = deflateEnd(&stream); 57 | return err; 58 | } 59 | 60 | /* =========================================================================== 61 | */ 62 | int ZEXPORT compress (dest, destLen, source, sourceLen) 63 | Bytef *dest; 64 | uLongf *destLen; 65 | const Bytef *source; 66 | uLong sourceLen; 67 | { 68 | return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); 69 | } 70 | 71 | /* =========================================================================== 72 | If the default memLevel or windowBits for deflateInit() is changed, then 73 | this function needs to be updated. 74 | */ 75 | uLong ZEXPORT compressBound (sourceLen) 76 | uLong sourceLen; 77 | { 78 | return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 79 | (sourceLen >> 25) + 13; 80 | } 81 | -------------------------------------------------------------------------------- /c/zlib/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /c/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /c/zlib/inftrees.h: -------------------------------------------------------------------------------- 1 | /* inftrees.h -- header to use inftrees.c 2 | * Copyright (C) 1995-2005, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | /* Structure for decoding tables. Each entry provides either the 12 | information needed to do the operation requested by the code that 13 | indexed that table entry, or it provides a pointer to another 14 | table that indexes more bits of the code. op indicates whether 15 | the entry is a pointer to another table, a literal, a length or 16 | distance, an end-of-block, or an invalid code. For a table 17 | pointer, the low four bits of op is the number of index bits of 18 | that table. For a length or distance, the low four bits of op 19 | is the number of extra bits to get after the code. bits is 20 | the number of bits in this code or part of the code to drop off 21 | of the bit buffer. val is the actual byte to output in the case 22 | of a literal, the base length or distance, or the offset from 23 | the current table to the next table. Each entry is four bytes. */ 24 | typedef struct { 25 | unsigned char op; /* operation, extra bits, table bits */ 26 | unsigned char bits; /* bits in this part of the code */ 27 | unsigned short val; /* offset in table or code value */ 28 | } code; 29 | 30 | /* op values as set by inflate_table(): 31 | 00000000 - literal 32 | 0000tttt - table link, tttt != 0 is the number of table index bits 33 | 0001eeee - length or distance, eeee is the number of extra bits 34 | 01100000 - end of block 35 | 01000000 - invalid code 36 | */ 37 | 38 | /* Maximum size of the dynamic table. The maximum number of code structures is 39 | 1444, which is the sum of 852 for literal/length codes and 592 for distance 40 | codes. These values were found by exhaustive searches using the program 41 | examples/enough.c found in the zlib distribtution. The arguments to that 42 | program are the number of symbols, the initial root table size, and the 43 | maximum bit length of a code. "enough 286 9 15" for literal/length codes 44 | returns returns 852, and "enough 30 6 15" for distance codes returns 592. 45 | The initial root table size (9 or 6) is found in the fifth argument of the 46 | inflate_table() calls in inflate.c and infback.c. If the root table size is 47 | changed, then these maximum sizes would be need to be recalculated and 48 | updated. */ 49 | #define ENOUGH_LENS 852 50 | #define ENOUGH_DISTS 592 51 | #define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) 52 | 53 | /* Type of code to build for inflate_table() */ 54 | typedef enum { 55 | CODES, 56 | LENS, 57 | DISTS 58 | } codetype; 59 | 60 | int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, 61 | unsigned codes, code FAR * FAR *table, 62 | unsigned FAR *bits, unsigned short FAR *work)); 63 | -------------------------------------------------------------------------------- /c/zlib/uncompr.c: -------------------------------------------------------------------------------- 1 | /* uncompr.c -- decompress a memory buffer 2 | * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id$ */ 7 | 8 | #define ZLIB_INTERNAL 9 | #include "zlib.h" 10 | 11 | /* =========================================================================== 12 | Decompresses the source buffer into the destination buffer. sourceLen is 13 | the byte length of the source buffer. Upon entry, destLen is the total 14 | size of the destination buffer, which must be large enough to hold the 15 | entire uncompressed data. (The size of the uncompressed data must have 16 | been saved previously by the compressor and transmitted to the decompressor 17 | by some mechanism outside the scope of this compression library.) 18 | Upon exit, destLen is the actual size of the compressed buffer. 19 | 20 | uncompress returns Z_OK if success, Z_MEM_ERROR if there was not 21 | enough memory, Z_BUF_ERROR if there was not enough room in the output 22 | buffer, or Z_DATA_ERROR if the input data was corrupted. 23 | */ 24 | int ZEXPORT uncompress (dest, destLen, source, sourceLen) 25 | Bytef *dest; 26 | uLongf *destLen; 27 | const Bytef *source; 28 | uLong sourceLen; 29 | { 30 | z_stream stream; 31 | int err; 32 | 33 | stream.next_in = (Bytef*)source; 34 | stream.avail_in = (uInt)sourceLen; 35 | /* Check for source > 64K on 16-bit machine: */ 36 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 37 | 38 | stream.next_out = dest; 39 | stream.avail_out = (uInt)*destLen; 40 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; 41 | 42 | stream.zalloc = (alloc_func)0; 43 | stream.zfree = (free_func)0; 44 | 45 | err = inflateInit(&stream); 46 | if (err != Z_OK) return err; 47 | 48 | err = inflate(&stream, Z_FINISH); 49 | if (err != Z_STREAM_END) { 50 | inflateEnd(&stream); 51 | if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) 52 | return Z_DATA_ERROR; 53 | return err; 54 | } 55 | *destLen = stream.total_out; 56 | 57 | err = inflateEnd(&stream); 58 | return err; 59 | } 60 | -------------------------------------------------------------------------------- /compile_resources.bat: -------------------------------------------------------------------------------- 1 | rem Greenfish Icon Editor Pro 2 | rem Copyright (c) 2012-13 B. Szalkai 3 | 4 | rem This program is free software: you can redistribute it and/or modify 5 | rem it under the terms of the GNU General Public License as published by 6 | rem the Free Software Foundation, either version 3 of the License, or 7 | rem (at your option) any later version. 8 | 9 | rem This program is distributed in the hope that it will be useful, 10 | rem but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | rem GNU General Public License for more details. 13 | 14 | rem You should have received a copy of the GNU General Public License 15 | rem along with this program. If not, see . 16 | 17 | c:\lazarus\tools\lazres misc.lrs @misc.lrs.txt 18 | -------------------------------------------------------------------------------- /dlgBatchConvert.lfm: -------------------------------------------------------------------------------- 1 | object frmBatchConvert: TfrmBatchConvert 2 | Left = 396 3 | Height = 377 4 | Top = 171 5 | Width = 401 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 377 8 | ClientWidth = 401 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | LCLVersion = '1.1' 16 | object gbFiles: TGroupBox 17 | Left = 8 18 | Height = 177 19 | Top = 8 20 | Width = 385 21 | ClientHeight = 159 22 | ClientWidth = 381 23 | TabOrder = 0 24 | object lb: TListBox 25 | Left = 8 26 | Height = 121 27 | Top = 0 28 | Width = 369 29 | ItemHeight = 0 30 | TabOrder = 0 31 | end 32 | object bAdd: TButton 33 | Left = 8 34 | Height = 25 35 | Top = 128 36 | Width = 89 37 | OnClick = bAddClick 38 | TabOrder = 1 39 | end 40 | object bClear: TButton 41 | Left = 104 42 | Height = 25 43 | Top = 128 44 | Width = 89 45 | OnClick = bClearClick 46 | TabOrder = 2 47 | end 48 | end 49 | object gbSettings: TGroupBox 50 | Left = 8 51 | Height = 145 52 | Top = 192 53 | Width = 385 54 | ClientHeight = 127 55 | ClientWidth = 381 56 | TabOrder = 1 57 | OnClick = gbSettingsClick 58 | object lFormat: TLabel 59 | Left = 8 60 | Height = 13 61 | Top = 4 62 | Width = 6 63 | Caption = 'X' 64 | ParentColor = False 65 | end 66 | object lFolder: TLabel 67 | Left = 8 68 | Height = 13 69 | Top = 36 70 | Width = 6 71 | Caption = 'X' 72 | ParentColor = False 73 | end 74 | object cbFormat: TComboBox 75 | Left = 152 76 | Height = 21 77 | Top = 0 78 | Width = 225 79 | ItemHeight = 13 80 | ItemIndex = 0 81 | Items.Strings = ( 82 | '-' 83 | ) 84 | OnChange = cbFormatChange 85 | Style = csDropDownList 86 | TabOrder = 0 87 | Text = '-' 88 | end 89 | object bIconFormats: TButton 90 | Left = 8 91 | Height = 25 92 | Top = 92 93 | Width = 185 94 | OnClick = bIconFormatsClick 95 | TabOrder = 1 96 | end 97 | object cbOpen: TCheckBox 98 | Left = 8 99 | Height = 19 100 | Top = 64 101 | Width = 20 102 | Checked = True 103 | State = cbChecked 104 | TabOrder = 2 105 | end 106 | object eFolder: TEdit 107 | Left = 152 108 | Height = 21 109 | Top = 32 110 | Width = 185 111 | TabOrder = 3 112 | end 113 | object bFolder: TButton 114 | Left = 344 115 | Height = 25 116 | Top = 32 117 | Width = 33 118 | Caption = '...' 119 | OnClick = bFolderClick 120 | TabOrder = 4 121 | end 122 | object bSaveOptions: TButton 123 | Left = 206 124 | Height = 25 125 | Top = 92 126 | Width = 168 127 | OnClick = bSaveOptionsClick 128 | TabOrder = 5 129 | end 130 | end 131 | object bOK: TButton 132 | Left = 240 133 | Height = 25 134 | Top = 344 135 | Width = 75 136 | Default = True 137 | OnClick = bOKClick 138 | TabOrder = 2 139 | end 140 | object bCancel: TButton 141 | Left = 320 142 | Height = 25 143 | Top = 344 144 | Width = 75 145 | Cancel = True 146 | ModalResult = 2 147 | TabOrder = 3 148 | end 149 | object pb: TProgressBar 150 | Left = 8 151 | Height = 25 152 | Top = 344 153 | Width = 225 154 | Max = 0 155 | TabOrder = 4 156 | Visible = False 157 | end 158 | end 159 | -------------------------------------------------------------------------------- /dlgBevel.lfm: -------------------------------------------------------------------------------- 1 | inherited frmBevel: TfrmBevel 2 | Left = 338 3 | Height = 185 4 | Top = 282 5 | Width = 241 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 185 8 | ClientWidth = 241 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnHide = FormHide 14 | OnShow = FormShow 15 | object alIntensity: TAdjustLabel[0] 16 | Left = 8 17 | Height = 1 18 | Top = 108 19 | Width = 1 20 | ParentColor = False 21 | AttachedEdit = neIntensity 22 | end 23 | object alBlur: TAdjustLabel[1] 24 | Left = 8 25 | Height = 1 26 | Top = 76 27 | Width = 1 28 | ParentColor = False 29 | AttachedEdit = neBlur 30 | end 31 | object alSize: TAdjustLabel[2] 32 | Left = 8 33 | Height = 1 34 | Top = 12 35 | Width = 1 36 | ParentColor = False 37 | AttachedEdit = neSize 38 | end 39 | object alAngle: TAdjustLabel[3] 40 | Left = 8 41 | Height = 1 42 | Top = 44 43 | Width = 1 44 | ParentColor = False 45 | AttachedEdit = neAngle 46 | end 47 | object neIntensity: TNumberEdit[4] 48 | Left = 96 49 | Height = 21 50 | Top = 104 51 | Width = 57 52 | OnChange = ObjectChange 53 | TabOrder = 0 54 | Text = '1' 55 | Min = 1 56 | Max = 100 57 | Increment = 1 58 | end 59 | object neBlur: TNumberEdit[5] 60 | Left = 96 61 | Height = 21 62 | Top = 72 63 | Width = 57 64 | OnChange = ObjectChange 65 | TabOrder = 1 66 | Text = '0' 67 | Min = 0 68 | Max = 50 69 | Increment = 0.25 70 | end 71 | object bReset: TButton[6] 72 | Left = 160 73 | Height = 25 74 | Top = 8 75 | Width = 75 76 | OnClick = bResetClick 77 | TabOrder = 2 78 | end 79 | object bOK: TButton[7] 80 | Left = 160 81 | Height = 25 82 | Top = 72 83 | Width = 75 84 | Default = True 85 | ModalResult = 1 86 | TabOrder = 3 87 | end 88 | object bCancel: TButton[8] 89 | Left = 160 90 | Height = 25 91 | Top = 104 92 | Width = 75 93 | Cancel = True 94 | ModalResult = 2 95 | TabOrder = 4 96 | end 97 | object neSize: TNumberEdit[9] 98 | Left = 96 99 | Height = 21 100 | Top = 8 101 | Width = 57 102 | OnChange = ObjectChange 103 | TabOrder = 5 104 | Text = '1' 105 | Min = 1 106 | Max = 100 107 | Increment = 1 108 | end 109 | object neAngle: TNumberEdit[10] 110 | Left = 96 111 | Height = 21 112 | Top = 40 113 | Width = 57 114 | OnChange = ObjectChange 115 | TabOrder = 6 116 | Text = '0' 117 | Min = -180 118 | Max = 180 119 | Increment = 1 120 | end 121 | object cbPreview: TCheckBox[11] 122 | Left = 8 123 | Height = 19 124 | Top = 160 125 | Width = 20 126 | OnClick = cbPreviewClick 127 | TabOrder = 7 128 | end 129 | object cbToric: TCheckBox[12] 130 | Left = 8 131 | Height = 19 132 | Top = 136 133 | Width = 20 134 | OnClick = ObjectChange 135 | TabOrder = 8 136 | end 137 | end 138 | -------------------------------------------------------------------------------- /dlgBlur.lfm: -------------------------------------------------------------------------------- 1 | inherited frmBlur: TfrmBlur 2 | Left = 533 3 | Height = 168 4 | Top = 294 5 | Width = 234 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 168 8 | ClientWidth = 234 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnHide = FormHide 14 | OnShow = FormShow 15 | Position = poScreenCenter 16 | object alGaussianRadius: TAdjustLabel[0] 17 | Left = 16 18 | Height = 1 19 | Top = 36 20 | Width = 1 21 | ParentColor = False 22 | AttachedEdit = neGaussianRadius 23 | end 24 | object alBoxRadius: TAdjustLabel[1] 25 | Left = 16 26 | Height = 1 27 | Top = 92 28 | Width = 1 29 | ParentColor = False 30 | AttachedEdit = neBoxRadius 31 | end 32 | object rbGaussian: TRadioButton[2] 33 | Left = 8 34 | Height = 19 35 | Top = 8 36 | Width = 20 37 | Checked = True 38 | OnClick = rbClick 39 | TabOrder = 0 40 | TabStop = True 41 | end 42 | object rbBox: TRadioButton[3] 43 | Left = 8 44 | Height = 19 45 | Top = 64 46 | Width = 20 47 | OnClick = rbClick 48 | TabOrder = 1 49 | end 50 | object neGaussianRadius: TNumberEdit[4] 51 | Left = 80 52 | Height = 21 53 | Top = 32 54 | Width = 57 55 | OnChange = neChange 56 | TabOrder = 2 57 | Text = '0' 58 | Min = 0 59 | Max = 100 60 | Increment = 0.25 61 | end 62 | object bOK: TButton[5] 63 | Left = 152 64 | Height = 25 65 | Top = 24 66 | Width = 75 67 | Default = True 68 | ModalResult = 1 69 | TabOrder = 3 70 | end 71 | object bCancel: TButton[6] 72 | Left = 152 73 | Height = 25 74 | Top = 64 75 | Width = 75 76 | Cancel = True 77 | ModalResult = 2 78 | TabOrder = 4 79 | end 80 | object neBoxRadius: TNumberEdit[7] 81 | Left = 80 82 | Height = 21 83 | Top = 88 84 | Width = 57 85 | OnChange = neChange 86 | TabOrder = 5 87 | Text = '1' 88 | Min = 1 89 | Max = 100 90 | Increment = 1 91 | end 92 | object cbPreview: TCheckBox[8] 93 | Left = 8 94 | Height = 19 95 | Top = 144 96 | Width = 20 97 | OnClick = cbPreviewClick 98 | TabOrder = 6 99 | end 100 | object cbToric: TCheckBox[9] 101 | Left = 8 102 | Height = 19 103 | Top = 120 104 | Width = 20 105 | OnClick = cbToricClick 106 | TabOrder = 7 107 | end 108 | end 109 | -------------------------------------------------------------------------------- /dlgCreateIcon.lfm: -------------------------------------------------------------------------------- 1 | object frmCreateIcon: TfrmCreateIcon 2 | Left = 404 3 | Height = 170 4 | Top = 291 5 | Width = 297 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 170 8 | ClientWidth = 297 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | LCLVersion = '1.1' 16 | object lInfo: TLabel 17 | Left = 8 18 | Height = 1 19 | Top = 8 20 | Width = 1 21 | ParentColor = False 22 | end 23 | object l16Colors: TLabel 24 | Left = 8 25 | Height = 13 26 | Top = 64 27 | Width = 52 28 | Alignment = taRightJustify 29 | AutoSize = False 30 | ParentColor = False 31 | end 32 | object l256Colors: TLabel 33 | Left = 8 34 | Height = 13 35 | Top = 80 36 | Width = 52 37 | Alignment = taRightJustify 38 | AutoSize = False 39 | ParentColor = False 40 | end 41 | object l24Bit: TLabel 42 | Left = 8 43 | Height = 13 44 | Top = 96 45 | Width = 52 46 | Alignment = taRightJustify 47 | AutoSize = False 48 | ParentColor = False 49 | end 50 | object l32Bit: TLabel 51 | Left = 8 52 | Height = 13 53 | Top = 112 54 | Width = 52 55 | Alignment = taRightJustify 56 | AutoSize = False 57 | ParentColor = False 58 | end 59 | object lSize16: TLabel 60 | Left = 72 61 | Height = 13 62 | Top = 32 63 | Width = 12 64 | Caption = '16' 65 | ParentColor = False 66 | end 67 | object lSize32: TLabel 68 | Left = 120 69 | Height = 13 70 | Top = 32 71 | Width = 12 72 | Caption = '32' 73 | ParentColor = False 74 | end 75 | object lSize48: TLabel 76 | Left = 144 77 | Height = 13 78 | Top = 32 79 | Width = 12 80 | Caption = '48' 81 | ParentColor = False 82 | end 83 | object lSize64: TLabel 84 | Left = 168 85 | Height = 13 86 | Top = 32 87 | Width = 12 88 | Caption = '64' 89 | ParentColor = False 90 | end 91 | object lSize256: TLabel 92 | Left = 192 93 | Height = 13 94 | Top = 32 95 | Width = 18 96 | Caption = '256' 97 | ParentColor = False 98 | end 99 | object lBW: TLabel 100 | Left = 8 101 | Height = 13 102 | Top = 48 103 | Width = 52 104 | Alignment = taRightJustify 105 | AutoSize = False 106 | ParentColor = False 107 | end 108 | object lSize24: TLabel 109 | Left = 96 110 | Height = 13 111 | Top = 32 112 | Width = 12 113 | Caption = '24' 114 | ParentColor = False 115 | end 116 | object bReset: TButton 117 | Left = 8 118 | Height = 25 119 | Top = 136 120 | Width = 57 121 | OnClick = bResetClick 122 | TabOrder = 0 123 | end 124 | object bNone: TButton 125 | Left = 136 126 | Height = 25 127 | Top = 136 128 | Width = 57 129 | OnClick = bAllNoneClick 130 | TabOrder = 1 131 | end 132 | object bAll: TButton 133 | Tag = 1 134 | Left = 72 135 | Height = 25 136 | Top = 136 137 | Width = 57 138 | OnClick = bAllNoneClick 139 | TabOrder = 2 140 | end 141 | object bOK: TButton 142 | Left = 216 143 | Height = 25 144 | Top = 72 145 | Width = 75 146 | Default = True 147 | OnClick = bOKClick 148 | TabOrder = 3 149 | end 150 | object bCancel: TButton 151 | Left = 216 152 | Height = 25 153 | Top = 104 154 | Width = 75 155 | Cancel = True 156 | ModalResult = 2 157 | TabOrder = 4 158 | end 159 | end 160 | -------------------------------------------------------------------------------- /dlgCreateMacIcon.lfm: -------------------------------------------------------------------------------- 1 | object frmCreateMacIcon: TfrmCreateMacIcon 2 | Left = 530 3 | Height = 457 4 | Top = 198 5 | Width = 313 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 457 8 | ClientWidth = 313 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | LCLVersion = '1.1' 16 | object bOK: TButton 17 | Left = 153 18 | Height = 25 19 | Top = 424 20 | Width = 72 21 | Default = True 22 | OnClick = bOKClick 23 | TabOrder = 0 24 | end 25 | object bCancel: TButton 26 | Left = 233 27 | Height = 25 28 | Top = 424 29 | Width = 72 30 | Cancel = True 31 | ModalResult = 2 32 | TabOrder = 1 33 | end 34 | object bAll: TButton 35 | Tag = 1 36 | Left = 168 37 | Height = 25 38 | Top = 392 39 | Width = 64 40 | OnClick = bAllNoneClick 41 | TabOrder = 2 42 | end 43 | object bNone: TButton 44 | Left = 240 45 | Height = 25 46 | Top = 392 47 | Width = 64 48 | OnClick = bAllNoneClick 49 | TabOrder = 3 50 | end 51 | object cgFormats: TCheckGroup 52 | Left = 9 53 | Height = 376 54 | Top = 8 55 | Width = 295 56 | AutoFill = True 57 | ChildSizing.LeftRightSpacing = 6 58 | ChildSizing.TopBottomSpacing = 6 59 | ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 60 | ChildSizing.EnlargeVertical = crsHomogenousChildResize 61 | ChildSizing.ShrinkHorizontal = crsScaleChilds 62 | ChildSizing.ShrinkVertical = crsScaleChilds 63 | ChildSizing.Layout = cclLeftToRightThenTopToBottom 64 | ChildSizing.ControlsPerLine = 1 65 | TabOrder = 4 66 | end 67 | object bReset: TButton 68 | Left = 96 69 | Height = 25 70 | Top = 392 71 | Width = 65 72 | OnClick = bResetClick 73 | TabOrder = 5 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /dlgDebug.lfm: -------------------------------------------------------------------------------- 1 | object frmDebug: TfrmDebug 2 | Left = 250 3 | Height = 354 4 | Top = 281 5 | Width = 466 6 | Caption = 'Debug' 7 | ClientHeight = 354 8 | ClientWidth = 466 9 | FormStyle = fsStayOnTop 10 | OnCreate = FormCreate 11 | LCLVersion = '0.9.31' 12 | object m: TMemo 13 | Left = 0 14 | Height = 354 15 | Top = 0 16 | Width = 466 17 | Align = alClient 18 | ScrollBars = ssAutoBoth 19 | TabOrder = 0 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /dlgDebug.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | unit dlgDebug; 19 | 20 | {$mode delphi} 21 | 22 | interface 23 | 24 | uses 25 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls; 26 | 27 | const 28 | EnableDebug = True; 29 | 30 | type 31 | 32 | { TfrmDebug } 33 | 34 | TfrmDebug = class(TForm) 35 | m: TMemo; 36 | procedure FormCreate(Sender: TObject); 37 | private 38 | { private declarations } 39 | public 40 | 41 | end; 42 | 43 | var 44 | frmDebug: TfrmDebug; 45 | VerboseMode: boolean = False; 46 | 47 | procedure Log(const s: string = ''); 48 | procedure LogInteger(const i: integer); 49 | procedure LogFormat(const Fmt: string; const Args: array of const); 50 | procedure LogDump(p: Pointer; size: integer); 51 | 52 | implementation 53 | 54 | {$R *.lfm} 55 | 56 | uses ieShared; 57 | 58 | procedure Log(const s: string); 59 | begin 60 | if not EnableDebug then Exit; 61 | DoCreateForm(TfrmDebug, frmDebug); 62 | frmDebug.m.Lines.Add(s); 63 | frmDebug.Visible := True; 64 | end; 65 | 66 | procedure LogInteger(const i: integer); 67 | begin 68 | Log(IntToStr(i)); 69 | end; 70 | 71 | procedure LogFormat(const Fmt: string; const Args: array of const); 72 | begin 73 | Log(Format(Fmt, Args)); 74 | end; 75 | 76 | procedure LogDump(p: Pointer; size: integer); 77 | var 78 | i: integer; 79 | s: string; 80 | begin 81 | s := ''; 82 | for i := 0 to size - 1 do 83 | s += IntToHex(PByteArray(p)[i], 2)+' '; 84 | Log(s); 85 | end; 86 | 87 | { TfrmDebug } 88 | 89 | procedure TfrmDebug.FormCreate(Sender: TObject); 90 | begin 91 | if VerboseMode then Log('TfrmDebug created'); 92 | end; 93 | 94 | end. 95 | 96 | -------------------------------------------------------------------------------- /dlgExeFormat.lfm: -------------------------------------------------------------------------------- 1 | object frmExeFormat: TfrmExeFormat 2 | Left = 525 3 | Height = 89 4 | Top = 312 5 | Width = 214 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 89 8 | ClientWidth = 214 9 | Font.Height = -11 10 | Font.Name = 'Tahoma' 11 | OnCreate = FormCreate 12 | OnShow = FormShow 13 | Position = poScreenCenter 14 | LCLVersion = '1.1' 15 | object bOK: TButton 16 | Left = 112 17 | Height = 25 18 | Top = 32 19 | Width = 96 20 | Default = True 21 | ModalResult = 1 22 | TabOrder = 0 23 | end 24 | object rg: TRadioGroup 25 | Left = 8 26 | Height = 73 27 | Top = 8 28 | Width = 99 29 | AutoFill = True 30 | ChildSizing.LeftRightSpacing = 6 31 | ChildSizing.TopBottomSpacing = 6 32 | ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 33 | ChildSizing.EnlargeVertical = crsHomogenousChildResize 34 | ChildSizing.ShrinkHorizontal = crsScaleChilds 35 | ChildSizing.ShrinkVertical = crsScaleChilds 36 | ChildSizing.Layout = cclLeftToRightThenTopToBottom 37 | ChildSizing.ControlsPerLine = 1 38 | ClientHeight = 55 39 | ClientWidth = 95 40 | ItemIndex = 0 41 | Items.Strings = ( 42 | '32-bit (PE)' 43 | '16-bit (NE)' 44 | ) 45 | TabOrder = 1 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /dlgExeFormat.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | unit dlgExeFormat; 19 | 20 | {$mode delphi} 21 | 22 | interface 23 | 24 | uses 25 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 26 | ExtCtrls; 27 | 28 | type 29 | 30 | { TfrmExeFormat } 31 | 32 | TfrmExeFormat = class(TForm) 33 | bOK: TButton; 34 | rg: TRadioGroup; 35 | procedure FormCreate(Sender: TObject); 36 | procedure FormShow(Sender: TObject); 37 | private 38 | { private declarations } 39 | public 40 | procedure ApplyLanguagePack; 41 | end; 42 | 43 | var 44 | frmExeFormat: TfrmExeFormat; 45 | 46 | implementation 47 | 48 | {$R *.lfm} 49 | 50 | uses LangPack; 51 | 52 | { TfrmExeFormat } 53 | 54 | procedure TfrmExeFormat.FormCreate(Sender: TObject); 55 | begin 56 | ApplyLanguagePack; 57 | end; 58 | 59 | procedure TfrmExeFormat.FormShow(Sender: TObject); 60 | begin 61 | // move form to screen center only the first time 62 | Position := poDesigned; 63 | end; 64 | 65 | procedure TfrmExeFormat.ApplyLanguagePack; 66 | begin 67 | Caption := lpGet('IF_TITLE'); 68 | bOK.Caption := lpGet('B_OK'); 69 | end; 70 | 71 | end. 72 | 73 | -------------------------------------------------------------------------------- /dlgExposure.lfm: -------------------------------------------------------------------------------- 1 | inherited frmExposure: TfrmExposure 2 | Left = 317 3 | Height = 137 4 | Top = 327 5 | Width = 328 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 137 8 | ClientWidth = 328 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | object lGamma: TLabel[0] 16 | Left = 8 17 | Height = 1 18 | Top = 12 19 | Width = 1 20 | ParentColor = False 21 | end 22 | object lBrightness: TLabel[1] 23 | Left = 8 24 | Height = 1 25 | Top = 44 26 | Width = 1 27 | ParentColor = False 28 | end 29 | object lContrast: TLabel[2] 30 | Left = 8 31 | Height = 1 32 | Top = 76 33 | Width = 1 34 | ParentColor = False 35 | end 36 | object tbGamma: TTrackBar[3] 37 | Left = 64 38 | Height = 25 39 | Top = 8 40 | Width = 200 41 | Frequency = 5 42 | Max = 50 43 | Min = -50 44 | OnChange = tbGammaChange 45 | Position = 0 46 | TabOrder = 0 47 | end 48 | object neGamma: TNumberEdit[4] 49 | Left = 272 50 | Height = 21 51 | Top = 8 52 | Width = 49 53 | OnChange = neGammaChange 54 | TabOrder = 1 55 | Text = '1' 56 | Min = 0.1 57 | Max = 10 58 | Increment = 0.1 59 | end 60 | object tbBrightness: TTrackBar[5] 61 | Left = 64 62 | Height = 25 63 | Top = 40 64 | Width = 200 65 | Frequency = 5 66 | Max = 50 67 | Min = -50 68 | OnChange = tbBrightnessChange 69 | Position = 0 70 | TabOrder = 7 71 | end 72 | object neBrightness: TNumberEdit[6] 73 | Left = 272 74 | Height = 21 75 | Top = 40 76 | Width = 49 77 | OnChange = neBrightnessChange 78 | TabOrder = 8 79 | Text = '0' 80 | Min = -1 81 | Max = 1 82 | Increment = 0.1 83 | end 84 | object tbContrast: TTrackBar[7] 85 | Left = 64 86 | Height = 25 87 | Top = 72 88 | Width = 200 89 | Frequency = 5 90 | Max = 50 91 | Min = -50 92 | OnChange = tbContrastChange 93 | Position = 0 94 | TabOrder = 2 95 | end 96 | object neContrast: TNumberEdit[8] 97 | Left = 272 98 | Height = 21 99 | Top = 72 100 | Width = 49 101 | OnChange = neContrastChange 102 | TabOrder = 3 103 | Text = '0' 104 | Min = -1 105 | Max = 1 106 | Increment = 0.1 107 | end 108 | object bOK: TButton[9] 109 | Left = 168 110 | Height = 25 111 | Top = 104 112 | Width = 75 113 | Default = True 114 | ModalResult = 1 115 | TabOrder = 4 116 | end 117 | object bCancel: TButton[10] 118 | Left = 248 119 | Height = 25 120 | Top = 104 121 | Width = 75 122 | Cancel = True 123 | ModalResult = 2 124 | TabOrder = 5 125 | end 126 | object bReset: TButton[11] 127 | Left = 8 128 | Height = 25 129 | Top = 104 130 | Width = 75 131 | OnClick = bResetClick 132 | TabOrder = 6 133 | end 134 | end 135 | -------------------------------------------------------------------------------- /dlgFormulae.lfm: -------------------------------------------------------------------------------- 1 | inherited frmFormulae: TfrmFormulae 2 | Left = 402 3 | Height = 187 4 | Top = 329 5 | Width = 325 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 187 8 | ClientWidth = 325 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnHide = FormHide 14 | OnShow = FormShow 15 | object lRed: TLabel[0] 16 | Left = 9 17 | Height = 13 18 | Top = 12 19 | Width = 19 20 | Caption = 'r :=' 21 | ParentColor = False 22 | end 23 | object lGreen: TLabel[1] 24 | Left = 9 25 | Height = 13 26 | Top = 44 27 | Width = 21 28 | Caption = 'g :=' 29 | ParentColor = False 30 | end 31 | object lBlue: TLabel[2] 32 | Left = 9 33 | Height = 13 34 | Top = 76 35 | Width = 21 36 | Caption = 'b :=' 37 | ParentColor = False 38 | end 39 | object eRed: TEdit[3] 40 | Left = 40 41 | Height = 21 42 | Top = 8 43 | Width = 192 44 | OnChange = eChange 45 | TabOrder = 0 46 | end 47 | object eGreen: TEdit[4] 48 | Left = 40 49 | Height = 21 50 | Top = 40 51 | Width = 192 52 | OnChange = eChange 53 | TabOrder = 1 54 | end 55 | object eBlue: TEdit[5] 56 | Left = 40 57 | Height = 21 58 | Top = 72 59 | Width = 192 60 | OnChange = eChange 61 | TabOrder = 2 62 | end 63 | object cbPreview: TCheckBox[6] 64 | Left = 8 65 | Height = 19 66 | Top = 157 67 | Width = 20 68 | OnClick = cbPreviewClick 69 | TabOrder = 5 70 | end 71 | object bOK: TButton[7] 72 | Left = 240 73 | Height = 25 74 | Top = 40 75 | Width = 75 76 | Default = True 77 | ModalResult = 1 78 | TabOrder = 6 79 | end 80 | object bCancel: TButton[8] 81 | Left = 240 82 | Height = 25 83 | Top = 72 84 | Width = 75 85 | ModalResult = 2 86 | TabOrder = 7 87 | end 88 | object bReset: TButton[9] 89 | Left = 240 90 | Height = 25 91 | Top = 8 92 | Width = 75 93 | OnClick = bResetClick 94 | TabOrder = 8 95 | end 96 | object cbRange: TComboBox[10] 97 | Left = 9 98 | Height = 21 99 | Top = 128 100 | Width = 167 101 | ItemHeight = 13 102 | ItemIndex = 0 103 | Items.Strings = ( 104 | 'RGBA: 0..1 (center=0.5)' 105 | 'RGBA: -1..1 (center=0)' 106 | 'RGBA: 0..255 (center=128)' 107 | 'RGBA: 0..100 (center=50)' 108 | ) 109 | OnChange = eChange 110 | Style = csDropDownList 111 | TabOrder = 4 112 | Text = 'RGBA: 0..1 (center=0.5)' 113 | end 114 | object lAlpha: TLabel[11] 115 | Left = 9 116 | Height = 13 117 | Top = 104 118 | Width = 21 119 | Caption = 'a :=' 120 | ParentColor = False 121 | end 122 | object eAlpha: TEdit[12] 123 | Left = 40 124 | Height = 21 125 | Top = 100 126 | Width = 192 127 | OnChange = eChange 128 | TabOrder = 3 129 | end 130 | object bHelp: TButton[13] 131 | Left = 240 132 | Height = 25 133 | Top = 104 134 | Width = 75 135 | OnClick = bHelpClick 136 | TabOrder = 9 137 | end 138 | end 139 | -------------------------------------------------------------------------------- /dlgGlow.lfm: -------------------------------------------------------------------------------- 1 | inherited frmGlow: TfrmGlow 2 | Left = 235 3 | Height = 225 4 | Top = 169 5 | Width = 241 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 225 8 | ClientWidth = 241 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnHide = FormHide 14 | OnShow = FormShow 15 | Position = poScreenCenter 16 | object alIntensity: TAdjustLabel[0] 17 | Left = 8 18 | Height = 1 19 | Top = 76 20 | Width = 1 21 | ParentColor = False 22 | AttachedEdit = neIntensity 23 | end 24 | object lColor: TLabel[1] 25 | Left = 8 26 | Height = 1 27 | Top = 44 28 | Width = 1 29 | ParentColor = False 30 | end 31 | object sColor: TShape[2] 32 | Cursor = crHandPoint 33 | Left = 96 34 | Height = 25 35 | Top = 40 36 | Width = 57 37 | Brush.Color = clBlack 38 | OnMouseDown = sColorMouseDown 39 | end 40 | object alRadius: TAdjustLabel[3] 41 | Left = 8 42 | Height = 1 43 | Top = 12 44 | Width = 1 45 | ParentColor = False 46 | AttachedEdit = neRadius 47 | end 48 | object neIntensity: TNumberEdit[4] 49 | Left = 96 50 | Height = 21 51 | Top = 72 52 | Width = 57 53 | OnChange = ObjectChange 54 | TabOrder = 0 55 | Text = '1' 56 | Min = 1 57 | Max = 400 58 | Increment = 1 59 | end 60 | object bOK: TButton[5] 61 | Left = 160 62 | Height = 25 63 | Top = 112 64 | Width = 75 65 | Default = True 66 | ModalResult = 1 67 | TabOrder = 1 68 | end 69 | object bCancel: TButton[6] 70 | Left = 160 71 | Height = 25 72 | Top = 144 73 | Width = 75 74 | Cancel = True 75 | ModalResult = 2 76 | TabOrder = 2 77 | end 78 | object neRadius: TNumberEdit[7] 79 | Left = 96 80 | Height = 21 81 | Top = 8 82 | Width = 57 83 | OnChange = ObjectChange 84 | TabOrder = 3 85 | Text = '0' 86 | Min = 0 87 | Max = 50 88 | Increment = 0.25 89 | end 90 | object bReset: TButton[8] 91 | Left = 160 92 | Height = 25 93 | Top = 8 94 | Width = 75 95 | OnClick = bResetClick 96 | TabOrder = 4 97 | end 98 | object gbKind: TGroupBox[9] 99 | Left = 8 100 | Height = 65 101 | Top = 104 102 | Width = 145 103 | ClientHeight = 47 104 | ClientWidth = 141 105 | TabOrder = 5 106 | object cbInnerGlow: TCheckBox 107 | Left = 8 108 | Height = 19 109 | Top = 0 110 | Width = 20 111 | OnClick = ObjectChange 112 | TabOrder = 0 113 | end 114 | object cbOuterGlow: TCheckBox 115 | Left = 8 116 | Height = 19 117 | Top = 24 118 | Width = 20 119 | OnClick = ObjectChange 120 | TabOrder = 1 121 | end 122 | end 123 | object cbPreview: TCheckBox[10] 124 | Left = 8 125 | Height = 19 126 | Top = 200 127 | Width = 20 128 | OnClick = cbPreviewClick 129 | TabOrder = 6 130 | end 131 | object cbToric: TCheckBox[11] 132 | Left = 8 133 | Height = 19 134 | Top = 176 135 | Width = 20 136 | OnClick = ObjectChange 137 | TabOrder = 7 138 | end 139 | end 140 | -------------------------------------------------------------------------------- /dlgHueSaturation.lfm: -------------------------------------------------------------------------------- 1 | inherited frmHueSaturation: TfrmHueSaturation 2 | Left = 345 3 | Height = 137 4 | Top = 285 5 | Width = 273 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 137 8 | ClientWidth = 273 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnDestroy = FormDestroy 14 | OnShow = FormShow 15 | Position = poScreenCenter 16 | object alHue: TAdjustLabel[0] 17 | Left = 8 18 | Height = 1 19 | Top = 12 20 | Width = 1 21 | ParentColor = False 22 | AttachedEdit = neHue 23 | end 24 | object alSat: TAdjustLabel[1] 25 | Left = 8 26 | Height = 1 27 | Top = 60 28 | Width = 1 29 | ParentColor = False 30 | AttachedEdit = neSat 31 | end 32 | object sbHue: TPaintScrollBar[2] 33 | Left = 8 34 | Height = 17 35 | Top = 32 36 | Width = 257 37 | MinValue = -50 38 | MaxValue = 50 39 | Position = 0 40 | OnChange = sbChange 41 | OnPaint = sbHuePaint 42 | end 43 | object sbSat: TPaintScrollBar[3] 44 | Left = 8 45 | Height = 17 46 | Top = 80 47 | Width = 257 48 | MinValue = -10 49 | MaxValue = 10 50 | Position = 0 51 | OnChange = sbChange 52 | OnPaint = sbSatPaint 53 | end 54 | object neHue: TNumberEdit[4] 55 | Left = 120 56 | Height = 21 57 | Top = 8 58 | Width = 49 59 | OnChange = neChange 60 | TabOrder = 2 61 | Text = '0' 62 | Min = -50 63 | Max = 50 64 | Increment = 1 65 | end 66 | object neSat: TNumberEdit[5] 67 | Left = 120 68 | Height = 21 69 | Top = 56 70 | Width = 49 71 | OnChange = neChange 72 | TabOrder = 3 73 | Text = '0' 74 | Min = -10 75 | Max = 10 76 | Increment = 1 77 | end 78 | object bOK: TButton[6] 79 | Left = 112 80 | Height = 25 81 | Top = 104 82 | Width = 75 83 | Default = True 84 | ModalResult = 1 85 | TabOrder = 4 86 | end 87 | object bCancel: TButton[7] 88 | Left = 192 89 | Height = 25 90 | Top = 104 91 | Width = 75 92 | Cancel = True 93 | ModalResult = 2 94 | TabOrder = 5 95 | end 96 | object bReset: TButton[8] 97 | Left = 8 98 | Height = 25 99 | Top = 104 100 | Width = 75 101 | OnClick = bResetClick 102 | TabOrder = 6 103 | end 104 | end 105 | -------------------------------------------------------------------------------- /dlgLanguage.lfm: -------------------------------------------------------------------------------- 1 | object frmLanguage: TfrmLanguage 2 | Left = 292 3 | Height = 473 4 | Top = 204 5 | Width = 481 6 | BorderStyle = bsSizeToolWin 7 | ClientHeight = 473 8 | ClientWidth = 481 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | Position = poScreenCenter 14 | LCLVersion = '1.1' 15 | object lLangPack: TLabel 16 | Left = 8 17 | Height = 13 18 | Top = 12 19 | Width = 3 20 | Caption = ' ' 21 | ParentColor = False 22 | end 23 | object bOK: TButton 24 | Left = 320 25 | Height = 25 26 | Top = 440 27 | Width = 75 28 | Anchors = [akRight, akBottom] 29 | Default = True 30 | ModalResult = 1 31 | TabOrder = 0 32 | end 33 | object bCancel: TButton 34 | Left = 400 35 | Height = 25 36 | Top = 440 37 | Width = 75 38 | Anchors = [akRight, akBottom] 39 | Cancel = True 40 | ModalResult = 2 41 | TabOrder = 1 42 | end 43 | object lb: TListBox 44 | Left = 8 45 | Height = 400 46 | Top = 32 47 | Width = 464 48 | Anchors = [akTop, akLeft, akRight, akBottom] 49 | Columns = 2 50 | ItemHeight = 22 51 | OnDblClick = lbDblClick 52 | OnDrawItem = lbDrawItem 53 | Style = lbOwnerDrawFixed 54 | TabOrder = 2 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /dlgLayerProp.lfm: -------------------------------------------------------------------------------- 1 | object frmLayerProp: TfrmLayerProp 2 | Left = 312 3 | Height = 105 4 | Top = 172 5 | Width = 385 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 105 8 | ClientWidth = 385 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnDestroy = FormDestroy 14 | OnShow = FormShow 15 | Position = poScreenCenter 16 | LCLVersion = '1.1' 17 | object lName: TLabel 18 | Left = 8 19 | Height = 1 20 | Top = 12 21 | Width = 1 22 | ParentColor = False 23 | end 24 | object alOpacity: TAdjustLabel 25 | Left = 8 26 | Height = 1 27 | Top = 44 28 | Width = 1 29 | ParentColor = False 30 | AttachedEdit = neOpacity 31 | end 32 | object lBlendMode: TLabel 33 | Left = 120 34 | Height = 1 35 | Top = 44 36 | Width = 1 37 | ParentColor = False 38 | end 39 | object eName: TEdit 40 | Left = 64 41 | Height = 21 42 | Top = 8 43 | Width = 209 44 | OnChange = eNameChange 45 | TabOrder = 0 46 | end 47 | object cbVisible: TCheckBox 48 | Left = 280 49 | Height = 19 50 | Top = 12 51 | Width = 20 52 | OnClick = cbVisibleClick 53 | TabOrder = 1 54 | end 55 | object neOpacity: TNumberEdit 56 | Left = 64 57 | Height = 21 58 | Top = 40 59 | Width = 49 60 | OnChange = neOpacityChange 61 | TabOrder = 2 62 | Text = '0' 63 | Min = 0 64 | Max = 255 65 | Increment = 1 66 | end 67 | object cbBlendMode: TComboBox 68 | Left = 224 69 | Height = 21 70 | Top = 40 71 | Width = 153 72 | DropDownCount = 50 73 | ItemHeight = 13 74 | ItemIndex = 0 75 | Items.Strings = ( 76 | '-' 77 | '-' 78 | '-' 79 | ) 80 | OnChange = cbBlendModeChange 81 | Style = csDropDownList 82 | TabOrder = 3 83 | Text = '-' 84 | end 85 | object bOk: TButton 86 | Left = 224 87 | Height = 25 88 | Top = 72 89 | Width = 75 90 | Default = True 91 | ModalResult = 1 92 | TabOrder = 4 93 | end 94 | object bCancel: TButton 95 | Left = 304 96 | Height = 25 97 | Top = 72 98 | Width = 75 99 | Cancel = True 100 | ModalResult = 2 101 | TabOrder = 5 102 | end 103 | end 104 | -------------------------------------------------------------------------------- /dlgLayers.lfm: -------------------------------------------------------------------------------- 1 | object LayersFrame: TLayersFrame 2 | Left = 0 3 | Height = 188 4 | Top = 0 5 | Width = 200 6 | ClientHeight = 188 7 | ClientWidth = 200 8 | LCLVersion = '1.1' 9 | TabOrder = 0 10 | DesignLeft = 277 11 | DesignTop = 275 12 | object pToolbar: TPanel 13 | Left = 0 14 | Height = 25 15 | Top = 0 16 | Width = 200 17 | Align = alTop 18 | BevelOuter = bvNone 19 | ClientHeight = 25 20 | ClientWidth = 200 21 | TabOrder = 0 22 | OnMouseMove = FormMouseMove 23 | object sbNew: TSpeedButton 24 | Left = 0 25 | Height = 24 26 | Top = 0 27 | Width = 24 28 | Flat = True 29 | OnClick = sbNewClick 30 | OnMouseMove = ControlMouseMove 31 | ShowHint = True 32 | ParentShowHint = False 33 | end 34 | object sbDelete: TSpeedButton 35 | Left = 24 36 | Height = 24 37 | Top = 0 38 | Width = 24 39 | Flat = True 40 | OnClick = sbDeleteClick 41 | OnMouseMove = ControlMouseMove 42 | ShowHint = True 43 | ParentShowHint = False 44 | end 45 | object sbProp: TSpeedButton 46 | Left = 48 47 | Height = 24 48 | Top = 0 49 | Width = 24 50 | Flat = True 51 | OnClick = sbPropClick 52 | OnMouseMove = ControlMouseMove 53 | ShowHint = True 54 | ParentShowHint = False 55 | end 56 | object sbMergeSelected: TSpeedButton 57 | Left = 72 58 | Height = 24 59 | Top = 0 60 | Width = 24 61 | Flat = True 62 | OnClick = sbMergeSelectedClick 63 | OnMouseMove = ControlMouseMove 64 | ShowHint = True 65 | ParentShowHint = False 66 | end 67 | end 68 | object lb: TgfListBox 69 | Left = 0 70 | Height = 163 71 | Top = 25 72 | Width = 200 73 | CanDragItems = True 74 | MultiSelect = True 75 | ItemHeight = 48 76 | OnGetCount = lbGetCount 77 | OnItemGetSelected = lbItemGetSelected 78 | OnItemMouseDown = lbItemMouseDown 79 | OnItemPaint = lbItemPaint 80 | OnItemSetSelected = lbItemSetSelected 81 | OnItemDragDrop = lbItemDragDrop 82 | OnListDblClick = lbListDblClick 83 | OnListMouseMove = ControlMouseMove 84 | Align = alClient 85 | Color = clWhite 86 | ParentColor = False 87 | ParentShowHint = False 88 | PopupMenu = pmLayers 89 | ShowHint = True 90 | OnKeyDown = lbKeyDown 91 | end 92 | object pmLayers: TPopupMenu 93 | OnPopup = pmLayersPopup 94 | left = 120 95 | top = 16 96 | end 97 | end 98 | -------------------------------------------------------------------------------- /dlgLib.lfm: -------------------------------------------------------------------------------- 1 | object LibraryFrame: TLibraryFrame 2 | Left = 279 3 | Height = 470 4 | Top = 199 5 | Width = 607 6 | Align = alClient 7 | ClientHeight = 470 8 | ClientWidth = 607 9 | OnMouseMove = FormMouseMove 10 | LCLVersion = '1.1' 11 | object pToolbar: TPanel 12 | Left = 0 13 | Height = 26 14 | Top = 0 15 | Width = 607 16 | Align = alTop 17 | BevelOuter = bvNone 18 | ClientHeight = 26 19 | ClientWidth = 607 20 | Color = clForm 21 | ParentColor = False 22 | TabOrder = 0 23 | OnMouseMove = FormMouseMove 24 | object sbAdd: TSpeedButton 25 | Left = 32 26 | Height = 24 27 | Top = 0 28 | Width = 24 29 | Flat = True 30 | OnClick = sbAddClick 31 | OnMouseMove = ControlMouseMove 32 | ShowHint = True 33 | ParentShowHint = False 34 | end 35 | object sbRemove: TSpeedButton 36 | Left = 56 37 | Height = 24 38 | Top = 0 39 | Width = 24 40 | Flat = True 41 | OnClick = sbRemoveClick 42 | OnMouseMove = ControlMouseMove 43 | ShowHint = True 44 | ParentShowHint = False 45 | end 46 | object sbReplace: TSpeedButton 47 | Left = 80 48 | Height = 24 49 | Top = 0 50 | Width = 24 51 | Flat = True 52 | OnClick = sbReplaceClick 53 | OnMouseMove = ControlMouseMove 54 | ShowHint = True 55 | ParentShowHint = False 56 | end 57 | object sbProperties: TSpeedButton 58 | Left = 112 59 | Height = 24 60 | Top = 0 61 | Width = 24 62 | Flat = True 63 | OnClick = sbPropertiesClick 64 | OnMouseMove = ControlMouseMove 65 | ShowHint = True 66 | ParentShowHint = False 67 | end 68 | object sbExtractEdit: TSpeedButton 69 | Left = 136 70 | Height = 24 71 | Top = 0 72 | Width = 24 73 | Flat = True 74 | OnClick = sbExtractEditClick 75 | OnMouseMove = ControlMouseMove 76 | ShowHint = True 77 | ParentShowHint = False 78 | end 79 | object Bevel1: TBevel 80 | Left = 108 81 | Height = 20 82 | Top = 2 83 | Width = 4 84 | Shape = bsLeftLine 85 | end 86 | object sbExtractSave: TSpeedButton 87 | Left = 160 88 | Height = 24 89 | Top = 0 90 | Width = 24 91 | Flat = True 92 | OnClick = sbExtractSaveClick 93 | OnMouseMove = ControlMouseMove 94 | ShowHint = True 95 | ParentShowHint = False 96 | end 97 | object sbSave: TSpeedButton 98 | Left = 0 99 | Height = 24 100 | Top = 0 101 | Width = 24 102 | Flat = True 103 | OnClick = sbSaveClick 104 | OnMouseMove = ControlMouseMove 105 | ShowHint = True 106 | ParentShowHint = False 107 | end 108 | object Bevel2: TBevel 109 | Left = 28 110 | Height = 20 111 | Top = 2 112 | Width = 4 113 | Shape = bsLeftLine 114 | end 115 | end 116 | object lb: TgfListBox 117 | Left = 0 118 | Height = 444 119 | Top = 26 120 | Width = 607 121 | MultiSelect = True 122 | Layout = lbloHorizontal 123 | ItemWidth = 100 124 | ItemHeight = 100 125 | OnGetCount = lbGetCount 126 | OnItemGetSelected = lbItemGetSelected 127 | OnItemPaint = lbItemPaint 128 | OnItemSetSelected = lbItemSetSelected 129 | OnListDblClick = lbListDblClick 130 | OnListMouseMove = lbListMouseMove 131 | Align = alClient 132 | Color = clWhite 133 | ParentColor = False 134 | OnKeyDown = lbKeyDown 135 | OnResize = lbResize 136 | end 137 | end 138 | -------------------------------------------------------------------------------- /dlgMatte.lfm: -------------------------------------------------------------------------------- 1 | inherited frmRemoveMatte: TfrmRemoveMatte 2 | Left = 348 3 | Height = 114 4 | Top = 343 5 | Width = 201 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 114 8 | ClientWidth = 201 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | object lMatteColor: TLabel[0] 16 | Left = 8 17 | Height = 1 18 | Top = 12 19 | Width = 1 20 | ParentColor = False 21 | end 22 | object sMatte: TShape[1] 23 | Cursor = crHandPoint 24 | Left = 80 25 | Height = 25 26 | Top = 8 27 | Width = 65 28 | OnMouseDown = sMatteMouseDown 29 | end 30 | object bWhiteMatte: TButton[2] 31 | Left = 8 32 | Height = 25 33 | Top = 48 34 | Width = 89 35 | OnClick = bWhiteMatteClick 36 | TabOrder = 0 37 | end 38 | object bBlackMatte: TButton[3] 39 | Left = 8 40 | Height = 25 41 | Top = 80 42 | Width = 89 43 | OnClick = bBlackMatteClick 44 | TabOrder = 1 45 | end 46 | object bOK: TButton[4] 47 | Left = 120 48 | Height = 25 49 | Top = 48 50 | Width = 75 51 | Default = True 52 | ModalResult = 1 53 | TabOrder = 2 54 | end 55 | object bCancel: TButton[5] 56 | Left = 120 57 | Height = 25 58 | Top = 80 59 | Width = 75 60 | Cancel = True 61 | ModalResult = 2 62 | TabOrder = 3 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /dlgMatte.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | unit dlgMatte; 19 | 20 | interface 21 | 22 | uses 23 | LclIntf, LclType, 24 | SysUtils, Variants, Classes, Graphics, Controls, Forms, 25 | Dialogs, StdCtrls, ExtCtrls, DocClass, BitmapEx, Filters, 26 | ieShared, FilterDialog; 27 | 28 | type 29 | 30 | { TfrmRemoveMatte } 31 | 32 | TfrmRemoveMatte = class(TFilterDialog) 33 | lMatteColor: TLabel; 34 | sMatte: TShape; 35 | bWhiteMatte: TButton; 36 | bBlackMatte: TButton; 37 | bOK: TButton; 38 | bCancel: TButton; 39 | procedure FormCreate(Sender: TObject); 40 | procedure sMatteMouseDown(Sender: TObject; Button: TMouseButton; 41 | Shift: TShiftState; X, Y: Integer); 42 | procedure bWhiteMatteClick(Sender: TObject); 43 | procedure bBlackMatteClick(Sender: TObject); 44 | procedure FormShow(Sender: TObject); 45 | private 46 | { Private declarations } 47 | public 48 | procedure ApplyLanguagePack; 49 | procedure FillInfo; override; 50 | procedure DoFilter(bm: TBitmap32; Mask: TBitmap1); override; 51 | end; 52 | 53 | var 54 | frmRemoveMatte: TfrmRemoveMatte; 55 | 56 | implementation 57 | 58 | {$R *.lfm} 59 | 60 | uses LangPack; 61 | 62 | procedure TfrmRemoveMatte.FillInfo; 63 | begin 64 | inherited; 65 | UndoText := 'MI_FLT_REMOVE_MATTE'; 66 | end; 67 | 68 | procedure TfrmRemoveMatte.DoFilter(bm: TBitmap32; Mask: TBitmap1); 69 | begin 70 | fltRemoveMatte(bm, Mask, sMatte.Brush.Color); 71 | end; 72 | 73 | procedure TfrmRemoveMatte.sMatteMouseDown(Sender: TObject; Button: TMouseButton; 74 | Shift: TShiftState; X, Y: Integer); 75 | var 76 | Value: TColor; 77 | 78 | begin 79 | Value := GFIEPickColor(sMatte.Brush.Color); 80 | if Value <> sMatte.Brush.Color then 81 | begin 82 | sMatte.Brush.Color := Value; 83 | InvokeEffect; 84 | end; 85 | end; 86 | 87 | procedure TfrmRemoveMatte.FormCreate(Sender: TObject); 88 | begin 89 | ApplyLanguagePack; 90 | end; 91 | 92 | procedure TfrmRemoveMatte.bWhiteMatteClick(Sender: TObject); 93 | begin 94 | sMatte.Brush.Color := clWhite; 95 | InvokeEffect; 96 | end; 97 | 98 | procedure TfrmRemoveMatte.bBlackMatteClick(Sender: TObject); 99 | begin 100 | sMatte.Brush.Color := clBlack; 101 | InvokeEffect; 102 | end; 103 | 104 | procedure TfrmRemoveMatte.FormShow(Sender: TObject); 105 | begin 106 | // move form to screen center only the first time 107 | Position := poDesigned; 108 | 109 | InvokeEffect; 110 | end; 111 | 112 | procedure TfrmRemoveMatte.ApplyLanguagePack; 113 | begin 114 | Caption := lpGet('MI_FLT_REMOVE_MATTE'); 115 | lMatteColor.Caption := lpGet('LABEL_MATTE_COLOR')+':'; 116 | bWhiteMatte.Caption := lpGet('LABEL_WHITE_MATTE'); 117 | bBlackMatte.Caption := lpGet('LABEL_BLACK_MATTE'); 118 | bOK.Caption := lpGet('B_OK'); 119 | bCancel.Caption := lpGet('B_CANCEL'); 120 | end; 121 | 122 | end. 123 | -------------------------------------------------------------------------------- /dlgMetadata.lfm: -------------------------------------------------------------------------------- 1 | object frmMetadata: TfrmMetadata 2 | Left = 251 3 | Height = 338 4 | Top = 251 5 | Width = 474 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 338 8 | ClientWidth = 474 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | LCLVersion = '1.1' 16 | object gbSummary: TGroupBox 17 | Left = 8 18 | Height = 201 19 | Top = 8 20 | Width = 457 21 | ClientHeight = 183 22 | ClientWidth = 453 23 | TabOrder = 0 24 | object lTitle: TLabel 25 | Left = 8 26 | Height = 1 27 | Top = 4 28 | Width = 1 29 | ParentColor = False 30 | end 31 | object lAuthor: TLabel 32 | Left = 8 33 | Height = 1 34 | Top = 28 35 | Width = 1 36 | ParentColor = False 37 | end 38 | object lCopyright: TLabel 39 | Left = 8 40 | Height = 1 41 | Top = 52 42 | Width = 1 43 | ParentColor = False 44 | end 45 | object lComments: TLabel 46 | Left = 8 47 | Height = 1 48 | Top = 80 49 | Width = 1 50 | ParentColor = False 51 | end 52 | object eTitle: TEdit 53 | Left = 104 54 | Height = 21 55 | Top = 0 56 | Width = 345 57 | TabOrder = 0 58 | end 59 | object eAuthor: TEdit 60 | Left = 104 61 | Height = 21 62 | Top = 24 63 | Width = 345 64 | TabOrder = 1 65 | end 66 | object eCopyright: TEdit 67 | Left = 104 68 | Height = 21 69 | Top = 48 70 | Width = 345 71 | TabOrder = 2 72 | end 73 | object mComments: TMemo 74 | Left = 104 75 | Height = 97 76 | Top = 72 77 | Width = 345 78 | ScrollBars = ssBoth 79 | TabOrder = 3 80 | WordWrap = False 81 | end 82 | end 83 | object bOK: TButton 84 | Left = 302 85 | Height = 25 86 | Top = 304 87 | Width = 75 88 | Default = True 89 | ModalResult = 1 90 | TabOrder = 1 91 | end 92 | object bCancel: TButton 93 | Left = 390 94 | Height = 25 95 | Top = 304 96 | Width = 75 97 | Cancel = True 98 | ModalResult = 2 99 | TabOrder = 2 100 | end 101 | object gbGIF: TGroupBox 102 | Left = 8 103 | Height = 49 104 | Top = 216 105 | Width = 456 106 | ClientHeight = 31 107 | ClientWidth = 452 108 | TabOrder = 3 109 | OnClick = gbGIFClick 110 | object alLoopCount: TAdjustLabel 111 | Left = 8 112 | Height = 1 113 | Top = 4 114 | Width = 1 115 | ParentColor = False 116 | AttachedEdit = neLoopCount 117 | end 118 | object neLoopCount: TNumberEdit 119 | Left = 358 120 | Height = 21 121 | Top = 0 122 | Width = 91 123 | TabOrder = 0 124 | Text = '0' 125 | Min = 0 126 | Max = 65535 127 | Increment = 1 128 | end 129 | end 130 | object neDPI: TNumberEdit 131 | Left = 368 132 | Height = 21 133 | Top = 272 134 | Width = 97 135 | TabOrder = 4 136 | Text = '0' 137 | Min = 0 138 | Max = 65535 139 | Increment = 1 140 | end 141 | object alDPI: TAdjustLabel 142 | Left = 8 143 | Height = 13 144 | Top = 276 145 | Width = 3 146 | Caption = ' ' 147 | ParentColor = False 148 | AttachedEdit = neDPI 149 | end 150 | end 151 | -------------------------------------------------------------------------------- /dlgMetadata.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | unit dlgMetadata; 19 | 20 | interface 21 | 22 | uses 23 | LclIntf, LclType, 24 | SysUtils, Variants, Classes, Graphics, Controls, Forms, 25 | Dialogs, StdCtrls, dlgDoc, NumberEdit, AdjustControl; 26 | 27 | type 28 | 29 | { TfrmMetadata } 30 | 31 | TfrmMetadata = class(TForm) 32 | alDPI: TAdjustLabel; 33 | gbSummary: TGroupBox; 34 | lTitle: TLabel; 35 | lAuthor: TLabel; 36 | lCopyright: TLabel; 37 | lComments: TLabel; 38 | eTitle: TEdit; 39 | eAuthor: TEdit; 40 | eCopyright: TEdit; 41 | mComments: TMemo; 42 | bOK: TButton; 43 | bCancel: TButton; 44 | gbGIF: TGroupBox; 45 | alLoopCount: TAdjustLabel; 46 | neLoopCount: TNumberEdit; 47 | neDPI: TNumberEdit; 48 | procedure FormCreate(Sender: TObject); 49 | procedure FormShow(Sender: TObject); 50 | procedure gbGIFClick(Sender: TObject); 51 | private 52 | { Private declarations } 53 | public 54 | procedure ApplyLanguagePack; 55 | procedure Execute(frmDoc: TGraphicFrame); 56 | end; 57 | 58 | var 59 | frmMetadata: TfrmMetadata; 60 | 61 | implementation 62 | 63 | {$R *.lfm} 64 | 65 | uses LangPack; 66 | 67 | procedure TfrmMetadata.gbGIFClick(Sender: TObject); 68 | begin 69 | 70 | end; 71 | 72 | procedure TfrmMetadata.FormCreate(Sender: TObject); 73 | begin 74 | ApplyLanguagePack; 75 | end; 76 | 77 | procedure TfrmMetadata.FormShow(Sender: TObject); 78 | begin 79 | // move form to screen center only the first time 80 | Position := poDesigned; 81 | end; 82 | 83 | procedure TfrmMetadata.ApplyLanguagePack; 84 | begin 85 | Caption := lpGet('MI_FILE_METADATA'); 86 | 87 | gbSummary.Caption := Format(lpGet('MD_TYPE'), ['GFIE/ANI/TIFF']); 88 | lTitle.Caption := lpGet('MD_TITLE')+':'; 89 | lAuthor.Caption := lpGet('MD_AUTHOR')+':'; 90 | lCopyright.Caption := lpGet('MD_COPYRIGHT')+':'; 91 | lComments.Caption := lpGet('MD_COMMENTS')+':'; 92 | 93 | gbGIF.Caption := Format(lpGet('MD_TYPE'), ['GIF']); 94 | alLoopCount.Caption := lpGet('MD_LOOP_COUNT')+':'; 95 | alDPI.Caption := lpGet('MD_DPI')+':'; 96 | 97 | bOK.Caption := lpGet('B_OK'); 98 | bCancel.Caption := lpGet('B_CANCEL'); 99 | end; 100 | 101 | procedure TfrmMetadata.Execute(frmDoc: TGraphicFrame); 102 | begin 103 | with frmDoc.Doc.Metadata do 104 | begin 105 | eTitle.Text := Title; 106 | eAuthor.Text := Author; 107 | eCopyright.Text := Copyright; 108 | mComments.Text := Comments; 109 | neLoopCount.Value := LoopCount; 110 | neDPI.Value := DPI; 111 | 112 | if ShowModal = mrOk then 113 | begin 114 | Title := eTitle.Text; 115 | Author := eAuthor.Text; 116 | Copyright := eCopyright.Text; 117 | Comments := mComments.Text; 118 | LoopCount := Round(neLoopCount.Value); 119 | DPI := neDPI.Value; 120 | 121 | frmDoc.Modified := True; 122 | end; 123 | end; 124 | end; 125 | 126 | end. 127 | -------------------------------------------------------------------------------- /dlgOpacity.lfm: -------------------------------------------------------------------------------- 1 | inherited frmOpacity: TfrmOpacity 2 | Left = 449 3 | Height = 73 4 | Top = 353 5 | Width = 169 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 73 8 | ClientWidth = 169 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | object alOpacity: TAdjustLabel[0] 16 | Left = 8 17 | Height = 1 18 | Top = 12 19 | Width = 1 20 | ParentColor = False 21 | AttachedEdit = neOpacity 22 | end 23 | object bOK: TButton[1] 24 | Left = 8 25 | Height = 25 26 | Top = 40 27 | Width = 75 28 | Default = True 29 | ModalResult = 1 30 | TabOrder = 0 31 | end 32 | object bCancel: TButton[2] 33 | Left = 88 34 | Height = 25 35 | Top = 40 36 | Width = 75 37 | Cancel = True 38 | ModalResult = 2 39 | TabOrder = 1 40 | end 41 | object neOpacity: TNumberEdit[3] 42 | Left = 88 43 | Height = 21 44 | Top = 8 45 | Width = 73 46 | OnChange = neOpacityChange 47 | TabOrder = 2 48 | Text = '100' 49 | Min = 0 50 | Max = 300 51 | Increment = 1 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /dlgOpacity.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | unit dlgOpacity; 19 | 20 | interface 21 | 22 | uses 23 | LclIntf, LclType, 24 | SysUtils, Variants, Classes, Graphics, Controls, Forms, 25 | Dialogs, StdCtrls, AdjustControl, NumberEdit, 26 | Layers, DocClass, BitmapEx, Filters, FilterDialog; 27 | 28 | type 29 | 30 | { TfrmOpacity } 31 | 32 | TfrmOpacity = class(TFilterDialog) 33 | bOK: TButton; 34 | bCancel: TButton; 35 | neOpacity: TNumberEdit; 36 | alOpacity: TAdjustLabel; 37 | procedure FormCreate(Sender: TObject); 38 | procedure neOpacityChange(Sender: TObject); 39 | procedure FormShow(Sender: TObject); 40 | private 41 | { Private declarations } 42 | public 43 | procedure ApplyLanguagePack; 44 | procedure FillInfo; override; 45 | procedure DoFilter(bm: TBitmap32; Mask: TBitmap1); override; 46 | end; 47 | 48 | var 49 | frmOpacity: TfrmOpacity; 50 | 51 | implementation 52 | 53 | {$R *.lfm} 54 | 55 | uses LangPack; 56 | 57 | procedure TfrmOpacity.FillInfo; 58 | begin 59 | inherited; 60 | UndoText := 'MI_FLT_OPACITY'; 61 | end; 62 | 63 | procedure TfrmOpacity.DoFilter(bm: TBitmap32; Mask: TBitmap1); 64 | begin 65 | fltOpacity(bm, Mask, Round(neOpacity.Value * 2.56)); 66 | end; 67 | 68 | procedure TfrmOpacity.neOpacityChange(Sender: TObject); 69 | begin 70 | InvokeEffect; 71 | end; 72 | 73 | procedure TfrmOpacity.FormCreate(Sender: TObject); 74 | begin 75 | ApplyLanguagePack; 76 | end; 77 | 78 | procedure TfrmOpacity.FormShow(Sender: TObject); 79 | begin 80 | // move form to screen center only the first time 81 | Position := poDesigned; 82 | 83 | InvokeEffect; 84 | end; 85 | 86 | procedure TfrmOpacity.ApplyLanguagePack; 87 | begin 88 | Caption := lpGet('MI_FLT_OPACITY'); 89 | alOpacity.Caption := lpGet('LABEL_OPACITY')+':'; 90 | bOK.Caption := lpGet('B_OK'); 91 | bCancel.Caption := lpGet('B_CANCEL'); 92 | end; 93 | 94 | end. 95 | -------------------------------------------------------------------------------- /dlgPrint.lfm: -------------------------------------------------------------------------------- 1 | object frmPrint: TfrmPrint 2 | Left = 302 3 | Height = 177 4 | Top = 183 5 | Width = 306 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 177 8 | ClientWidth = 306 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | LCLVersion = '1.1' 16 | object alCopies: TAdjustLabel 17 | Left = 8 18 | Height = 1 19 | Top = 44 20 | Width = 1 21 | ParentColor = False 22 | AttachedEdit = neCopies 23 | end 24 | object alZoom: TAdjustLabel 25 | Left = 144 26 | Height = 1 27 | Top = 44 28 | Width = 1 29 | ParentColor = False 30 | AttachedEdit = neZoom 31 | end 32 | object lCaption: TLabel 33 | Left = 8 34 | Height = 1 35 | Top = 76 36 | Width = 1 37 | ParentColor = False 38 | end 39 | object bPrinterSetup: TButton 40 | Left = 8 41 | Height = 25 42 | Top = 8 43 | Width = 160 44 | OnClick = bPrinterSetupClick 45 | TabOrder = 0 46 | end 47 | object neCopies: TNumberEdit 48 | Left = 80 49 | Height = 21 50 | Top = 40 51 | Width = 57 52 | TabOrder = 1 53 | Text = '1' 54 | Min = 1 55 | Max = 100 56 | Increment = 1 57 | end 58 | object rgPages: TRadioGroup 59 | Left = 8 60 | Height = 65 61 | Top = 104 62 | Width = 160 63 | AutoFill = True 64 | ChildSizing.LeftRightSpacing = 6 65 | ChildSizing.EnlargeHorizontal = crsHomogenousChildResize 66 | ChildSizing.EnlargeVertical = crsHomogenousChildResize 67 | ChildSizing.ShrinkHorizontal = crsScaleChilds 68 | ChildSizing.ShrinkVertical = crsScaleChilds 69 | ChildSizing.Layout = cclLeftToRightThenTopToBottom 70 | ChildSizing.ControlsPerLine = 1 71 | TabOrder = 2 72 | end 73 | object neZoom: TNumberEdit 74 | Left = 240 75 | Height = 21 76 | Top = 40 77 | Width = 57 78 | TabOrder = 3 79 | Text = '100' 80 | Min = 10 81 | Max = 1000 82 | Increment = 1 83 | end 84 | object eCaption: TEdit 85 | Left = 80 86 | Height = 21 87 | Top = 72 88 | Width = 217 89 | TabOrder = 4 90 | end 91 | object bOk: TButton 92 | Left = 216 93 | Height = 25 94 | Top = 112 95 | Width = 75 96 | Default = True 97 | ModalResult = 1 98 | TabOrder = 5 99 | end 100 | object bCancel: TButton 101 | Left = 216 102 | Height = 25 103 | Top = 144 104 | Width = 75 105 | Cancel = True 106 | ModalResult = 2 107 | TabOrder = 6 108 | end 109 | object psd: TPrinterSetupDialog 110 | left = 200 111 | top = 8 112 | end 113 | end 114 | -------------------------------------------------------------------------------- /dlgRGBChannels.lfm: -------------------------------------------------------------------------------- 1 | inherited frmRGBChannels: TfrmRGBChannels 2 | Left = 345 3 | Height = 137 4 | Top = 301 5 | Width = 329 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 137 8 | ClientWidth = 329 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | object lRed: TLabel[0] 16 | Left = 8 17 | Height = 1 18 | Top = 12 19 | Width = 1 20 | ParentColor = False 21 | end 22 | object lGreen: TLabel[1] 23 | Left = 8 24 | Height = 1 25 | Top = 44 26 | Width = 1 27 | ParentColor = False 28 | end 29 | object lBlue: TLabel[2] 30 | Left = 8 31 | Height = 1 32 | Top = 76 33 | Width = 1 34 | ParentColor = False 35 | end 36 | object tbRed: TTrackBar[3] 37 | Left = 48 38 | Height = 25 39 | Top = 8 40 | Width = 217 41 | Min = -10 42 | OnChange = tbChange 43 | Position = 0 44 | TabOrder = 0 45 | end 46 | object neRed: TNumberEdit[4] 47 | Left = 272 48 | Height = 21 49 | Top = 8 50 | Width = 49 51 | OnChange = neChange 52 | TabOrder = 1 53 | Text = '0' 54 | Min = -1 55 | Max = 1 56 | Increment = 1 57 | end 58 | object tbGreen: TTrackBar[5] 59 | Left = 48 60 | Height = 25 61 | Top = 40 62 | Width = 217 63 | Min = -10 64 | OnChange = tbChange 65 | Position = 0 66 | TabOrder = 2 67 | end 68 | object neGreen: TNumberEdit[6] 69 | Left = 272 70 | Height = 21 71 | Top = 40 72 | Width = 49 73 | OnChange = neChange 74 | TabOrder = 3 75 | Text = '0' 76 | Min = -1 77 | Max = 1 78 | Increment = 1 79 | end 80 | object tbBlue: TTrackBar[7] 81 | Left = 48 82 | Height = 25 83 | Top = 72 84 | Width = 217 85 | Min = -10 86 | OnChange = tbChange 87 | Position = 0 88 | TabOrder = 4 89 | end 90 | object neBlue: TNumberEdit[8] 91 | Left = 272 92 | Height = 21 93 | Top = 72 94 | Width = 49 95 | OnChange = neChange 96 | TabOrder = 5 97 | Text = '0' 98 | Min = -1 99 | Max = 1 100 | Increment = 1 101 | end 102 | object bOK: TButton[9] 103 | Left = 168 104 | Height = 25 105 | Top = 104 106 | Width = 75 107 | Default = True 108 | ModalResult = 1 109 | TabOrder = 6 110 | end 111 | object bCancel: TButton[10] 112 | Left = 248 113 | Height = 25 114 | Top = 104 115 | Width = 75 116 | Cancel = True 117 | ModalResult = 2 118 | TabOrder = 7 119 | end 120 | object bReset: TButton[11] 121 | Left = 8 122 | Height = 25 123 | Top = 104 124 | Width = 75 125 | OnClick = bResetClick 126 | TabOrder = 8 127 | end 128 | end 129 | -------------------------------------------------------------------------------- /dlgResProp.lfm: -------------------------------------------------------------------------------- 1 | object frmResProp: TfrmResProp 2 | Left = 259 3 | Height = 138 4 | Top = 125 5 | Width = 361 6 | BorderIcons = [biSystemMenu, biMinimize] 7 | BorderStyle = bsToolWindow 8 | ClientHeight = 138 9 | ClientWidth = 361 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'Tahoma' 13 | OnCreate = FormCreate 14 | OnShow = FormShow 15 | Position = poScreenCenter 16 | LCLVersion = '1.1' 17 | object lName: TLabel 18 | Left = 8 19 | Height = 1 20 | Top = 44 21 | Width = 1 22 | ParentColor = False 23 | end 24 | object lLanguage: TLabel 25 | Left = 8 26 | Height = 1 27 | Top = 76 28 | Width = 1 29 | ParentColor = False 30 | end 31 | object eName: TEdit 32 | Left = 88 33 | Height = 21 34 | Top = 40 35 | Width = 265 36 | TabOrder = 0 37 | end 38 | object neLanguage: TNumberEdit 39 | Left = 296 40 | Height = 21 41 | Top = 72 42 | Width = 57 43 | OnChange = neLanguageChange 44 | ParentShowHint = False 45 | ShowHint = True 46 | TabOrder = 1 47 | Text = '0' 48 | Min = 0 49 | Max = 65535 50 | Increment = 1 51 | end 52 | object cbLanguage: TComboBox 53 | Left = 88 54 | Height = 21 55 | Top = 72 56 | Width = 201 57 | DropDownCount = 20 58 | ItemHeight = 13 59 | OnChange = cbLanguageChange 60 | Style = csDropDownList 61 | TabOrder = 2 62 | end 63 | object bOK: TButton 64 | Left = 200 65 | Height = 25 66 | Top = 106 67 | Width = 75 68 | Default = True 69 | ModalResult = 1 70 | TabOrder = 3 71 | end 72 | object bCancel: TButton 73 | Left = 280 74 | Height = 25 75 | Top = 106 76 | Width = 75 77 | Cancel = True 78 | ModalResult = 2 79 | TabOrder = 4 80 | end 81 | object lType: TLabel 82 | Left = 8 83 | Height = 13 84 | Top = 12 85 | Width = 28 86 | Caption = 'Type:' 87 | ParentColor = False 88 | end 89 | object cbType: TComboBox 90 | Left = 88 91 | Height = 21 92 | Top = 10 93 | Width = 263 94 | ItemHeight = 13 95 | Style = csDropDownList 96 | TabOrder = 5 97 | end 98 | end 99 | -------------------------------------------------------------------------------- /dlgSaveOptions.lfm: -------------------------------------------------------------------------------- 1 | object frmSaveOptions: TfrmSaveOptions 2 | Left = 355 3 | Height = 109 4 | Top = 338 5 | Width = 249 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 109 8 | ClientWidth = 249 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnDestroy = FormDestroy 14 | OnShow = FormShow 15 | Position = poScreenCenter 16 | LCLVersion = '1.1' 17 | object neQuality: TNumberEdit 18 | Left = 88 19 | Height = 21 20 | Top = 8 21 | Width = 74 22 | TabOrder = 0 23 | Text = '1' 24 | Min = 1 25 | Max = 100 26 | Increment = 1 27 | end 28 | object alQuality: TAdjustLabel 29 | Left = 8 30 | Height = 1 31 | Top = 12 32 | Width = 1 33 | ParentColor = False 34 | AttachedEdit = neQuality 35 | end 36 | object bOK: TButton 37 | Left = 8 38 | Height = 25 39 | Top = 56 40 | Width = 75 41 | Default = True 42 | ModalResult = 1 43 | TabOrder = 1 44 | end 45 | object bCancel: TButton 46 | Left = 88 47 | Height = 25 48 | Top = 56 49 | Width = 75 50 | Cancel = True 51 | ModalResult = 2 52 | TabOrder = 2 53 | end 54 | object bPreview: TButton 55 | Left = 168 56 | Height = 25 57 | Top = 8 58 | Width = 75 59 | OnClick = bPreviewClick 60 | TabOrder = 3 61 | end 62 | object cbLossless: TCheckBox 63 | Left = 6 64 | Height = 19 65 | Top = 32 66 | Width = 20 67 | TabOrder = 4 68 | end 69 | object lFileSize: TLabel 70 | Left = 9 71 | Height = 1 72 | Top = 88 73 | Width = 1 74 | ParentColor = False 75 | end 76 | end 77 | -------------------------------------------------------------------------------- /dlgShadow.lfm: -------------------------------------------------------------------------------- 1 | inherited frmShadow: TfrmShadow 2 | Left = 491 3 | Height = 217 4 | Top = 228 5 | Width = 242 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 217 8 | ClientWidth = 242 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnHide = FormHide 14 | OnShow = FormShow 15 | Position = poScreenCenter 16 | object alDistance: TAdjustLabel[0] 17 | Left = 8 18 | Height = 1 19 | Top = 12 20 | Width = 1 21 | ParentColor = False 22 | AttachedEdit = neDistance 23 | end 24 | object alIntensity: TAdjustLabel[1] 25 | Left = 8 26 | Height = 1 27 | Top = 140 28 | Width = 1 29 | ParentColor = False 30 | AttachedEdit = neIntensity 31 | end 32 | object lColor: TLabel[2] 33 | Left = 8 34 | Height = 1 35 | Top = 108 36 | Width = 1 37 | ParentColor = False 38 | end 39 | object sColor: TShape[3] 40 | Cursor = crHandPoint 41 | Left = 96 42 | Height = 25 43 | Top = 104 44 | Width = 57 45 | Brush.Color = clBlack 46 | OnMouseDown = sColorMouseDown 47 | end 48 | object alAngle: TAdjustLabel[4] 49 | Left = 8 50 | Height = 1 51 | Top = 44 52 | Width = 1 53 | ParentColor = False 54 | AttachedEdit = neAngle 55 | end 56 | object alBlur: TAdjustLabel[5] 57 | Left = 8 58 | Height = 1 59 | Top = 76 60 | Width = 1 61 | ParentColor = False 62 | AttachedEdit = neBlur 63 | end 64 | object neDistance: TNumberEdit[6] 65 | Left = 96 66 | Height = 21 67 | Top = 8 68 | Width = 57 69 | OnChange = ObjectChange 70 | TabOrder = 0 71 | Text = '1' 72 | Min = 1 73 | Max = 100 74 | Increment = 1 75 | end 76 | object neIntensity: TNumberEdit[7] 77 | Left = 96 78 | Height = 21 79 | Top = 136 80 | Width = 57 81 | OnChange = ObjectChange 82 | TabOrder = 1 83 | Text = '1' 84 | Min = 1 85 | Max = 100 86 | Increment = 1 87 | end 88 | object neAngle: TNumberEdit[8] 89 | Left = 96 90 | Height = 21 91 | Top = 40 92 | Width = 57 93 | OnChange = ObjectChange 94 | TabOrder = 2 95 | Text = '0' 96 | Min = -180 97 | Max = 180 98 | Increment = 1 99 | end 100 | object bOK: TButton[9] 101 | Left = 160 102 | Height = 25 103 | Top = 104 104 | Width = 75 105 | Default = True 106 | ModalResult = 1 107 | TabOrder = 3 108 | end 109 | object bCancel: TButton[10] 110 | Left = 160 111 | Height = 25 112 | Top = 136 113 | Width = 75 114 | Cancel = True 115 | ModalResult = 2 116 | TabOrder = 4 117 | end 118 | object bReset: TButton[11] 119 | Left = 160 120 | Height = 25 121 | Top = 8 122 | Width = 75 123 | OnClick = bResetClick 124 | TabOrder = 5 125 | end 126 | object neBlur: TNumberEdit[12] 127 | Left = 96 128 | Height = 21 129 | Top = 72 130 | Width = 57 131 | OnChange = ObjectChange 132 | TabOrder = 6 133 | Text = '0' 134 | Min = 0 135 | Max = 50 136 | Increment = 0.25 137 | end 138 | object cbPreview: TCheckBox[13] 139 | Left = 8 140 | Height = 19 141 | Top = 192 142 | Width = 20 143 | OnClick = cbPreviewClick 144 | TabOrder = 7 145 | end 146 | object cbToric: TCheckBox[14] 147 | Left = 8 148 | Height = 19 149 | Top = 168 150 | Width = 20 151 | OnClick = ObjectChange 152 | TabOrder = 8 153 | end 154 | end 155 | -------------------------------------------------------------------------------- /dlgSplash.lfm: -------------------------------------------------------------------------------- 1 | object frmSplash: TfrmSplash 2 | Left = 514 3 | Height = 149 4 | Top = 380 5 | Width = 251 6 | AlphaBlend = True 7 | BorderStyle = bsNone 8 | ClientHeight = 149 9 | ClientWidth = 251 10 | Color = clWhite 11 | Font.Color = clWindowText 12 | Font.Height = -11 13 | Font.Name = 'Tahoma' 14 | FormStyle = fsStayOnTop 15 | OnClose = FormClose 16 | OnCreate = FormCreate 17 | OnDestroy = FormDestroy 18 | Position = poScreenCenter 19 | LCLVersion = '0.9.30.2' 20 | Visible = True 21 | object imSplash: TImage 22 | Left = 0 23 | Height = 149 24 | Top = 0 25 | Width = 251 26 | Align = alClient 27 | OnMouseDown = imSplashMouseDown 28 | end 29 | object tmFadeOut: TTimer 30 | Enabled = False 31 | Interval = 40 32 | OnTimer = tmFadeOutTimer 33 | left = 184 34 | top = 8 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /dlgSvgOpenOptions.lfm: -------------------------------------------------------------------------------- 1 | object frmSvgOpenOptions: TfrmSvgOpenOptions 2 | Left = 466 3 | Height = 146 4 | Top = 403 5 | Width = 247 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 146 8 | ClientWidth = 247 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnShow = FormShow 14 | Position = poScreenCenter 15 | LCLVersion = '1.1' 16 | object neScale: TNumberEdit 17 | Left = 136 18 | Height = 21 19 | Top = 32 20 | Width = 74 21 | OnChange = neScaleChange 22 | TabOrder = 0 23 | Text = '1' 24 | Min = 1E-12 25 | Max = 1000000 26 | Increment = 0.1 27 | end 28 | object alScale: TAdjustLabel 29 | Left = 8 30 | Height = 13 31 | Top = 36 32 | Width = 61 33 | Caption = 'Scale factor:' 34 | ParentColor = False 35 | AttachedEdit = neScale 36 | end 37 | object bOK: TButton 38 | Left = 9 39 | Height = 25 40 | Top = 112 41 | Width = 75 42 | Cancel = True 43 | Default = True 44 | ModalResult = 1 45 | TabOrder = 1 46 | end 47 | object neWidth: TNumberEdit 48 | Left = 136 49 | Height = 21 50 | Top = 56 51 | Width = 74 52 | OnChange = neWidthChange 53 | TabOrder = 2 54 | Text = '1' 55 | Min = 1 56 | Max = 20000 57 | Increment = 1 58 | end 59 | object alWidth: TAdjustLabel 60 | Left = 9 61 | Height = 13 62 | Top = 60 63 | Width = 32 64 | Caption = 'Width:' 65 | ParentColor = False 66 | AttachedEdit = neWidth 67 | end 68 | object neHeight: TNumberEdit 69 | Left = 136 70 | Height = 21 71 | Top = 80 72 | Width = 74 73 | OnChange = neHeightChange 74 | TabOrder = 3 75 | Text = '1' 76 | Min = 1 77 | Max = 20000 78 | Increment = 1 79 | end 80 | object alHeight: TAdjustLabel 81 | Left = 9 82 | Height = 13 83 | Top = 84 84 | Width = 35 85 | Caption = 'Height:' 86 | ParentColor = False 87 | AttachedEdit = neHeight 88 | end 89 | object lPixels1: TLabel 90 | Left = 216 91 | Height = 13 92 | Top = 59 93 | Width = 12 94 | Caption = 'px' 95 | ParentColor = False 96 | end 97 | object lPixels2: TLabel 98 | Left = 216 99 | Height = 13 100 | Top = 84 101 | Width = 12 102 | Caption = 'px' 103 | ParentColor = False 104 | end 105 | object lDefaultSize: TLabel 106 | Left = 7 107 | Height = 13 108 | Top = 9 109 | Width = 56 110 | Caption = 'lDefaultSize' 111 | ParentColor = False 112 | end 113 | end 114 | -------------------------------------------------------------------------------- /dlgText.lfm: -------------------------------------------------------------------------------- 1 | object frmText: TfrmText 2 | Left = 431 3 | Height = 371 4 | Top = 267 5 | Width = 521 6 | ClientHeight = 371 7 | ClientWidth = 521 8 | Constraints.MinHeight = 180 9 | Constraints.MinWidth = 520 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'Tahoma' 13 | FormStyle = fsStayOnTop 14 | OnCreate = FormCreate 15 | OnShow = FormShow 16 | Position = poScreenCenter 17 | LCLVersion = '1.1' 18 | object mText: TMemo 19 | Left = 0 20 | Height = 331 21 | Top = 40 22 | Width = 521 23 | Align = alClient 24 | ScrollBars = ssBoth 25 | TabOrder = 0 26 | WordWrap = False 27 | end 28 | object pTop: TPanel 29 | Left = 0 30 | Height = 40 31 | Top = 0 32 | Width = 521 33 | Align = alTop 34 | BevelOuter = bvNone 35 | ClientHeight = 40 36 | ClientWidth = 521 37 | TabOrder = 1 38 | object sbBold: TSpeedButton 39 | Left = 280 40 | Height = 22 41 | Top = 8 42 | Width = 23 43 | AllowAllUp = True 44 | Caption = 'B' 45 | Flat = True 46 | Font.Color = clWindowText 47 | Font.Height = -11 48 | Font.Name = 'Tahoma' 49 | Font.Style = [fsBold] 50 | GroupIndex = 1 51 | OnClick = ControlChange 52 | ShowHint = True 53 | ParentFont = False 54 | ParentShowHint = False 55 | end 56 | object sbItalic: TSpeedButton 57 | Left = 304 58 | Height = 22 59 | Top = 8 60 | Width = 23 61 | AllowAllUp = True 62 | Caption = 'I' 63 | Flat = True 64 | Font.Color = clWindowText 65 | Font.Height = -11 66 | Font.Name = 'Tahoma' 67 | Font.Style = [fsItalic] 68 | GroupIndex = 2 69 | OnClick = ControlChange 70 | ShowHint = True 71 | ParentFont = False 72 | ParentShowHint = False 73 | end 74 | object sbUnderline: TSpeedButton 75 | Left = 328 76 | Height = 22 77 | Top = 8 78 | Width = 23 79 | AllowAllUp = True 80 | Caption = 'U' 81 | Flat = True 82 | Font.Color = clWindowText 83 | Font.Height = -11 84 | Font.Name = 'Tahoma' 85 | Font.Style = [fsUnderline] 86 | GroupIndex = 3 87 | OnClick = ControlChange 88 | ShowHint = True 89 | ParentFont = False 90 | ParentShowHint = False 91 | end 92 | object cbFace: TComboBox 93 | Left = 8 94 | Height = 26 95 | Top = 6 96 | Width = 224 97 | DropDownCount = 12 98 | ItemHeight = 20 99 | OnChange = ControlChange 100 | OnDrawItem = cbFaceDrawItem 101 | OnDropDown = cbFaceDropDown 102 | OnUTF8KeyPress = cbFaceUTF8KeyPress 103 | ParentShowHint = False 104 | ReadOnly = True 105 | ShowHint = True 106 | Style = csOwnerDrawVariable 107 | TabOrder = 0 108 | end 109 | object neSize: TNumberEdit 110 | Left = 240 111 | Height = 21 112 | Top = 8 113 | Width = 33 114 | OnChange = ControlChange 115 | ParentShowHint = False 116 | ShowHint = True 117 | TabOrder = 1 118 | Text = '12' 119 | Min = 1 120 | Max = 1000 121 | Increment = 1 122 | end 123 | object bOK: TButton 124 | Left = 360 125 | Height = 24 126 | Top = 8 127 | Width = 75 128 | OnClick = bOKClick 129 | TabOrder = 2 130 | end 131 | object bCancel: TButton 132 | Left = 440 133 | Height = 24 134 | Top = 8 135 | Width = 75 136 | Cancel = True 137 | OnClick = bCancelClick 138 | TabOrder = 3 139 | end 140 | end 141 | end 142 | -------------------------------------------------------------------------------- /dlgToolbar.lfm: -------------------------------------------------------------------------------- 1 | object ToolbarFrame: TToolbarFrame 2 | Left = 0 3 | Height = 72 4 | Top = 0 5 | Width = 175 6 | LCLVersion = '0.9.30.3' 7 | OnMouseMove = FrameMouseMove 8 | TabOrder = 0 9 | DesignLeft = 338 10 | DesignTop = 198 11 | end 12 | -------------------------------------------------------------------------------- /dlgUnsharpMask.lfm: -------------------------------------------------------------------------------- 1 | inherited frmUnsharpMask: TfrmUnsharpMask 2 | Left = 301 3 | Height = 153 4 | Top = 301 5 | Width = 225 6 | BorderStyle = bsToolWindow 7 | ClientHeight = 153 8 | ClientWidth = 225 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | OnCreate = FormCreate 13 | OnHide = FormHide 14 | OnShow = FormShow 15 | Position = poScreenCenter 16 | object alAmount: TAdjustLabel[0] 17 | Left = 8 18 | Height = 1 19 | Top = 12 20 | Width = 1 21 | ParentColor = False 22 | AttachedEdit = neAmount 23 | end 24 | object alRadius: TAdjustLabel[1] 25 | Left = 8 26 | Height = 1 27 | Top = 44 28 | Width = 1 29 | ParentColor = False 30 | AttachedEdit = neRadius 31 | end 32 | object alThreshold: TAdjustLabel[2] 33 | Left = 8 34 | Height = 1 35 | Top = 76 36 | Width = 1 37 | ParentColor = False 38 | AttachedEdit = neThreshold 39 | end 40 | object neAmount: TNumberEdit[3] 41 | Left = 72 42 | Height = 21 43 | Top = 8 44 | Width = 57 45 | OnChange = ObjectChange 46 | TabOrder = 0 47 | Text = '100' 48 | Min = 10 49 | Max = 500 50 | Increment = 1 51 | end 52 | object neRadius: TNumberEdit[4] 53 | Left = 72 54 | Height = 21 55 | Top = 40 56 | Width = 57 57 | OnChange = ObjectChange 58 | TabOrder = 1 59 | Text = '0' 60 | Min = 0 61 | Max = 100 62 | Increment = 0.25 63 | end 64 | object neThreshold: TNumberEdit[5] 65 | Left = 72 66 | Height = 21 67 | Top = 72 68 | Width = 57 69 | OnChange = ObjectChange 70 | TabOrder = 2 71 | Text = '0' 72 | Min = 0 73 | Max = 255 74 | Increment = 1 75 | end 76 | object bOK: TButton[6] 77 | Left = 144 78 | Height = 25 79 | Top = 8 80 | Width = 75 81 | Default = True 82 | ModalResult = 1 83 | TabOrder = 3 84 | end 85 | object bCancel: TButton[7] 86 | Left = 144 87 | Height = 25 88 | Top = 40 89 | Width = 75 90 | Cancel = True 91 | ModalResult = 2 92 | TabOrder = 4 93 | end 94 | object bReset: TButton[8] 95 | Left = 144 96 | Height = 25 97 | Top = 72 98 | Width = 75 99 | OnClick = bResetClick 100 | TabOrder = 5 101 | end 102 | object cbPreview: TCheckBox[9] 103 | Left = 8 104 | Height = 19 105 | Top = 128 106 | Width = 20 107 | OnClick = cbPreviewClick 108 | TabOrder = 6 109 | end 110 | object cbToric: TCheckBox[10] 111 | Left = 8 112 | Height = 19 113 | Top = 104 114 | Width = 20 115 | OnClick = ObjectChange 116 | TabOrder = 7 117 | end 118 | end 119 | -------------------------------------------------------------------------------- /fnvHash.pas: -------------------------------------------------------------------------------- 1 | (* 2 | Greenfish Icon Editor Pro 3 | Copyright (c) 2012-13 B. Szalkai 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | *) 18 | // Fowler-Noll-Vo (FNV1a) hashing 19 | unit fnvHash; 20 | 21 | interface 22 | 23 | type 24 | TfnvKey = UInt64; 25 | 26 | var 27 | fnvNull: TfnvKey = 14695981039346656037; 28 | 29 | // Appends Data to an existing hash value 30 | // e.g. fnvAppend(fnvNull, @s[1], Length(s)) returns the hash of s 31 | function fnvAppend(Hash: TfnvKey; Data: PByte; Size: integer): TfnvKey; 32 | 33 | implementation 34 | 35 | function fnvAppend; 36 | const 37 | fnvPrime = 1099511628211; 38 | 39 | var 40 | i: integer; 41 | 42 | begin 43 | Result := Hash; 44 | for i := 1 to Size do 45 | begin 46 | Result := (Result xor Data^) * fnvPrime; 47 | inc(Data); 48 | end; 49 | end; 50 | 51 | end. 52 | 53 | -------------------------------------------------------------------------------- /gfie.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanILevi/gfie-src/75221ceb4b29454fd487a6b50f931af202971a3b/gfie.res -------------------------------------------------------------------------------- /how-to-compile.txt: -------------------------------------------------------------------------------- 1 | *** The main program 2 | 3 | It may be the best to use a Lazarus daily snapshot with fpc version at least 2.7.1 for compilation. (see http://mirrors.iwi.me/lazarus/snapshots/) The latest, cutting-edge compiler may optimize code more and will enable the use of some advanced syntax GFIE uses. 4 | 5 | WARNING: these daily Lazarus snapshots may be dangerous to use, and no one other than you is liable for any possible damage to your computer, your data or anything valuable. (see disclaimer here: http://freepascal.dfmk.hu/test/lazarus/) 6 | 7 | To compile GFIE, first create a new Lazarus package gfComp which references all files under the Components folder. Then build and install this package (this may include recompiling Lazarus). Now you can load the gfie.lpi project file into Lazarus and it should compile. 8 | 9 | *** Other programs 10 | 11 | Some utilized programs are written in other languages and need to be compiled separately: 12 | * libgfiec is written in C++. Use Code::Blocks to compile this one. The c folder contains the necessary files to compile libgfie32c.dll (Release32 target) and libgfie64c.dll (Release64 target). 13 | * Image Converter is written in C#. 14 | 15 | *** Performance note 16 | 17 | Note that currently GFIE is optimized for the i386 (32-bit desktop) and x86_64 (64-bit desktop) architectures. It will probably compile under other architectures like PowerPC, too, but performance may be affected as the FastDiv library (which enables fast division with small numbers) will fall back to use the simple division instruction, which will be probably very slow, partly due to the added function call. You should either 18 | * make a FastDiv variant on these architectures (see the libdivide library), 19 | or 20 | * eliminate FastDiv completely and rewrite those pieces of code which use FastDiv to simple division. 21 | -------------------------------------------------------------------------------- /linux_before_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python make_pascalscript_import.py 3 | -------------------------------------------------------------------------------- /linux_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Greenfish Icon Editor Pro 4 | # Copyright (c) 2012-13 B. Szalkai 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | ./linux_clean.sh 20 | lazbuild pascalscript/unit-importing/CMDimp.lpi 21 | cat gfie.lpi | sed s/win64/linux/g | sed s/before_build.bat/linux_before_build.sh/g > gfie_linux.lpi 22 | lazbuild --build-mode=Release gfie_linux.lpi 23 | -------------------------------------------------------------------------------- /make_pascalscript_import.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os,sys,re,math,time,random 3 | 4 | units = [] 5 | mainInclude = "PSImports"+os.sep+"uPSI_AllMySources.pas" 6 | include_graph = {} 7 | for fn in os.listdir('.'): 8 | fnlower = fn.lower() 9 | if fnlower.endswith(".pas") and not fnlower.startswith("upsi_"): 10 | # is the unit Windows-specific? 11 | with open(fn) as f: 12 | s = f.read() 13 | if s.lower().find("unit is specific to windows") >= 0 and sys.platform.find("linux") >= 0: 14 | print(fn+" is Windows-specific, skipping") 15 | continue 16 | 17 | unit = fn.replace(".pas", "") 18 | mt = os.path.getmtime(fn) 19 | try: 20 | mtInclude = os.path.getmtime("PSImports"+os.sep+"uPSI_"+fn) 21 | except: 22 | mtInclude = -1 23 | unit_ok = True 24 | if mt >= mtInclude: 25 | os.system("pascalscript"+os.sep+"unit-importing"+os.sep+"CMDimp "+fn) 26 | if not os.path.exists("uPSI_"+fn) and (mtInclude < 0): 27 | print(fn+" could not be converted") 28 | unit_ok = False 29 | else: 30 | print(fn+" has not changed") 31 | if unit_ok: 32 | units.append(unit) 33 | include_graph[unit] = {} 34 | os.system("mv uPSI_*.pas PSImports") 35 | 36 | for unit in units: 37 | with open(unit + ".pas") as fu: 38 | s = fu.read() 39 | s = s[s.lower().find("uses"):] 40 | s = s[:s.find(";")+1] 41 | for unit2 in units: 42 | if unit2 != unit: 43 | if s.lower().find(unit2.lower()+",") >= 0 or s.lower().find(unit2.lower()+";") >= 0: 44 | #print(unit+" includes "+unit2) 45 | include_graph[unit][unit2] = True 46 | 47 | units_sorted = [] 48 | while len(include_graph) > 0: 49 | found = False 50 | for u in units: 51 | if (u in include_graph) and len(include_graph[u]) == 0: 52 | units_sorted.append(u) 53 | #print(u) 54 | for u2 in units: 55 | if (u2 in include_graph) and (u in include_graph[u2]): 56 | del include_graph[u2][u] 57 | del include_graph[u] 58 | found = True 59 | if not found: 60 | for u in units: 61 | if (u in include_graph): 62 | print(u+ " ! " + str(len(include_graph[u]))) 63 | break 64 | 65 | units = units_sorted 66 | 67 | with open(mainInclude, "w") as f: 68 | f.write("""unit uPSI_AllMySources; 69 | 70 | // This unit has been automatically generated. 71 | interface 72 | 73 | uses 74 | SysUtils, Classes, uPSComponent, uPSRuntime, uPSCompiler; 75 | 76 | procedure PSImportAllMySources(PSScript1: TPSScript); 77 | 78 | implementation 79 | 80 | uses 81 | """); 82 | 83 | first = True 84 | for unit in units: 85 | if not first: 86 | f.write(", ") 87 | f.write("uPSI_"+unit) 88 | first = False; 89 | 90 | f.write("""; 91 | 92 | procedure PSImportAllMySources(PSScript1: TPSScript); 93 | begin 94 | """); 95 | for unit in units: 96 | f.write(" TPSPluginItem(PSScript1.Plugins.Add).Plugin := TPSImport_"+unit+".Create(PSScript1);\n") 97 | f.write("""end; 98 | 99 | end. 100 | """) 101 | -------------------------------------------------------------------------------- /misc.lrs.txt: -------------------------------------------------------------------------------- 1 | Resources/bigcross.cur 2 | Resources/bigcrossnoinv.cur 3 | Resources/brush.cur 4 | Resources/brushnoinv.cur 5 | Resources/bucket.cur 6 | Resources/bucketnoinv.cur 7 | Resources/crop.cur 8 | Resources/cropnoinv.cur 9 | Resources/ellipse.cur 10 | Resources/ellipsenoinv.cur 11 | Resources/eraser.cur 12 | Resources/erasernoinv.cur 13 | Resources/eyedropper.cur 14 | Resources/eyedroppernoinv.cur 15 | Resources/gradient.cur 16 | Resources/gradientnoinv.cur 17 | Resources/hand.cur 18 | Resources/handgrab.cur 19 | Resources/handpoint.cur 20 | Resources/iclstub16.bin 21 | Resources/iclstub32.dll 22 | Resources/line.cur 23 | Resources/linenoinv.cur 24 | Resources/pencil.cur 25 | Resources/pencilnoinv.cur 26 | Resources/recolor.cur 27 | Resources/recolornoinv.cur 28 | Resources/rect.cur 29 | Resources/rectnoinv.cur 30 | Resources/retouch.cur 31 | Resources/retouchnoinv.cur 32 | Resources/rotate.cur 33 | Resources/select.cur 34 | Resources/selectadd.cur 35 | Resources/selectaddnoinv.cur 36 | Resources/selectint.cur 37 | Resources/selectintnoinv.cur 38 | Resources/selectnoinv.cur 39 | Resources/selectsub.cur 40 | Resources/selectsubnoinv.cur 41 | -------------------------------------------------------------------------------- /pascalscript/Source/PascalScriptFCL.pas: -------------------------------------------------------------------------------- 1 | { This file was automatically created by Lazarus. Do not edit! 2 | This source is only used to compile and install the package. 3 | } 4 | 5 | unit PascalScriptFCL; 6 | 7 | interface 8 | 9 | uses 10 | uPSRuntime, uPSC_classes, uPSC_dateutils, uPSC_DB, uPSC_dll, uPSC_std, 11 | uPSCompiler, uPSComponent, uPSComponent_DB, uPSComponent_Default, uPSUtils, 12 | uPSDebugger, uPSDisassembly, uPSPreProcessor, uPSR_classes, uPSR_dateutils, 13 | uPSR_DB, uPSR_dll, uPSR_std, uPSComponent_COM, uPSC_comobj, uPSR_comobj; 14 | 15 | implementation 16 | 17 | end. 18 | -------------------------------------------------------------------------------- /pascalscript/Source/PascalScriptLCL.pas: -------------------------------------------------------------------------------- 1 | { This file was automatically created by Lazarus. Do not edit! 2 | This source is only used to compile and install the package. 3 | } 4 | 5 | unit PascalScriptLCL; 6 | 7 | interface 8 | 9 | uses 10 | uPSR_stdctrls, PascalScript_Core_Reg, uPSC_buttons, uPSC_controls, 11 | uPSC_extctrls, uPSC_forms, uPSC_graphics, uPSC_menus, uPSC_stdctrls, 12 | uPSComponent_Forms, uPSComponent_StdCtrls, uPSR_buttons, uPSR_controls, 13 | uPSR_extctrls, uPSR_forms, uPSR_graphics, uPSR_menus, LazarusPackageIntf; 14 | 15 | implementation 16 | 17 | procedure Register; 18 | begin 19 | RegisterUnit('PascalScript_Core_Reg', @PascalScript_Core_Reg.Register); 20 | end; 21 | 22 | initialization 23 | RegisterPackage('PascalScriptLCL', @Register); 24 | end. 25 | -------------------------------------------------------------------------------- /pascalscript/Source/PascalScript_Core_Ext_Reg.pas: -------------------------------------------------------------------------------- 1 | unit PascalScript_Core_Ext_Reg; 2 | 3 | {----------------------------------------------------------------------------} 4 | { RemObjects Pascal Script } 5 | { } 6 | { compiler: Delphi 2 and up, Kylix 3 and up } 7 | { platform: Win32, Linux } 8 | { } 9 | { (c)opyright RemObjects Software. all rights reserved. } 10 | { } 11 | {----------------------------------------------------------------------------} 12 | 13 | {$I PascalScript.inc} 14 | 15 | interface 16 | 17 | procedure Register; 18 | 19 | implementation 20 | 21 | uses 22 | Classes, 23 | uPSComponentExt; 24 | 25 | procedure Register; 26 | begin 27 | RegisterComponents('RemObjects Pascal Script',[TPSScriptExtension]); 28 | end; 29 | 30 | end. 31 | -------------------------------------------------------------------------------- /pascalscript/Source/PascalScript_Core_Reg.pas: -------------------------------------------------------------------------------- 1 | unit PascalScript_Core_Reg; 2 | 3 | {---------------------------------------------------------------------------- 4 | / RemObjects Pascal Script 5 | / 6 | / compiler: Delphi 2 and up, Kylix 3 and up 7 | / platform: Win32, Linux 8 | / 9 | / (c)opyright RemObjects Software. all rights reserved. 10 | / 11 | ----------------------------------------------------------------------------} 12 | 13 | {$I PascalScript.inc} 14 | 15 | interface 16 | 17 | {$IFNDEF FPC} 18 | {$R PascalScript_Core_Glyphs.res} 19 | {$ENDIF} 20 | 21 | procedure Register; 22 | 23 | implementation 24 | 25 | uses 26 | Classes, 27 | {$IFDEF FPC} 28 | LResources, 29 | {$ENDIF} 30 | uPSComponent, 31 | uPSDebugger, 32 | uPSComponent_Default, 33 | uPSComponent_COM, 34 | uPSComponent_DB, 35 | uPSComponent_Forms, 36 | uPSComponent_Controls, 37 | uPSComponent_StdCtrls; 38 | 39 | procedure Register; 40 | begin 41 | RegisterComponents('Pascal Script', [TPSScript, 42 | TPSScriptDebugger, 43 | TPSDllPlugin, 44 | TPSImport_Classes, 45 | TPSImport_DateUtils, 46 | TPSImport_ComObj, 47 | TPSImport_DB, 48 | TPSImport_Forms, 49 | TPSImport_Controls, 50 | TPSImport_StdCtrls, 51 | TPSCustomPlugin]); 52 | end; 53 | 54 | 55 | {$IFDEF FPC} 56 | initialization; 57 | {$i pascalscript.lrs} 58 | {$ENDIF} 59 | 60 | 61 | end. 62 | -------------------------------------------------------------------------------- /pascalscript/Source/PascalScript_Core_Reg_noDB.pas: -------------------------------------------------------------------------------- 1 | unit PascalScript_Core_Reg_noDB; 2 | 3 | {----------------------------------------------------------------------------} 4 | { RemObjects Pascal Script 5 | { 6 | { compiler: Delphi 2 and up, Kylix 3 and up 7 | { platform: Win32, Linux 8 | { 9 | { (c)opyright RemObjects Software. all rights reserved. 10 | { 11 | {----------------------------------------------------------------------------} 12 | 13 | {$I PascalScript.inc} 14 | 15 | interface 16 | 17 | {$R PascalScript_Core_Glyphs.res} 18 | 19 | procedure Register; 20 | 21 | implementation 22 | 23 | uses 24 | Classes, 25 | uPSComponent, 26 | uPSComponentExt, 27 | uPSDebugger, 28 | uPSComponent_Default, 29 | uPSComponent_COM, 30 | uPSComponent_Forms, 31 | uPSComponent_Controls, 32 | uPSComponent_StdCtrls; 33 | 34 | procedure Register; 35 | begin 36 | RegisterComponents('Pascal Script', [TPSScript, 37 | TPSScriptDebugger, 38 | TPSDllPlugin, 39 | TPSImport_Classes, 40 | TPSImport_DateUtils, 41 | TPSImport_ComObj, 42 | TPSImport_Forms, 43 | TPSImport_Controls, 44 | TPSImport_StdCtrls, 45 | TPSScriptExtension]); 46 | end; 47 | 48 | end. 49 | -------------------------------------------------------------------------------- /pascalscript/Source/license.md: -------------------------------------------------------------------------------- 1 | # RemObjects Pascal Script 2 | Created By Carlo Kok 3 | ck@remobjects.com 4 | 5 | Copyright (C) 2000-2014 by Carlo Kok and RemObjects Software, LLC 6 | 7 | This software is provided 'as-is', without any expressed or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. 8 | Permission is granted to anyone to use this software for any kind of application, and to alter it and redistribute it freely, subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented, you must not claim that you wrote the original software. 11 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | 3. You must have a visible line in your programs aboutbox or documentation that it is made using RemObjects Pascal Script and where RemObjects Pascal Script can be found. 13 | 4. This notice may not be removed or altered from any source distribution. 14 | 15 | If you have any questions concerning this license contact info@remobjects.com 16 | 17 | Carlo Kok, RemObjects Software 18 | 19 | -------------------------------------------------------------------------------- /pascalscript/Source/pascalscript.pas: -------------------------------------------------------------------------------- 1 | { This file was automatically created by Lazarus. Do not edit! 2 | This source is only used to compile and install the package. 3 | } 4 | 5 | unit PascalScript; 6 | 7 | interface 8 | 9 | uses 10 | uPSRuntime, PascalScript_Core_Reg, uPSC_buttons, uPSC_classes, uPSC_controls, 11 | uPSC_dateutils, uPSC_DB, uPSC_dll, uPSC_extctrls, uPSC_forms, 12 | uPSC_graphics, uPSC_menus, uPSC_std, uPSC_stdctrls, uPSCompiler, 13 | uPSComponent, uPSComponent_Controls, uPSComponent_DB, uPSComponent_Default, 14 | uPSComponent_Forms, uPSComponent_StdCtrls, uPSComponentExt, uPSDebugger, 15 | uPSDisassembly, uPSPreProcessor, uPSR_buttons, uPSR_classes, uPSR_controls, 16 | uPSR_dateutils, uPSR_DB, uPSR_dll, uPSR_extctrls, uPSR_forms, 17 | uPSR_graphics, uPSR_menus, uPSR_std, uPSR_stdctrls, uPSUtils, 18 | uPSComponent_COM, uPSC_comobj, uPSR_comobj, LazarusPackageIntf; 19 | 20 | implementation 21 | 22 | procedure Register; 23 | begin 24 | RegisterUnit('PascalScript_Core_Reg', @PascalScript_Core_Reg.Register); 25 | end; 26 | 27 | initialization 28 | RegisterPackage('PascalScript', @Register); 29 | end. 30 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSC_buttons.pas: -------------------------------------------------------------------------------- 1 | { Compiletime Buttons support } 2 | unit uPSC_buttons; 3 | {$I PascalScript.inc} 4 | interface 5 | uses 6 | uPSCompiler, uPSUtils; 7 | 8 | { 9 | Will register files from: 10 | Buttons 11 | 12 | Requires 13 | STD, classes, controls and graphics and StdCtrls 14 | } 15 | procedure SIRegister_Buttons_TypesAndConsts(Cl: TPSPascalCompiler); 16 | 17 | procedure SIRegisterTSPEEDBUTTON(Cl: TPSPascalCompiler); 18 | procedure SIRegisterTBITBTN(Cl: TPSPascalCompiler); 19 | 20 | procedure SIRegister_Buttons(Cl: TPSPascalCompiler); 21 | 22 | implementation 23 | 24 | procedure SIRegisterTSPEEDBUTTON(Cl: TPSPascalCompiler); 25 | begin 26 | with Cl.AddClassN(cl.FindClass('TGRAPHICCONTROL'), 'TSPEEDBUTTON') do 27 | begin 28 | RegisterProperty('ALLOWALLUP', 'BOOLEAN', iptrw); 29 | RegisterProperty('GROUPINDEX', 'INTEGER', iptrw); 30 | RegisterProperty('DOWN', 'BOOLEAN', iptrw); 31 | RegisterProperty('CAPTION', 'String', iptrw); 32 | RegisterProperty('FONT', 'TFont', iptrw); 33 | RegisterProperty('GLYPH', 'TBITMAP', iptrw); 34 | RegisterProperty('LAYOUT', 'TBUTTONLAYOUT', iptrw); 35 | RegisterProperty('MARGIN', 'INTEGER', iptrw); 36 | RegisterProperty('NUMGLYPHS', 'BYTE', iptrw); 37 | RegisterProperty('PARENTFONT', 'Boolean', iptrw); 38 | RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw); 39 | RegisterProperty('SPACING', 'INTEGER', iptrw); 40 | RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw); 41 | RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw); 42 | RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw); 43 | RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw); 44 | RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw); 45 | end; 46 | end; 47 | 48 | procedure SIRegisterTBITBTN(Cl: TPSPascalCompiler); 49 | begin 50 | with Cl.AddClassN(cl.FindClass('TBUTTON'), 'TBITBTN') do 51 | begin 52 | RegisterProperty('GLYPH', 'TBITMAP', iptrw); 53 | RegisterProperty('KIND', 'TBITBTNKIND', iptrw); 54 | RegisterProperty('LAYOUT', 'TBUTTONLAYOUT', iptrw); 55 | RegisterProperty('MARGIN', 'INTEGER', iptrw); 56 | RegisterProperty('NUMGLYPHS', 'BYTE', iptrw); 57 | RegisterProperty('STYLE', 'TBUTTONSTYLE', iptrw); 58 | RegisterProperty('SPACING', 'INTEGER', iptrw); 59 | end; 60 | end; 61 | 62 | 63 | 64 | procedure SIRegister_Buttons_TypesAndConsts(Cl: TPSPascalCompiler); 65 | begin 66 | Cl.AddTypeS('TButtonLayout', '(blGlyphLeft, blGlyphRight, blGlyphTop, blGlyphBottom)'); 67 | Cl.AddTypeS('TButtonState', '(bsUp, bsDisabled, bsDown, bsExclusive)'); 68 | Cl.AddTypeS('TButtonStyle', '(bsAutoDetect, bsWin31, bsNew)'); 69 | Cl.AddTypeS('TBitBtnKind', '(bkCustom, bkOK, bkCancel, bkHelp, bkYes, bkNo, bkClose, bkAbort, bkRetry, bkIgnore, bkAll)'); 70 | 71 | end; 72 | 73 | procedure SIRegister_Buttons(Cl: TPSPascalCompiler); 74 | begin 75 | SIRegister_Buttons_TypesAndConsts(cl); 76 | SIRegisterTSPEEDBUTTON(cl); 77 | SIRegisterTBITBTN(cl); 78 | end; 79 | 80 | // PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl) 81 | 82 | 83 | end. 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSC_comobj.pas: -------------------------------------------------------------------------------- 1 | { compiletime ComObj support } 2 | unit uPSC_comobj; 3 | 4 | {$I PascalScript.inc} 5 | interface 6 | uses 7 | uPSCompiler, uPSUtils; 8 | 9 | { 10 | 11 | Will register: 12 | 13 | function CreateOleObject(const ClassName: String): IDispatch; 14 | function GetActiveOleObject(const ClassName: String): IDispatch; 15 | 16 | } 17 | 18 | procedure SIRegister_ComObj(cl: TPSPascalCompiler); 19 | 20 | implementation 21 | 22 | procedure SIRegister_ComObj(cl: TPSPascalCompiler); 23 | begin 24 | {$IFDEF FPC} 25 | {$IFDEF PS_FPC_HAS_COM} 26 | cl.AddTypeS('HResult', 'LongInt'); 27 | cl.AddTypeS('TGUID', 'record D1: LongWord; D2: Word; D3: Word; D4: array[0..7] of Byte; end;'); 28 | cl.AddTypeS('TCLSID', 'TGUID'); 29 | cl.AddTypeS('TIID', 'TGUID'); 30 | cl.AddDelphiFunction('procedure OleCheck(Result: HResult);'); 31 | cl.AddDelphiFunction('function StringToGUID(const S: string): TGUID;'); 32 | cl.AddDelphiFunction('function CreateComObject(const ClassID: TGUID): IUnknown;'); 33 | cl.AddDelphiFunction('function CreateOleObject(const ClassName: String): IDispatch;'); 34 | cl.AddDelphiFunction('function GetActiveOleObject(const ClassName: String): IDispatch;'); 35 | {$ENDIF} 36 | {$ELSE} 37 | cl.AddTypeS('HResult', 'LongInt'); 38 | cl.AddTypeS('TGUID', 'record D1: LongWord; D2: Word; D3: Word; D4: array[0..7] of Byte; end;'); 39 | cl.AddTypeS('TCLSID', 'TGUID'); 40 | cl.AddTypeS('TIID', 'TGUID'); 41 | cl.AddDelphiFunction('procedure OleCheck(Result: HResult);'); 42 | {$IFNDEF PS_NOINTERFACES} 43 | {$IFDEF DELPHI3UP} 44 | cl.AddDelphiFunction('function StringToGUID(const S: string): TGUID;'); 45 | cl.AddDelphiFunction('function CreateComObject(const ClassID: TGUID): IUnknown;'); 46 | {$ENDIF} 47 | {$ENDIF} 48 | cl.AddDelphiFunction('function CreateOleObject(const ClassName: String): IDispatch;'); 49 | cl.AddDelphiFunction('function GetActiveOleObject(const ClassName: String): IDispatch;'); 50 | {$ENDIF} 51 | end; 52 | 53 | end. 54 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSC_dateutils.pas: -------------------------------------------------------------------------------- 1 | { Compile time Date Time library } 2 | unit uPSC_dateutils; 3 | 4 | interface 5 | uses 6 | SysUtils, uPSCompiler, uPSUtils; 7 | 8 | 9 | procedure RegisterDateTimeLibrary_C(S: TPSPascalCompiler); 10 | 11 | implementation 12 | 13 | procedure RegisterDatetimeLibrary_C(S: TPSPascalCompiler); 14 | begin 15 | s.AddType('TDateTime', btDouble).ExportName := True; 16 | s.AddDelphiFunction('function EncodeDate(Year, Month, Day: Word): TDateTime;'); 17 | s.AddDelphiFunction('function EncodeTime(Hour, Min, Sec, MSec: Word): TDateTime;'); 18 | s.AddDelphiFunction('function TryEncodeDate(Year, Month, Day: Word; var Date: TDateTime): Boolean;'); 19 | s.AddDelphiFunction('function TryEncodeTime(Hour, Min, Sec, MSec: Word; var Time: TDateTime): Boolean;'); 20 | s.AddDelphiFunction('procedure DecodeDate(const DateTime: TDateTime; var Year, Month, Day: Word);'); 21 | s.AddDelphiFunction('procedure DecodeTime(const DateTime: TDateTime; var Hour, Min, Sec, MSec: Word);'); 22 | s.AddDelphiFunction('function DayOfWeek(const DateTime: TDateTime): Word;'); 23 | s.AddDelphiFunction('function Date: TDateTime;'); 24 | s.AddDelphiFunction('function Time: TDateTime;'); 25 | s.AddDelphiFunction('function Now: TDateTime;'); 26 | s.AddDelphiFunction('function DateTimeToUnix(D: TDateTime): Int64;'); 27 | s.AddDelphiFunction('function UnixToDateTime(U: Int64): TDateTime;'); 28 | 29 | s.AddDelphiFunction('function DateToStr(D: TDateTime): String;'); 30 | s.AddDelphiFunction('function StrToDate(const s: String): TDateTime;'); 31 | s.AddDelphiFunction('function FormatDateTime(const fmt: String; D: TDateTime): String;'); 32 | end; 33 | 34 | end. 35 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSC_std.pas: -------------------------------------------------------------------------------- 1 | { Compiletime TObject, TPersistent and TComponent definitions } 2 | unit uPSC_std; 3 | {$I PascalScript.inc} 4 | interface 5 | uses 6 | uPSCompiler, uPSUtils; 7 | 8 | { 9 | Will register files from: 10 | System 11 | Classes (Only TComponent and TPersistent) 12 | 13 | } 14 | 15 | procedure SIRegister_Std_TypesAndConsts(Cl: TPSPascalCompiler); 16 | procedure SIRegisterTObject(CL: TPSPascalCompiler); 17 | procedure SIRegisterTPersistent(Cl: TPSPascalCompiler); 18 | procedure SIRegisterTComponent(Cl: TPSPascalCompiler); 19 | 20 | procedure SIRegister_Std(Cl: TPSPascalCompiler); 21 | 22 | implementation 23 | 24 | procedure SIRegisterTObject(CL: TPSPascalCompiler); 25 | begin 26 | with Cl.AddClassN(nil, 'TObject') do 27 | begin 28 | RegisterMethod('constructor Create'); 29 | RegisterMethod('procedure Free'); 30 | end; 31 | end; 32 | 33 | procedure SIRegisterTPersistent(Cl: TPSPascalCompiler); 34 | begin 35 | with Cl.AddClassN(cl.FindClass('TObject'), 'TPersistent') do 36 | begin 37 | RegisterMethod('procedure Assign(Source: TPersistent)'); 38 | end; 39 | end; 40 | 41 | procedure SIRegisterTComponent(Cl: TPSPascalCompiler); 42 | begin 43 | with Cl.AddClassN(cl.FindClass('TPersistent'), 'TComponent') do 44 | begin 45 | RegisterMethod('function FindComponent(AName: String): TComponent;'); 46 | RegisterMethod('constructor Create(AOwner: TComponent); virtual;'); 47 | 48 | RegisterProperty('Owner', 'TComponent', iptRW); 49 | RegisterMethod('procedure DestroyComponents'); 50 | RegisterMethod('procedure Destroying'); 51 | RegisterMethod('procedure FreeNotification(AComponent:TComponent)'); 52 | RegisterMethod('procedure InsertComponent(AComponent:TComponent)'); 53 | RegisterMethod('procedure RemoveComponent(AComponent:TComponent)'); 54 | RegisterProperty('Components', 'TComponent Integer', iptr); 55 | RegisterProperty('ComponentCount', 'Integer', iptr); 56 | RegisterProperty('ComponentIndex', 'Integer', iptrw); 57 | RegisterProperty('ComponentState', 'Byte', iptr); 58 | RegisterProperty('Designinfo', 'LongInt', iptrw); 59 | RegisterProperty('Name', 'String', iptrw); 60 | RegisterProperty('Tag', 'LongInt', iptrw); 61 | end; 62 | end; 63 | 64 | 65 | 66 | 67 | procedure SIRegister_Std_TypesAndConsts(Cl: TPSPascalCompiler); 68 | begin 69 | Cl.AddTypeS('TComponentStateE', '(csLoading, csReading, csWriting, csDestroying, csDesigning, csAncestor, csUpdating, csFixups, csFreeNotification, csInline, csDesignInstance)'); 70 | cl.AddTypeS('TComponentState', 'set of TComponentStateE'); 71 | Cl.AddTypeS('TRect', 'record Left, Top, Right, Bottom: Integer; end;'); 72 | end; 73 | 74 | procedure SIRegister_Std(Cl: TPSPascalCompiler); 75 | begin 76 | SIRegister_Std_TypesAndConsts(Cl); 77 | SIRegisterTObject(CL); 78 | SIRegisterTPersistent(Cl); 79 | SIRegisterTComponent(Cl); 80 | end; 81 | 82 | // PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl) 83 | 84 | 85 | End. 86 | 87 |  88 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSComponent_COM.pas: -------------------------------------------------------------------------------- 1 | 2 | unit uPSComponent_COM; 3 | 4 | interface 5 | uses 6 | SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime; 7 | type 8 | 9 | TPSImport_ComObj = class(TPSPlugin) 10 | private 11 | public 12 | procedure CompileImport1(CompExec: TPSScript); override; 13 | procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override; 14 | end; 15 | 16 | TIFPS3CE_ComObj = class(TPSImport_ComObj); 17 | 18 | implementation 19 | uses 20 | uPSC_comobj, 21 | uPSR_comobj; 22 | 23 | 24 | { TPSImport_ComObj } 25 | 26 | procedure TPSImport_ComObj.CompileImport1(CompExec: TPSScript); 27 | begin 28 | SIRegister_ComObj(CompExec.Comp); 29 | end; 30 | 31 | 32 | procedure TPSImport_ComObj.ExecImport1(CompExec: TPSScript; 33 | const ri: TPSRuntimeClassImporter); 34 | begin 35 | RIRegister_ComObj(CompExec.Exec); 36 | end; 37 | 38 | end. 39 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSComponent_Controls.pas: -------------------------------------------------------------------------------- 1 | unit uPSComponent_Controls; 2 | 3 | interface 4 | uses 5 | SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime; 6 | type 7 | 8 | TPSImport_Controls = class(TPSPlugin) 9 | private 10 | FEnableStreams: Boolean; 11 | FEnableGraphics: Boolean; 12 | FEnableControls: Boolean; 13 | public 14 | procedure CompileImport1(CompExec: TPSScript); override; 15 | procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override; 16 | public 17 | constructor Create(AOwner: TComponent); override; 18 | published 19 | 20 | property EnableStreams: Boolean read FEnableStreams write FEnableStreams; 21 | 22 | property EnableGraphics: Boolean read FEnableGraphics write FEnableGraphics; 23 | 24 | property EnableControls: Boolean read FEnableControls write FEnableControls; 25 | end; 26 | 27 | TIFPS3CE_Controls = class(TPSImport_Controls); 28 | 29 | implementation 30 | uses 31 | uPSC_graphics, 32 | uPSC_controls, 33 | uPSR_graphics, 34 | uPSR_controls; 35 | 36 | 37 | { TPSImport_Controls } 38 | 39 | procedure TPSImport_Controls.CompileImport1(CompExec: TPSScript); 40 | begin 41 | if FEnableGraphics then 42 | SIRegister_Graphics(CompExec.Comp, FEnableStreams); 43 | if FEnableControls then 44 | SIRegister_Controls(CompExec.Comp); 45 | end; 46 | 47 | constructor TPSImport_Controls.Create(AOwner: TComponent); 48 | begin 49 | inherited Create(AOwner); 50 | FEnableStreams := True; 51 | FEnableGraphics := True; 52 | FEnableControls := True; 53 | end; 54 | 55 | procedure TPSImport_Controls.ExecImport1(CompExec: TPSScript; 56 | const ri: TPSRuntimeClassImporter); 57 | begin 58 | if FEnableGraphics then 59 | RIRegister_Graphics(ri, FEnableStreams); 60 | if FEnableControls then 61 | RIRegister_Controls(ri); 62 | end; 63 | 64 | 65 | end. 66 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSComponent_DB.pas: -------------------------------------------------------------------------------- 1 | unit uPSComponent_DB; 2 | 3 | interface 4 | {$I PascalScript.inc} 5 | uses 6 | SysUtils, Classes, uPSComponent, uPSRuntime, uPSCompiler; 7 | type 8 | 9 | TPSImport_DB = class(TPSPlugin) 10 | public 11 | procedure CompileImport1(CompExec: TPSScript); override; 12 | procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override; 13 | public 14 | end; 15 | 16 | TIFPS3CE_DB = class(TPSImport_DB); 17 | 18 | implementation 19 | uses 20 | uPSC_DB, 21 | uPSR_DB; 22 | 23 | { TPSImport_DB } 24 | 25 | procedure TPSImport_DB.CompileImport1(CompExec: TPSScript); 26 | begin 27 | SIRegister_DB(CompExec.Comp); 28 | end; 29 | 30 | procedure TPSImport_DB.ExecImport1(CompExec: TPSScript; 31 | const ri: TPSRuntimeClassImporter); 32 | begin 33 | RIRegister_DB(RI); 34 | end; 35 | 36 | end. 37 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSComponent_Default.pas: -------------------------------------------------------------------------------- 1 | unit uPSComponent_Default; 2 | {$I PascalScript.inc} 3 | interface 4 | uses 5 | SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime; 6 | 7 | type 8 | 9 | TPSImport_DateUtils = class(TPSPlugin) 10 | public 11 | procedure CompOnUses(CompExec: TPSScript); override; 12 | procedure ExecOnUses(CompExec: TPSScript); override; 13 | end; 14 | 15 | TPSImport_Classes = class(TPSPlugin) 16 | private 17 | FEnableStreams: Boolean; 18 | FEnableClasses: Boolean; 19 | public 20 | procedure CompileImport1(CompExec: TPSScript); override; 21 | procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override; 22 | public 23 | 24 | constructor Create(AOwner: TComponent); override; 25 | published 26 | 27 | property EnableStreams: Boolean read FEnableStreams write FEnableStreams; 28 | 29 | property EnableClasses: Boolean read FEnableClasses write FEnableClasses; 30 | end; 31 | 32 | TIFPS3CE_Std = class(TPSImport_Classes); 33 | 34 | TIFPS3CE_DateUtils = class(TPSImport_DateUtils); 35 | 36 | implementation 37 | uses 38 | uPSC_std, 39 | uPSR_std, 40 | uPSC_classes, 41 | uPSR_classes, 42 | uPSC_dateutils, 43 | uPSR_dateutils; 44 | 45 | { TPSImport_Classes } 46 | 47 | procedure TPSImport_Classes.CompileImport1(CompExec: TPSScript); 48 | begin 49 | SIRegister_Std(CompExec.Comp); 50 | if FEnableClasses then 51 | SIRegister_Classes(CompExec.Comp, FEnableStreams); 52 | end; 53 | 54 | procedure TPSImport_Classes.ExecImport1(CompExec: TPSScript; 55 | const ri: TPSRuntimeClassImporter); 56 | begin 57 | RIRegister_Std(Ri); 58 | if FEnableClasses then 59 | RIRegister_Classes(ri, FEnableStreams); 60 | end; 61 | 62 | constructor TPSImport_Classes.Create(AOwner: TComponent); 63 | begin 64 | inherited Create(AOwner); 65 | FEnableStreams := True; 66 | FEnableClasses := True; 67 | end; 68 | 69 | { TPSImport_DateUtils } 70 | 71 | procedure TPSImport_DateUtils.CompOnUses(CompExec: TPSScript); 72 | begin 73 | RegisterDateTimeLibrary_C(CompExec.Comp); 74 | end; 75 | 76 | procedure TPSImport_DateUtils.ExecOnUses(CompExec: TPSScript); 77 | begin 78 | RegisterDateTimeLibrary_R(CompExec.Exec); 79 | end; 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSComponent_Forms.pas: -------------------------------------------------------------------------------- 1 | 2 | unit uPSComponent_Forms; 3 | 4 | interface 5 | uses 6 | SysUtils, Classes, uPSRuntime, uPSCompiler, uPSComponent; 7 | type 8 | 9 | TPSImport_Forms = class(TPSPlugin) 10 | private 11 | FEnableForms: Boolean; 12 | FEnableMenus: Boolean; 13 | public 14 | procedure CompileImport1(CompExec: TPSScript); override; 15 | procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override; 16 | public 17 | constructor Create(AOwner: TComponent); override; 18 | published 19 | 20 | property EnableForms: Boolean read FEnableForms write FEnableForms; 21 | 22 | property EnableMenus: Boolean read FEnableMenus write FEnableMenus; 23 | end; 24 | 25 | TIFPS3CE_Forms = class(TPSImport_Forms); 26 | 27 | implementation 28 | uses 29 | uPSC_forms, 30 | uPSC_menus, 31 | uPSR_forms, 32 | uPSR_menus; 33 | 34 | { TPSImport_Forms } 35 | 36 | procedure TPSImport_Forms.CompileImport1(CompExec: TPSScript); 37 | begin 38 | if FEnableForms then 39 | SIRegister_Forms(CompExec.comp); 40 | if FEnableMenus then 41 | SIRegister_Menus(CompExec.comp); 42 | end; 43 | 44 | constructor TPSImport_Forms.Create(AOwner: TComponent); 45 | begin 46 | inherited Create(Aowner); 47 | FEnableForms := True; 48 | FEnableMenus := True; 49 | end; 50 | 51 | procedure TPSImport_Forms.ExecImport1(CompExec: TPSScript; 52 | const ri: TPSRuntimeClassImporter); 53 | begin 54 | if FEnableForms then 55 | RIRegister_Forms(ri); 56 | 57 | if FEnableMenus then 58 | begin 59 | RIRegister_Menus(ri); 60 | RIRegister_Menus_Routines(compexec.Exec); 61 | end; 62 | 63 | end; 64 | 65 | end. 66 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSComponent_StdCtrls.pas: -------------------------------------------------------------------------------- 1 | 2 | unit uPSComponent_StdCtrls; 3 | 4 | interface 5 | uses 6 | SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime; 7 | type 8 | 9 | TPSImport_StdCtrls = class(TPSPlugin) 10 | private 11 | FEnableButtons: Boolean; 12 | FEnableExtCtrls: Boolean; 13 | public 14 | procedure CompileImport1(CompExec: TPSScript); override; 15 | procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override; 16 | public 17 | constructor Create(AOwner: TComponent); override; 18 | published 19 | 20 | property EnableExtCtrls: Boolean read FEnableExtCtrls write FEnableExtCtrls; 21 | 22 | property EnableButtons: Boolean read FEnableButtons write FEnableButtons; 23 | end; 24 | 25 | TIFPS3CE_StdCtrls = class(TPSImport_StdCtrls); 26 | 27 | 28 | implementation 29 | uses 30 | uPSC_buttons, 31 | uPSC_stdctrls, 32 | uPSC_extctrls, 33 | uPSR_buttons, 34 | uPSR_stdctrls, 35 | uPSR_extctrls; 36 | 37 | { TPSImport_StdCtrls } 38 | 39 | procedure TPSImport_StdCtrls.CompileImport1(CompExec: TPSScript); 40 | begin 41 | SIRegister_stdctrls(CompExec.Comp); 42 | if FEnableExtCtrls then 43 | SIRegister_ExtCtrls(CompExec.Comp); 44 | if FEnableButtons then 45 | SIRegister_Buttons(CompExec.Comp); 46 | end; 47 | 48 | constructor TPSImport_StdCtrls.Create(AOwner: TComponent); 49 | begin 50 | inherited Create(Aowner); 51 | FEnableButtons := True; 52 | FEnableExtCtrls := True; 53 | end; 54 | 55 | procedure TPSImport_StdCtrls.ExecImport1(CompExec: TPSScript; 56 | const ri: TPSRuntimeClassImporter); 57 | begin 58 | RIRegister_stdctrls(RI); 59 | if FEnableExtCtrls then 60 | RIRegister_ExtCtrls(RI); 61 | if FEnableButtons then 62 | RIRegister_Buttons(RI); 63 | end; 64 | 65 | end. 66 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSR_buttons.pas: -------------------------------------------------------------------------------- 1 | 2 | unit uPSR_buttons; 3 | {$I PascalScript.inc} 4 | interface 5 | uses 6 | uPSRuntime, uPSUtils; 7 | 8 | 9 | procedure RIRegisterTSPEEDBUTTON(Cl: TPSRuntimeClassImporter); 10 | procedure RIRegisterTBITBTN(Cl: TPSRuntimeClassImporter); 11 | 12 | procedure RIRegister_Buttons(Cl: TPSRuntimeClassImporter); 13 | 14 | implementation 15 | uses 16 | Classes{$IFDEF CLX}, QControls, QButtons{$ELSE}, Controls, Buttons{$ENDIF}; 17 | 18 | procedure RIRegisterTSPEEDBUTTON(Cl: TPSRuntimeClassImporter); 19 | begin 20 | Cl.Add(TSPEEDBUTTON); 21 | end; 22 | 23 | 24 | procedure RIRegisterTBITBTN(Cl: TPSRuntimeClassImporter); 25 | begin 26 | Cl.Add(TBITBTN); 27 | end; 28 | 29 | procedure RIRegister_Buttons(Cl: TPSRuntimeClassImporter); 30 | begin 31 | RIRegisterTSPEEDBUTTON(cl); 32 | RIRegisterTBITBTN(cl); 33 | end; 34 | 35 | // PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl) 36 | 37 | 38 | end. 39 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSR_comobj.pas: -------------------------------------------------------------------------------- 1 | 2 | 3 | unit uPSR_comobj; 4 | 5 | {$I PascalScript.inc} 6 | interface 7 | uses 8 | uPSRuntime, uPSUtils; 9 | 10 | 11 | procedure RIRegister_ComObj(cl: TPSExec); 12 | 13 | implementation 14 | {$IFDEF FPC} 15 | {$IFDEF PS_FPC_HAS_COM} 16 | uses SysUtils, ComObj; 17 | {$ENDIF} 18 | {$ELSE} 19 | {$IFDEF DELPHI3UP} 20 | uses ComObj; 21 | {$ELSE} 22 | uses SysUtils, Ole2; 23 | {$ENDIF} 24 | {$ENDIF} 25 | {$IFNDEF DELPHI3UP} 26 | 27 | {$IFDEF DELPHI3UP } 28 | resourceString 29 | {$ELSE } 30 | const 31 | {$ENDIF } 32 | 33 | RPS_OLEError = 'OLE error %.8x'; 34 | function OleErrorMessage(ErrorCode: HResult): String; 35 | begin 36 | Result := SysErrorMessage(ErrorCode); 37 | if Result = '' then 38 | Result := Format(RPS_OLEError, [ErrorCode]); 39 | end; 40 | 41 | procedure OleError(ErrorCode: HResult); 42 | begin 43 | raise Exception.Create(OleErrorMessage(ErrorCode)); 44 | end; 45 | 46 | procedure OleCheck(Result: HResult); 47 | begin 48 | if Result < 0 then OleError(Result); 49 | end; 50 | 51 | procedure CreateOleObject(const ClassName: string; var Disp: IDispatch); 52 | var 53 | OldDisp: IDispatch; 54 | ClassID: TCLSID; 55 | WideCharBuf: array[0..127] of WideChar; 56 | begin 57 | StringToWideChar(ClassName, WideCharBuf, SizeOf(WideCharBuf) div SizeOf(WideCharBuf[0])); 58 | OleCheck(CLSIDFromProgID(WideCharBuf, ClassID)); 59 | if Disp <> nil then 60 | begin 61 | OldDisp := Disp; 62 | Disp := nil; 63 | OldDisp.Release; 64 | end; 65 | OleCheck(CoCreateInstance(ClassID, nil, CLSCTX_INPROC_SERVER or 66 | CLSCTX_LOCAL_SERVER, IID_IDispatch, Disp)); 67 | end; 68 | 69 | procedure GetActiveOleObject(const ClassName: string; var Disp: IDispatch); 70 | var 71 | Unknown: IUnknown; 72 | OldDisp: IDispatch; 73 | ClassID: TCLSID; 74 | WideCharBuf: array[0..127] of WideChar; 75 | begin 76 | StringToWideChar(ClassName, WideCharBuf, SizeOf(WideCharBuf) div SizeOf(WideCharBuf[0])); 77 | OleCheck(CLSIDFromProgID(WideCharBuf, ClassID)); 78 | OleCheck(GetActiveObject(ClassID, nil, Unknown)); 79 | try 80 | if Disp <> nil then 81 | begin 82 | OldDisp := Disp; 83 | Disp := nil; 84 | OldDisp.Release; 85 | end; 86 | OleCheck(Unknown.QueryInterface(IID_IDispatch, Disp)); 87 | finally 88 | Unknown.Release; 89 | end; 90 | end; 91 | 92 | {$ENDIF} 93 | 94 | 95 | procedure RIRegister_ComObj(cl: TPSExec); 96 | begin 97 | {$IFDEF FPC} 98 | {$IFDEF PS_FPC_HAS_COM} 99 | cl.RegisterDelphiFunction(@OleCheck, 'OleCheck', cdRegister); 100 | cl.RegisterDelphiFunction(@StringToGUID, 'StringToGUID', cdRegister); 101 | cl.RegisterDelphiFunction(@CreateComObject, 'CreateComObject', cdRegister); 102 | cl.RegisterDelphiFunction(@CreateOleObject, 'CREATEOLEOBJECT', cdRegister); 103 | cl.RegisterDelphiFunction(@GetActiveOleObject, 'GETACTIVEOLEOBJECT', cdRegister); 104 | {$ENDIF} 105 | {$ELSE} 106 | cl.RegisterDelphiFunction(@OleCheck, 'OleCheck', cdRegister); 107 | {$IFNDEF PS_NOINTERFACES} 108 | {$IFDEF DELPHI3UP} 109 | cl.RegisterDelphiFunction(@StringToGUID, 'StringToGUID', cdRegister); 110 | cl.RegisterDelphiFunction(@CreateComObject, 'CreateComObject', cdRegister); 111 | {$ENDIF} 112 | {$ENDIF} 113 | cl.RegisterDelphiFunction(@CreateOleObject, 'CREATEOLEOBJECT', cdRegister); 114 | cl.RegisterDelphiFunction(@GetActiveOleObject, 'GETACTIVEOLEOBJECT', cdRegister); 115 | {$ENDIF} 116 | end; 117 | 118 | end. 119 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSR_dateutils.pas: -------------------------------------------------------------------------------- 1 | 2 | unit uPSR_dateutils; 3 | {$I PascalScript.inc} 4 | interface 5 | uses 6 | SysUtils, uPSRuntime; 7 | 8 | 9 | 10 | procedure RegisterDateTimeLibrary_R(S: TPSExec); 11 | 12 | implementation 13 | 14 | function TryEncodeDate(Year, Month, Day: Word; var Date: TDateTime): Boolean; 15 | begin 16 | try 17 | Date := EncodeDate(Year, Month, Day); 18 | Result := true; 19 | except 20 | Result := false; 21 | end; 22 | end; 23 | 24 | function TryEncodeTime(Hour, Min, Sec, MSec: Word; var Time: TDateTime): Boolean; 25 | begin 26 | try 27 | Time := EncodeTime(hour, Min, Sec, MSec); 28 | Result := true; 29 | except 30 | Result := false; 31 | end; 32 | end; 33 | 34 | function DateTimeToUnix(D: TDateTime): Int64; 35 | begin 36 | Result := Round((D - 25569) * 86400); 37 | end; 38 | 39 | function UnixToDateTime(U: Int64): TDateTime; 40 | begin 41 | Result := U / 86400 + 25569; 42 | end; 43 | 44 | procedure RegisterDateTimeLibrary_R(S: TPSExec); 45 | begin 46 | S.RegisterDelphiFunction(@EncodeDate, 'ENCODEDATE', cdRegister); 47 | S.RegisterDelphiFunction(@EncodeTime, 'ENCODETIME', cdRegister); 48 | S.RegisterDelphiFunction(@TryEncodeDate, 'TRYENCODEDATE', cdRegister); 49 | S.RegisterDelphiFunction(@TryEncodeTime, 'TRYENCODETIME', cdRegister); 50 | S.RegisterDelphiFunction(@DecodeDate, 'DECODEDATE', cdRegister); 51 | S.RegisterDelphiFunction(@DecodeTime, 'DECODETIME', cdRegister); 52 | S.RegisterDelphiFunction(@DayOfWeek, 'DAYOFWEEK', cdRegister); 53 | S.RegisterDelphiFunction(@Date, 'DATE', cdRegister); 54 | S.RegisterDelphiFunction(@Time, 'TIME', cdRegister); 55 | S.RegisterDelphiFunction(@Now, 'NOW', cdRegister); 56 | S.RegisterDelphiFunction(@DateTimeToUnix, 'DATETIMETOUNIX', cdRegister); 57 | S.RegisterDelphiFunction(@UnixToDateTime, 'UNIXTODATETIME', cdRegister); 58 | S.RegisterDelphiFunction(@DateToStr, 'DATETOSTR', cdRegister); 59 | S.RegisterDelphiFunction(@FormatDateTime, 'FORMATDATETIME', cdRegister); 60 | S.RegisterDelphiFunction(@StrToDate, 'STRTODATE', cdRegister); 61 | end; 62 | 63 | end. 64 | -------------------------------------------------------------------------------- /pascalscript/Source/uPSR_std.pas: -------------------------------------------------------------------------------- 1 | 2 | unit uPSR_std; 3 | {$I PascalScript.inc} 4 | interface 5 | uses 6 | uPSRuntime, uPSUtils; 7 | 8 | 9 | procedure RIRegisterTObject(CL: TPSRuntimeClassImporter); 10 | procedure RIRegisterTPersistent(Cl: TPSRuntimeClassImporter); 11 | procedure RIRegisterTComponent(Cl: TPSRuntimeClassImporter); 12 | procedure RIRegister_Std(Cl: TPSRuntimeClassImporter); 13 | 14 | implementation 15 | uses 16 | Classes; 17 | 18 | 19 | 20 | procedure RIRegisterTObject(CL: TPSRuntimeClassImporter); 21 | begin 22 | with cl.Add(TObject) do 23 | begin 24 | RegisterConstructor(@TObject.Create, 'CREATE'); 25 | RegisterMethod(@TObject.Free, 'FREE'); 26 | end; 27 | end; 28 | 29 | procedure RIRegisterTPersistent(Cl: TPSRuntimeClassImporter); 30 | begin 31 | with Cl.Add(TPersistent) do 32 | begin 33 | RegisterVirtualMethod(@TPersistent.Assign, 'ASSIGN'); 34 | end; 35 | end; 36 | 37 | procedure TComponentOwnerR(Self: TComponent; var T: TComponent); begin T := Self.Owner; end; 38 | 39 | 40 | procedure TCOMPONENTCOMPONENTS_R(Self: TCOMPONENT; var T: TCOMPONENT; t1: INTEGER); begin T := Self.COMPONENTS[t1]; end; 41 | procedure TCOMPONENTCOMPONENTCOUNT_R(Self: TCOMPONENT; var T: INTEGER); begin t := Self.COMPONENTCOUNT; end; 42 | procedure TCOMPONENTCOMPONENTINDEX_R(Self: TCOMPONENT; var T: INTEGER); begin t := Self.COMPONENTINDEX; end; 43 | procedure TCOMPONENTCOMPONENTINDEX_W(Self: TCOMPONENT; T: INTEGER); begin Self.COMPONENTINDEX := t; end; 44 | procedure TCOMPONENTCOMPONENTSTATE_R(Self: TCOMPONENT; var T: TCOMPONENTSTATE); begin t := Self.COMPONENTSTATE; end; 45 | procedure TCOMPONENTDESIGNINFO_R(Self: TCOMPONENT; var T: LONGINT); begin t := Self.DESIGNINFO; end; 46 | procedure TCOMPONENTDESIGNINFO_W(Self: TCOMPONENT; T: LONGINT); begin Self.DESIGNINFO := t; end; 47 | 48 | 49 | procedure RIRegisterTComponent(Cl: TPSRuntimeClassImporter); 50 | begin 51 | with Cl.Add(TComponent) do 52 | begin 53 | RegisterMethod(@TComponent.FindComponent, 'FINDCOMPONENT'); 54 | RegisterVirtualConstructor(@TComponent.Create, 'CREATE'); 55 | RegisterPropertyHelper(@TComponentOwnerR, nil, 'OWNER'); 56 | 57 | RegisterMethod(@TCOMPONENT.DESTROYCOMPONENTS, 'DESTROYCOMPONENTS'); 58 | RegisterPropertyHelper(@TCOMPONENTCOMPONENTS_R, nil, 'COMPONENTS'); 59 | RegisterPropertyHelper(@TCOMPONENTCOMPONENTCOUNT_R, nil, 'COMPONENTCOUNT'); 60 | RegisterPropertyHelper(@TCOMPONENTCOMPONENTINDEX_R, @TCOMPONENTCOMPONENTINDEX_W, 'COMPONENTINDEX'); 61 | RegisterPropertyHelper(@TCOMPONENTCOMPONENTSTATE_R, nil, 'COMPONENTSTATE'); 62 | RegisterPropertyHelper(@TCOMPONENTDESIGNINFO_R, @TCOMPONENTDESIGNINFO_W, 'DESIGNINFO'); 63 | end; 64 | end; 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | procedure RIRegister_Std(Cl: TPSRuntimeClassImporter); 73 | begin 74 | RIRegisterTObject(CL); 75 | RIRegisterTPersistent(Cl); 76 | RIRegisterTComponent(Cl); 77 | end; 78 | // PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl) 79 | 80 | end. 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /pascalscript/unit-importing/CMDimp.lpi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <i18n> 19 | <EnableI18N LFM="False"/> 20 | </i18n> 21 | <VersionInfo> 22 | <StringTable ProductVersion=""/> 23 | </VersionInfo> 24 | <BuildModes Count="1"> 25 | <Item1 Name="Default" Default="True"/> 26 | </BuildModes> 27 | <PublishOptions> 28 | <Version Value="2"/> 29 | </PublishOptions> 30 | <RunParams> 31 | <local> 32 | <FormatVersion Value="1"/> 33 | <CommandLineParams Value="c:\lazarus\lcl\graphics.pp"/> 34 | </local> 35 | </RunParams> 36 | <RequiredPackages Count="2"> 37 | <Item1> 38 | <PackageName Value="PascalScriptFCL"/> 39 | </Item1> 40 | <Item2> 41 | <PackageName Value="LCL"/> 42 | </Item2> 43 | </RequiredPackages> 44 | <Units Count="3"> 45 | <Unit0> 46 | <Filename Value="CMDimp.lpr"/> 47 | <IsPartOfProject Value="True"/> 48 | </Unit0> 49 | <Unit1> 50 | <Filename Value="ParserU.pas"/> 51 | <IsPartOfProject Value="True"/> 52 | <UnitName Value="ParserU"/> 53 | </Unit1> 54 | <Unit2> 55 | <Filename Value="ParserUtils.pas"/> 56 | <IsPartOfProject Value="True"/> 57 | <UnitName Value="ParserUtils"/> 58 | </Unit2> 59 | </Units> 60 | </ProjectOptions> 61 | <CompilerOptions> 62 | <Version Value="11"/> 63 | <PathDelim Value="\"/> 64 | <SearchPaths> 65 | <IncludeFiles Value="$(ProjOutDir);..\Source"/> 66 | <OtherUnitFiles Value="..\Source"/> 67 | </SearchPaths> 68 | <Parsing> 69 | <SyntaxOptions> 70 | <SyntaxMode Value="Delphi"/> 71 | </SyntaxOptions> 72 | </Parsing> 73 | <Other> 74 | <CompilerMessages> 75 | <MsgFileName Value=""/> 76 | </CompilerMessages> 77 | <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up"/> 78 | <CompilerPath Value="$(CompPath)"/> 79 | </Other> 80 | </CompilerOptions> 81 | <Debugging> 82 | <Exceptions Count="3"> 83 | <Item1> 84 | <Name Value="EAbort"/> 85 | </Item1> 86 | <Item2> 87 | <Name Value="ECodetoolError"/> 88 | </Item2> 89 | <Item3> 90 | <Name Value="EFOpenError"/> 91 | </Item3> 92 | </Exceptions> 93 | </Debugging> 94 | </CONFIG> 95 | -------------------------------------------------------------------------------- /pascalscript/unit-importing/CMDimp.lpr: -------------------------------------------------------------------------------- 1 | program CMDimp; 2 | 3 | {$MODE Delphi} 4 | 5 | {$APPTYPE CONSOLE} 6 | 7 | uses 8 | SysUtils, 9 | Classes, 10 | ParserU in 'ParserU.pas', 11 | ParserUtils in 'ParserUtils.pas'; 12 | 13 | var 14 | s: TStringList; 15 | x: TUnitParser; 16 | 17 | begin 18 | if ParamCount = 0 then 19 | begin 20 | Writeln('Command Line Unit Importing'); 21 | writeln; 22 | writeln('cmdimp <filename>'); 23 | halt(1); 24 | end; 25 | Writeln(ParamStr(1)); 26 | s := TStringList.Create; 27 | try 28 | s.LoadFromFile(Paramstr(1)); 29 | x := TUnitParser.Create(''); 30 | x.Unitname := ExtractFileName(paramstr(1)); 31 | x.SingleUnit := true; 32 | x.ParseUnit(s.Text); 33 | x.SaveToPath(ExtractFilePath(Paramstr(1))); 34 | x.AutoRenameOverloadedMethods := true; 35 | Writeln('Successfully processed. Saved to file: '+ExtractFilePath(Paramstr(1))+x.UnitNameCmp); 36 | 37 | finally 38 | s.Free; 39 | end; 40 | end. 41 | -------------------------------------------------------------------------------- /pascalscript/unit-importing/TB_ReadMe.txt: -------------------------------------------------------------------------------- 1 | 2 | A modified UnitParser which creates a single import unit 3 | --------------------------------------------------------- 4 | IFPS3 1.21 5 | Delphi 7 Enterprise 6 | --------------------------------------------------------- 7 | 8 | Hi there 9 | 10 | I've modified the "imp" application a little. 11 | The "imp" application is written by M. Knight. 12 | 13 | Mainly I've added the private 14 | procedure FinishParseSingleUnit; 15 | to the ParserU.TUnitParser 16 | 17 | Now the UnitParser, (if the -added property- 18 | SingleUnit is True), creates a single import unit file 19 | after parsing the source file. 20 | 21 | The produced import file is given the name 22 | UnitPrefix + '_' + SourceUnitName + '.pas' 23 | when SingleUnit is True 24 | 25 | Also the 26 | procedure TUnitParser.SaveToPath(const Path: string); 27 | is added in order to save the produced file 28 | (or files if SingleUnit is False) 29 | 30 | When SingleUnit is True the produced import file 31 | contains 32 | the compile-time registration code 33 | the run-time registration code 34 | and a TIFPS3Plugin descendant, say TImport_XXX, 35 | which imports the registration code 36 | 37 | In order to use the produced import file, add 38 | its name to a uses clause and then code 39 | XXX_Importer := TImport_XXX.Create(Self); 40 | TIFPS3CEPluginItem(Debugger.Plugins.Add).Plugin := XXX_Importer; 41 | or just install TImport_XXX as a component, 42 | drop it on a form, etc. etc... 43 | 44 | I prefer the first method since it's more flexible 45 | and I modify my units all the time. 46 | 47 | Also, I've created an import file for the DBClient.pas 48 | since I use the TClientDataset too often. 49 | The DBClientImport folder contains the -truncated- 50 | source of the DBClient.pas (that's all the code I import) 51 | and the produced import file. You may take a look. 52 | 53 | 54 | Theo Bebekis 55 | teo@epektasis.gr 56 | 57 | -------------------------------------------------------------------------------- /pascalscript/unit-importing/conv.ini: -------------------------------------------------------------------------------- 1 | [TObject] 2 | [TPersistent] 3 | PARENT-CLASS=TObject 4 | [TComponent] 5 | PARENT-CLASS=TPersistent 6 | [TControl] 7 | PARENT-CLASS=TComponent 8 | Caption=READWRITE String 9 | Color=READWRITE Longint 10 | DragCursor=READWRITE Longint 11 | DragMode=READWRITE TDragMode 12 | Font=READWRITE TFont 13 | ParentColor=READWRITE Boolean 14 | ParentFont=READWRITE Boolean 15 | ParentShowHint=READWRITE Boolean 16 | PopupMenu=READWRITE TPopupMenu 17 | Text=READWRITE string 18 | OnClick=READWRITE TNotifyEvent 19 | OnDblClick=READWRITE TNotifyEvent 20 | OnDragDrop=READWRITE TDragDropEvent 21 | OnDragOver=READWRITE TDragOverEvent 22 | OnEndDrag=READWRITE TEndDragEvent 23 | OnMouseDown=READWRITE TMouseEvent 24 | OnMouseMove=READWRITE TMouseMoveEvent 25 | OnMouseUp=READWRITE TMouseEvent 26 | OnStartDrag=READWRITE TStartDragEvent 27 | Align= 28 | BoundsRect= 29 | ClientHeight= 30 | ClientOrigin= 31 | ClientRect= 32 | ClientWidth= 33 | ControlState= 34 | ControlSTyle= 35 | Parent= 36 | ShowHint= 37 | Visible= 38 | Enabled= 39 | Left= 40 | Top= 41 | Width= 42 | Height= 43 | Cursor= 44 | Hint= 45 | [TWinControl] 46 | PARENT-CLASS=TControl 47 | Ctl3D=READWRITE Boolean 48 | DefWndProc= 49 | ParentCtl3D=READWRITE Boolean 50 | WindowHandle=READWRITE Integer 51 | OnEnter=READWRITE TNotifyEvent 52 | OnExit=READWRITE TNotifyEvent 53 | OnKeyDown=READWRITE TKeyEvent 54 | OnKeyPress=READWRITE TKeyPressEvent 55 | OnKeyUp=READWRITE TKeyEvent 56 | Brush= 57 | Handle= 58 | Showing= 59 | TabOrder= 60 | TabStop= 61 | HelpContext= 62 | [TCustomLabel] 63 | PARENT-CLASS=TWinControl 64 | Alignment=READWRITE TAlignment 65 | AutoSize=READWRITE Boolean 66 | FocusControl=READWRITE TWinControl 67 | ShowAccelChar=READWRITE Boolean 68 | Transparent=READWRITE Boolean 69 | WordWrap=READWRITE Boolean 70 | [TCustomEdit] 71 | PARENT-CLASS=TWinControl 72 | AutoSelect=READWRITE Boolean 73 | AutoSize=READWRITE Boolean 74 | BorderStyle=READWRITE BorderStyle 75 | CharCase=READWRITE TEditCharCase 76 | HideSelection=READWRITE Boolean 77 | MaxLength=READWRITE Integer 78 | OEMConvert=READWRITE Boolean 79 | PasswordChar=READWRITE Char 80 | ReadOnly=READWRITE Boolean 81 | OnChange=READWRITE TNotifyEvent 82 | [TCustomMemo] 83 | PARENT-CLASS=TCustomEdit 84 | Alignment=READWRITE TAlignment 85 | ScrollBars=READWRITE TScrollStyle 86 | WantReturns=READWRITE Boolean 87 | WantTabs=READWRITE Boolean 88 | WordWrap=READWRITE Boolean 89 | [TCustomComboBox] 90 | PARENT-CLASS=TWinControl 91 | DropDownCount=READWRITE Integer 92 | EditHandle=READ Integer 93 | ItemHeight=READWRITE Integer 94 | ListHandle=READ Integer 95 | MaxLength=READWRITE Integer 96 | Sorted=READWRITE Boolean 97 | Style=READWRITE TComboBoxStyle 98 | OnChange=READWRITE TNotifyEvent 99 | OnDropDown=READWRITE TNotifyEvent 100 | OnDrawItem=READWRITE TDrawItemEvent 101 | OnMeasureItem=READWRITE TMeasureItemEvent 102 | Canvas= 103 | DroppedDown= 104 | Items= 105 | ItemIndex= 106 | SelStart= 107 | SelStart= 108 | SelText= 109 | [TCustomCheckbox] 110 | PARENT-CLASS=TWinControl 111 | Alignment=READWRITE TAlignment 112 | AllowGrayed=READWRITE Boolean 113 | Checked=READWRITE Boolean 114 | State=READWRITE TCheckBoxState 115 | [TcustomListbox] 116 | PARENT-CLASS=TWinControl 117 | BorderStyle=READWRITE TBorderStyle 118 | Columns=READWRITE Integer 119 | ExtendedSelect=READWRITE Boolean 120 | IntegralHeight=READWRITE Boolean 121 | ItemHeight=READWRITE Integer 122 | MultiSelect=READWRITE Boolean 123 | Sorted=READWRITE Boolean 124 | Style=READWRITE TListBoxStyle 125 | TabWidth=READWRITE Integer 126 | OnDrawItem=READWRITE TDrawItemEvent 127 | OnMeasureItem=READWRITE TMeasureItemEvent 128 | Canvas= 129 | Items= 130 | ItemIndex= 131 | SelCount= 132 | Selected= 133 | TopIndex= 134 | --------------------------------------------------------------------------------