1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-21 08:45:06 -05:00

CrLf stuff

This commit is contained in:
unknown 2010-03-20 12:41:32 +01:00
parent 41d277fb06
commit 1f97fd627a
18 changed files with 8058 additions and 8058 deletions

View File

@ -1,9 +1,9 @@
pause,stop: From Lazarus (http://lazarus.freepascal.org)
exit,cut,page_new,new,open,paste,redo,run,save,undo,help,bug,arrow_refresh,html: Mark James http://www.famfamfam.com/lab/icons/silk/
closetab,closetabs,addtab,eraser,terminate,terminal: Yusuke Kamiyamane http://www.pinvoke.com/
pickcolor: From the Crystal Clear Project (http://www.everaldo.com/crystal/) licensed under LGPL
crosshair: http://led24.de/iconset/ or http://led24.de/ would be appreciated. Follow us on twitter http://twitter.com/gasyoun or email leds24@gmail.com 512 icons 20/05/2009
Delete: http://www.oxygen-icons.org/ licensed under GPL
close:http://titancreations.org/
pause,stop: From Lazarus (http://lazarus.freepascal.org)
exit,cut,page_new,new,open,paste,redo,run,save,undo,help,bug,arrow_refresh,html: Mark James http://www.famfamfam.com/lab/icons/silk/
closetab,closetabs,addtab,eraser,terminate,terminal: Yusuke Kamiyamane http://www.pinvoke.com/
pickcolor: From the Crystal Clear Project (http://www.everaldo.com/crystal/) licensed under LGPL
crosshair: http://led24.de/iconset/ or http://led24.de/ would be appreciated. Follow us on twitter http://twitter.com/gasyoun or email leds24@gmail.com 512 icons 20/05/2009
Delete: http://www.oxygen-icons.org/ licensed under GPL
close:http://titancreations.org/
search: http://wefunction.com/2008/07/function-free-icon-set

View File

@ -1,7 +1,7 @@
const
TestStr = 'Hai, seems like you got includes working!';
function Multiply(a,b : integer) : integer;
begin;
result := a*b;
const
TestStr = 'Hai, seems like you got includes working!';
function Multiply(a,b : integer) : integer;
begin;
result := a*b;
end;

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="CompanyName.ProductName.YourApp" type="win32"/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="CompanyName.ProductName.YourApp" type="win32"/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@ -1,7 +1,7 @@
#define RT_MANIFEST 24
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "project1.manifest"
MAINICON ICON "project1.ico"
#define RT_MANIFEST 24
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "project1.manifest"
MAINICON ICON "project1.ico"

View File

@ -1,394 +1,394 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="7"/>
<General>
<MainUnit Value="0"/>
<TargetFileExt Value=""/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
<Language Value=""/>
<CharSet Value=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="23">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="project1"/>
<UsageCount Value="69"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<CursorPos X="25" Y="165"/>
<TopLine Value="146"/>
<EditorIndex Value="0"/>
<UsageCount Value="69"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../SAMufasaGUI/colourhistory.pas"/>
<ComponentName Value="ColourHistoryForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="colourhistory"/>
<CursorPos X="10" Y="457"/>
<TopLine Value="437"/>
<UsageCount Value="11"/>
</Unit2>
<Unit3>
<Filename Value="../SAMufasaGUI/testunit.pas"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/>
<CursorPos X="38" Y="405"/>
<TopLine Value="382"/>
<UsageCount Value="8"/>
</Unit3>
<Unit4>
<Filename Value="../../Units/MMLCore/client.pas"/>
<UnitName Value="Client"/>
<CursorPos X="27" Y="48"/>
<TopLine Value="30"/>
<EditorIndex Value="7"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<UnitName Value="ocr"/>
<CursorPos X="73" Y="16"/>
<TopLine Value="1"/>
<EditorIndex Value="9"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<UnitName Value="bitmaps"/>
<CursorPos X="18" Y="81"/>
<TopLine Value="47"/>
<EditorIndex Value="14"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<UnitName Value="ocrutil"/>
<CursorPos X="39" Y="208"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="../../../Documents/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc"/>
<CursorPos X="41" Y="1226"/>
<TopLine Value="1205"/>
<UsageCount Value="8"/>
</Unit8>
<Unit9>
<Filename Value="../../Units/MMLAddon/tpa.pas"/>
<UnitName Value="tpa"/>
<CursorPos X="5" Y="557"/>
<TopLine Value="535"/>
<UsageCount Value="31"/>
</Unit9>
<Unit10>
<Filename Value="../../Units/MMLCore/mufasatypesutil.pas"/>
<UnitName Value="mufasatypesutil"/>
<CursorPos X="25" Y="8"/>
<TopLine Value="1"/>
<EditorIndex Value="12"/>
<UsageCount Value="31"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<UnitName Value="finder"/>
<CursorPos X="78" Y="455"/>
<TopLine Value="432"/>
<EditorIndex Value="8"/>
<UsageCount Value="28"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="../../../Documents/fpc/rtl/inc/objpash.inc"/>
<CursorPos X="48" Y="193"/>
<TopLine Value="1"/>
<UsageCount Value="8"/>
</Unit12>
<Unit13>
<Filename Value="../../../Documents/fpc/rtl/objpas/sysutils/finah.inc"/>
<CursorPos X="17" Y="40"/>
<TopLine Value="4"/>
<UsageCount Value="9"/>
</Unit13>
<Unit14>
<Filename Value="../../Units/MMLCore/files.pas"/>
<UnitName Value="files"/>
<CursorPos X="7" Y="103"/>
<TopLine Value="34"/>
<EditorIndex Value="11"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
</Unit14>
<Unit15>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<UnitName Value="colourpicker"/>
<CursorPos X="48" Y="238"/>
<TopLine Value="226"/>
<EditorIndex Value="1"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit15>
<Unit16>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<UnitName Value="windowselector"/>
<CursorPos X="1" Y="33"/>
<TopLine Value="12"/>
<EditorIndex Value="13"/>
<UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
<Filename Value="../../Units/MMLCore/window.pas"/>
<UnitName Value="Window"/>
<CursorPos X="94" Y="338"/>
<TopLine Value="323"/>
<UsageCount Value="15"/>
</Unit17>
<Unit18>
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
<UnitName Value="MufasaTypes"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="277"/>
<EditorIndex Value="5"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fontloader"/>
<CursorPos X="42" Y="106"/>
<TopLine Value="89"/>
<EditorIndex Value="10"/>
<UsageCount Value="24"/>
<Loaded Value="True"/>
</Unit19>
<Unit20>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<UnitName Value="os_linux"/>
<CursorPos X="48" Y="61"/>
<TopLine Value="37"/>
<EditorIndex Value="2"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit20>
<Unit21>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<UnitName Value="IOManager"/>
<CursorPos X="87" Y="102"/>
<TopLine Value="227"/>
<EditorIndex Value="4"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit21>
<Unit22>
<Filename Value="../../Units/MMLCore/os_windows.pas"/>
<UnitName Value="os_windows"/>
<CursorPos X="65" Y="64"/>
<TopLine Value="45"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit22>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="22" TopLine="69"/>
</Position1>
<Position2>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="73" Column="41" TopLine="55"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="11" Column="24" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="unit1.pas"/>
<Caret Line="91" Column="11" TopLine="71"/>
</Position4>
<Position5>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="48" Column="27" TopLine="30"/>
</Position5>
<Position6>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="69" Column="35" TopLine="51"/>
</Position6>
<Position7>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="41" Column="32" TopLine="34"/>
</Position7>
<Position8>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="66" Column="28" TopLine="45"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="6" TopLine="82"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="200" Column="37" TopLine="194"/>
</Position10>
<Position11>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="348" Column="85" TopLine="330"/>
</Position11>
<Position12>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="233" Column="33" TopLine="215"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="17" Column="73" TopLine="1"/>
</Position13>
<Position14>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="233" Column="33" TopLine="215"/>
</Position14>
<Position15>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="32" Column="16" TopLine="14"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="8" Column="99" TopLine="1"/>
</Position16>
<Position17>
<Filename Value="unit1.pas"/>
<Caret Line="12" Column="56" TopLine="5"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="29" TopLine="65"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
<Caret Line="36" Column="18" TopLine="18"/>
</Position19>
<Position20>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="69" Column="34" TopLine="56"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
<Caret Line="36" Column="18" TopLine="18"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="47" TopLine="70"/>
</Position22>
<Position23>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="226" Column="37" TopLine="196"/>
</Position23>
<Position24>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="60" TopLine="69"/>
</Position24>
<Position25>
<Filename Value="unit1.pas"/>
<Caret Line="95" Column="79" TopLine="70"/>
</Position25>
<Position26>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="191" Column="107" TopLine="170"/>
</Position26>
<Position27>
<Filename Value="unit1.pas"/>
<Caret Line="10" Column="8" TopLine="1"/>
</Position27>
<Position28>
<Filename Value="../../Units/MMLCore/os_windows.pas"/>
<Caret Line="167" Column="15" TopLine="144"/>
</Position28>
<Position29>
<Filename Value="unit1.pas"/>
<Caret Line="9" Column="38" TopLine="1"/>
</Position29>
<Position30>
<Filename Value="unit1.pas"/>
<Caret Line="10" Column="32" TopLine="1"/>
</Position30>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)/;$(ProjPath)../../Units/MMLAddon/PSInc/"/>
<OtherUnitFiles Value="$(ProjPath)../../Units/MMLCore/;$(ProjPath)../../Units/MMLAddon/;$(ProjPath)../../Units/PascalScript/;$(ProjPath)../../Units/Misc/;$(ProjPath)../../Units/MMLAddon/PSInc/;$(ProjPath)../../Units/Linux/;$(LazarusDir)/components/mouseandkeyinput/"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="True"/>
</Debugging>
</Linking>
<Other>
<CustomOptions Value="-dOCRDEBUG"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="7"/>
<General>
<MainUnit Value="0"/>
<TargetFileExt Value=""/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
<Language Value=""/>
<CharSet Value=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="23">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="project1"/>
<UsageCount Value="69"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<CursorPos X="25" Y="165"/>
<TopLine Value="146"/>
<EditorIndex Value="0"/>
<UsageCount Value="69"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../SAMufasaGUI/colourhistory.pas"/>
<ComponentName Value="ColourHistoryForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="colourhistory"/>
<CursorPos X="10" Y="457"/>
<TopLine Value="437"/>
<UsageCount Value="11"/>
</Unit2>
<Unit3>
<Filename Value="../SAMufasaGUI/testunit.pas"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/>
<CursorPos X="38" Y="405"/>
<TopLine Value="382"/>
<UsageCount Value="8"/>
</Unit3>
<Unit4>
<Filename Value="../../Units/MMLCore/client.pas"/>
<UnitName Value="Client"/>
<CursorPos X="27" Y="48"/>
<TopLine Value="30"/>
<EditorIndex Value="7"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<UnitName Value="ocr"/>
<CursorPos X="73" Y="16"/>
<TopLine Value="1"/>
<EditorIndex Value="9"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<UnitName Value="bitmaps"/>
<CursorPos X="18" Y="81"/>
<TopLine Value="47"/>
<EditorIndex Value="14"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<UnitName Value="ocrutil"/>
<CursorPos X="39" Y="208"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="../../../Documents/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc"/>
<CursorPos X="41" Y="1226"/>
<TopLine Value="1205"/>
<UsageCount Value="8"/>
</Unit8>
<Unit9>
<Filename Value="../../Units/MMLAddon/tpa.pas"/>
<UnitName Value="tpa"/>
<CursorPos X="5" Y="557"/>
<TopLine Value="535"/>
<UsageCount Value="31"/>
</Unit9>
<Unit10>
<Filename Value="../../Units/MMLCore/mufasatypesutil.pas"/>
<UnitName Value="mufasatypesutil"/>
<CursorPos X="25" Y="8"/>
<TopLine Value="1"/>
<EditorIndex Value="12"/>
<UsageCount Value="31"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<UnitName Value="finder"/>
<CursorPos X="78" Y="455"/>
<TopLine Value="432"/>
<EditorIndex Value="8"/>
<UsageCount Value="28"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="../../../Documents/fpc/rtl/inc/objpash.inc"/>
<CursorPos X="48" Y="193"/>
<TopLine Value="1"/>
<UsageCount Value="8"/>
</Unit12>
<Unit13>
<Filename Value="../../../Documents/fpc/rtl/objpas/sysutils/finah.inc"/>
<CursorPos X="17" Y="40"/>
<TopLine Value="4"/>
<UsageCount Value="9"/>
</Unit13>
<Unit14>
<Filename Value="../../Units/MMLCore/files.pas"/>
<UnitName Value="files"/>
<CursorPos X="7" Y="103"/>
<TopLine Value="34"/>
<EditorIndex Value="11"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
</Unit14>
<Unit15>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<UnitName Value="colourpicker"/>
<CursorPos X="48" Y="238"/>
<TopLine Value="226"/>
<EditorIndex Value="1"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit15>
<Unit16>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<UnitName Value="windowselector"/>
<CursorPos X="1" Y="33"/>
<TopLine Value="12"/>
<EditorIndex Value="13"/>
<UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
<Filename Value="../../Units/MMLCore/window.pas"/>
<UnitName Value="Window"/>
<CursorPos X="94" Y="338"/>
<TopLine Value="323"/>
<UsageCount Value="15"/>
</Unit17>
<Unit18>
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
<UnitName Value="MufasaTypes"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="277"/>
<EditorIndex Value="5"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fontloader"/>
<CursorPos X="42" Y="106"/>
<TopLine Value="89"/>
<EditorIndex Value="10"/>
<UsageCount Value="24"/>
<Loaded Value="True"/>
</Unit19>
<Unit20>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<UnitName Value="os_linux"/>
<CursorPos X="48" Y="61"/>
<TopLine Value="37"/>
<EditorIndex Value="2"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit20>
<Unit21>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<UnitName Value="IOManager"/>
<CursorPos X="87" Y="102"/>
<TopLine Value="227"/>
<EditorIndex Value="4"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit21>
<Unit22>
<Filename Value="../../Units/MMLCore/os_windows.pas"/>
<UnitName Value="os_windows"/>
<CursorPos X="65" Y="64"/>
<TopLine Value="45"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit22>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="22" TopLine="69"/>
</Position1>
<Position2>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="73" Column="41" TopLine="55"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="11" Column="24" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="unit1.pas"/>
<Caret Line="91" Column="11" TopLine="71"/>
</Position4>
<Position5>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="48" Column="27" TopLine="30"/>
</Position5>
<Position6>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="69" Column="35" TopLine="51"/>
</Position6>
<Position7>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="41" Column="32" TopLine="34"/>
</Position7>
<Position8>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="66" Column="28" TopLine="45"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="6" TopLine="82"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="200" Column="37" TopLine="194"/>
</Position10>
<Position11>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="348" Column="85" TopLine="330"/>
</Position11>
<Position12>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="233" Column="33" TopLine="215"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="17" Column="73" TopLine="1"/>
</Position13>
<Position14>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="233" Column="33" TopLine="215"/>
</Position14>
<Position15>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="32" Column="16" TopLine="14"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="8" Column="99" TopLine="1"/>
</Position16>
<Position17>
<Filename Value="unit1.pas"/>
<Caret Line="12" Column="56" TopLine="5"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="29" TopLine="65"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
<Caret Line="36" Column="18" TopLine="18"/>
</Position19>
<Position20>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="69" Column="34" TopLine="56"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
<Caret Line="36" Column="18" TopLine="18"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="47" TopLine="70"/>
</Position22>
<Position23>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="226" Column="37" TopLine="196"/>
</Position23>
<Position24>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="60" TopLine="69"/>
</Position24>
<Position25>
<Filename Value="unit1.pas"/>
<Caret Line="95" Column="79" TopLine="70"/>
</Position25>
<Position26>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="191" Column="107" TopLine="170"/>
</Position26>
<Position27>
<Filename Value="unit1.pas"/>
<Caret Line="10" Column="8" TopLine="1"/>
</Position27>
<Position28>
<Filename Value="../../Units/MMLCore/os_windows.pas"/>
<Caret Line="167" Column="15" TopLine="144"/>
</Position28>
<Position29>
<Filename Value="unit1.pas"/>
<Caret Line="9" Column="38" TopLine="1"/>
</Position29>
<Position30>
<Filename Value="unit1.pas"/>
<Caret Line="10" Column="32" TopLine="1"/>
</Position30>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)/;$(ProjPath)../../Units/MMLAddon/PSInc/"/>
<OtherUnitFiles Value="$(ProjPath)../../Units/MMLCore/;$(ProjPath)../../Units/MMLAddon/;$(ProjPath)../../Units/PascalScript/;$(ProjPath)../../Units/Misc/;$(ProjPath)../../Units/MMLAddon/PSInc/;$(ProjPath)../../Units/Linux/;$(LazarusDir)/components/mouseandkeyinput/"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="True"/>
</Debugging>
</Linking>
<Other>
<CustomOptions Value="-dOCRDEBUG"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -1,22 +1,22 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms
{ you can add units after this }, Unit1, LResources;
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
begin
Application.Title:='TestApp';
{$I project1.lrs}
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms
{ you can add units after this }, Unit1, LResources;
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
begin
Application.Title:='TestApp';
{$I project1.lrs}
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="CompanyName.ProductName.YourApp" type="win32"/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="CompanyName.ProductName.YourApp" type="win32"/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@ -1,45 +1,45 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TColourHistoryForm','FORMDATA',[
'TPF0'#18'TColourHistoryForm'#17'ColourHistoryForm'#4'Left'#3'v'#1#6'Height'#3
+#4#1#3'Top'#3'O'#1#5'Width'#3#243#1#13'ActiveControl'#7#13'SelectionName'#7
+'Caption'#6#21'Colour Picker History'#12'ClientHeight'#3#240#0#11'ClientWidt'
+'h'#3#243#1#21'Constraints.MinHeight'#3#200#0#20'Constraints.MinWidth'#3#234
+#1#4'Menu'#7#10'CHMainMenu'#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#15'UnSe'
+'tCHShowMenu'#6'OnShow'#7#13'SetCHShowMenu'#10'LCLVersion'#6#6'0.9.29'#0#7'T'
+'Button'#12'DeleteButton'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#198#0#5'Width'
+#3#128#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#6'Delete'#7'OnCl'
+'ick'#7#14'DeleteSelected'#8'TabOrder'#2#0#0#0#5'TEdit'#13'SelectionName'#4
+'Left'#3'r'#1#6'Height'#2#21#3'Top'#2#16#5'Width'#2'p'#7'Anchors'#11#5'akTop'
+#7'akRight'#0#8'OnChange'#7#10'ChangeName'#10'OnKeyPress'#7#21'SelectionName'
+'KeyPress'#8'TabOrder'#2#1#4'Text'#6#4'Name'#0#0#7'TButton'#19'PickNewColour'
+'Button'#4'Left'#3#226#0#6'Height'#2#25#3'Top'#3#198#0#5'Width'#3#128#0#7'An'
+'chors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#15'Pick New Colour'#8'TabOr'
+'der'#2#2#0#0#5'TEdit'#11'ColourValue'#4'Left'#3'r'#1#6'Height'#2#21#3'Top'#2
+'8'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'ReadOnly'#9#8'TabOrd'
+'er'#2#3#4'Text'#6#11'ColourValue'#0#0#6'TLabel'#10'CoordValue'#4'Left'#3'r'
+#1#6'Height'#2#14#3'Top'#2'`'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'
+#0#7'Caption'#6#10'CoordValue'#20'Constraints.MinWidth'#2'p'#11'ParentColor'
+#8#0#0#6'TImage'#11'ColourImage'#4'Left'#3#152#0#6'Height'#2#24#3'Top'#3#199
+#0#5'Width'#2'B'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#0#0#7'TBut'
+'ton'#8'OkButton'#4'Left'#3#146#1#6'Height'#2#24#3'Top'#3#199#0#5'Width'#2'P'
+#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'O'
+'kButtonClick'#8'TabOrder'#2#4#0#0#6'TLabel'#12'CH_RGB_Label'#4'Left'#3'r'#1
+#6'Height'#2#14#3'Top'#3#128#0#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRigh'
+'t'#0#7'Caption'#6#9'RGBValues'#20'Constraints.MinWidth'#2'p'#11'ParentColor'
+#8#0#0#9'TTreeView'#10'ColourTree'#4'Left'#2#8#6'Height'#3#159#0#3'Top'#2#16
+#5'Width'#3'Z'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17
+'DefaultItemHeight'#2#16#8'DragMode'#7#11'dmAutomatic'#6'Images'#7#8'CHImage'
+'s'#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#5#8'OnChange'#7#16'ColourT'
+'reeChange'#10'OnDragDrop'#7#18'ColourTreeDragDrop'#10'OnDragOver'#7#18'Colo'
+'urTreeDragOver'#0#0#10'TImageList'#8'CHImages'#4'left'#3#168#1#3'top'#3#160
+#0#0#0#9'TMainMenu'#10'CHMainMenu'#4'left'#3'h'#1#3'top'#3#160#0#0#9'TMenuIt'
+'em'#6'CHFile'#7'Caption'#6#4'File'#0#9'TMenuItem'#7'CHClear'#7'Caption'#6#5
+'Clear'#7'OnClick'#7#12'CHClearClick'#0#0#9'TMenuItem'#6'CHLoad'#7'Caption'#6
+#4'Load'#7'OnClick'#7#11'CHLoadClick'#0#0#9'TMenuItem'#6'CHSave'#7'Caption'#6
+#4'Save'#7'OnClick'#7#11'CHSaveClick'#0#0#0#9'TMenuItem'#6'CHHelp'#7'Caption'
+#6#4'Help'#0#9'TMenuItem'#7'CHAbout'#7'Caption'#6#5'About'#7'OnClick'#7#12'C'
+'HAboutClick'#0#0#0#0#11'TSaveDialog'#12'CHSaveDialog'#10'DefaultExt'#6#4'.x'
+'ml'#4'left'#3#136#1#3'top'#3#160#0#0#0#11'TOpenDialog'#12'CHOpenDialog'#10
+'DefaultExt'#6#4'.xml'#4'left'#3#200#1#3'top'#3#160#0#0#0#0
]);
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TColourHistoryForm','FORMDATA',[
'TPF0'#18'TColourHistoryForm'#17'ColourHistoryForm'#4'Left'#3'v'#1#6'Height'#3
+#4#1#3'Top'#3'O'#1#5'Width'#3#243#1#13'ActiveControl'#7#13'SelectionName'#7
+'Caption'#6#21'Colour Picker History'#12'ClientHeight'#3#240#0#11'ClientWidt'
+'h'#3#243#1#21'Constraints.MinHeight'#3#200#0#20'Constraints.MinWidth'#3#234
+#1#4'Menu'#7#10'CHMainMenu'#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#15'UnSe'
+'tCHShowMenu'#6'OnShow'#7#13'SetCHShowMenu'#10'LCLVersion'#6#6'0.9.29'#0#7'T'
+'Button'#12'DeleteButton'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#198#0#5'Width'
+#3#128#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#6'Delete'#7'OnCl'
+'ick'#7#14'DeleteSelected'#8'TabOrder'#2#0#0#0#5'TEdit'#13'SelectionName'#4
+'Left'#3'r'#1#6'Height'#2#21#3'Top'#2#16#5'Width'#2'p'#7'Anchors'#11#5'akTop'
+#7'akRight'#0#8'OnChange'#7#10'ChangeName'#10'OnKeyPress'#7#21'SelectionName'
+'KeyPress'#8'TabOrder'#2#1#4'Text'#6#4'Name'#0#0#7'TButton'#19'PickNewColour'
+'Button'#4'Left'#3#226#0#6'Height'#2#25#3'Top'#3#198#0#5'Width'#3#128#0#7'An'
+'chors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#15'Pick New Colour'#8'TabOr'
+'der'#2#2#0#0#5'TEdit'#11'ColourValue'#4'Left'#3'r'#1#6'Height'#2#21#3'Top'#2
+'8'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'ReadOnly'#9#8'TabOrd'
+'er'#2#3#4'Text'#6#11'ColourValue'#0#0#6'TLabel'#10'CoordValue'#4'Left'#3'r'
+#1#6'Height'#2#14#3'Top'#2'`'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'
+#0#7'Caption'#6#10'CoordValue'#20'Constraints.MinWidth'#2'p'#11'ParentColor'
+#8#0#0#6'TImage'#11'ColourImage'#4'Left'#3#152#0#6'Height'#2#24#3'Top'#3#199
+#0#5'Width'#2'B'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#0#0#7'TBut'
+'ton'#8'OkButton'#4'Left'#3#146#1#6'Height'#2#24#3'Top'#3#199#0#5'Width'#2'P'
+#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'O'
+'kButtonClick'#8'TabOrder'#2#4#0#0#6'TLabel'#12'CH_RGB_Label'#4'Left'#3'r'#1
+#6'Height'#2#14#3'Top'#3#128#0#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRigh'
+'t'#0#7'Caption'#6#9'RGBValues'#20'Constraints.MinWidth'#2'p'#11'ParentColor'
+#8#0#0#9'TTreeView'#10'ColourTree'#4'Left'#2#8#6'Height'#3#159#0#3'Top'#2#16
+#5'Width'#3'Z'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17
+'DefaultItemHeight'#2#16#8'DragMode'#7#11'dmAutomatic'#6'Images'#7#8'CHImage'
+'s'#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#5#8'OnChange'#7#16'ColourT'
+'reeChange'#10'OnDragDrop'#7#18'ColourTreeDragDrop'#10'OnDragOver'#7#18'Colo'
+'urTreeDragOver'#0#0#10'TImageList'#8'CHImages'#4'left'#3#168#1#3'top'#3#160
+#0#0#0#9'TMainMenu'#10'CHMainMenu'#4'left'#3'h'#1#3'top'#3#160#0#0#9'TMenuIt'
+'em'#6'CHFile'#7'Caption'#6#4'File'#0#9'TMenuItem'#7'CHClear'#7'Caption'#6#5
+'Clear'#7'OnClick'#7#12'CHClearClick'#0#0#9'TMenuItem'#6'CHLoad'#7'Caption'#6
+#4'Load'#7'OnClick'#7#11'CHLoadClick'#0#0#9'TMenuItem'#6'CHSave'#7'Caption'#6
+#4'Save'#7'OnClick'#7#11'CHSaveClick'#0#0#0#9'TMenuItem'#6'CHHelp'#7'Caption'
+#6#4'Help'#0#9'TMenuItem'#7'CHAbout'#7'Caption'#6#5'About'#7'OnClick'#7#12'C'
+'HAboutClick'#0#0#0#0#11'TSaveDialog'#12'CHSaveDialog'#10'DefaultExt'#6#4'.x'
+'ml'#4'left'#3#136#1#3'top'#3#160#0#0#0#11'TOpenDialog'#12'CHOpenDialog'#10
+'DefaultExt'#6#4'.xml'#4'left'#3#200#1#3'top'#3#160#0#0#0#0
]);

View File

@ -1,139 +1,139 @@
object FunctionListFrame: TFunctionListFrame
Left = 0
Height = 522
Top = 0
Width = 182
Align = alLeft
ClientHeight = 522
ClientWidth = 182
OnEndDock = FrameEndDock
TabOrder = 0
DesignLeft = 401
DesignTop = 219
object FunctionList: TTreeView
Left = 0
Height = 483
Top = 18
Width = 182
Align = alClient
DefaultItemHeight = 15
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 0
OnDblClick = FunctionListDblClick
OnDeletion = FunctionListDeletion
OnMouseDown = FunctionListMouseDown
OnMouseUp = FunctionListMouseUp
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
end
object editSearchList: TEdit
Left = 0
Height = 21
Top = 501
Width = 182
Align = alBottom
OnChange = editSearchListChange
TabOrder = 1
end
object FunctionListLabel: TLabel
Left = 2
Height = 14
Top = 2
Width = 178
Align = alTop
Alignment = taCenter
BorderSpacing.Around = 2
Caption = 'Functionlist'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
OnMouseDown = FunctionListLabelMouseDown
end
object CloseButton: TSpeedButton
Left = 134
Height = 16
Top = 2
Width = 16
Anchors = [akTop, akRight]
Color = clBtnFace
Flat = True
Glyph.Data = {
36090000424D3609000000000000360000002800000018000000180000000100
2000000000000009000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF0000000000000000000000000000000000000000000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000FF0000
00FF000000FF000000000000000000000000000000FF000000FF000000FF0000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF000000FF000000FF00000000000000FF000000FF000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF000000FF000000FF000000FF000000FF00000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF000000FF000000FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF000000FF000000FF000000FF000000FF00000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF000000FF000000FF00000000000000FF000000FF000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000FF0000
00FF000000FF000000000000000000000000000000FF000000FF000000FF0000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF0000000000000000000000000000000000000000000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
}
NumGlyphs = 0
OnClick = CloseButtonClick
end
end
object FunctionListFrame: TFunctionListFrame
Left = 0
Height = 522
Top = 0
Width = 182
Align = alLeft
ClientHeight = 522
ClientWidth = 182
OnEndDock = FrameEndDock
TabOrder = 0
DesignLeft = 401
DesignTop = 219
object FunctionList: TTreeView
Left = 0
Height = 483
Top = 18
Width = 182
Align = alClient
DefaultItemHeight = 15
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 0
OnDblClick = FunctionListDblClick
OnDeletion = FunctionListDeletion
OnMouseDown = FunctionListMouseDown
OnMouseUp = FunctionListMouseUp
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
end
object editSearchList: TEdit
Left = 0
Height = 21
Top = 501
Width = 182
Align = alBottom
OnChange = editSearchListChange
TabOrder = 1
end
object FunctionListLabel: TLabel
Left = 2
Height = 14
Top = 2
Width = 178
Align = alTop
Alignment = taCenter
BorderSpacing.Around = 2
Caption = 'Functionlist'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
OnMouseDown = FunctionListLabelMouseDown
end
object CloseButton: TSpeedButton
Left = 134
Height = 16
Top = 2
Width = 16
Anchors = [akTop, akRight]
Color = clBtnFace
Flat = True
Glyph.Data = {
36090000424D3609000000000000360000002800000018000000180000000100
2000000000000009000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF0000000000000000000000000000000000000000000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000FF0000
00FF000000FF000000000000000000000000000000FF000000FF000000FF0000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF000000FF000000FF00000000000000FF000000FF000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF000000FF000000FF000000FF000000FF00000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF000000FF000000FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF000000FF000000FF000000FF000000FF00000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF000000FF000000FF00000000000000FF000000FF000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000FF0000
00FF000000FF000000000000000000000000000000FF000000FF000000FF0000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF0000000000000000000000000000000000000000000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
}
NumGlyphs = 0
OnClick = CloseButtonClick
end
end

View File

@ -1,88 +1,88 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TFunctionListFrame','FORMDATA',[
'TPF0'#18'TFunctionListFrame'#17'FunctionListFrame'#4'Left'#2#0#6'Height'#3#10
+#2#3'Top'#2#0#5'Width'#3#182#0#5'Align'#7#6'alLeft'#12'ClientHeight'#3#10#2
+#11'ClientWidth'#3#182#0#9'OnEndDock'#7#12'FrameEndDock'#8'TabOrder'#2#0#10
+'DesignLeft'#3#145#1#9'DesignTop'#3#219#0#0#9'TTreeView'#12'FunctionList'#4
+'Left'#2#0#6'Height'#3#227#1#3'Top'#2#18#5'Width'#3#182#0#5'Align'#7#8'alCli'
+'ent'#17'DefaultItemHeight'#2#15#8'ReadOnly'#9#10'ScrollBars'#7#10'ssAutoBot'
+'h'#8'TabOrder'#2#0#10'OnDblClick'#7#20'FunctionListDblClick'#10'OnDeletion'
+#7#20'FunctionListDeletion'#11'OnMouseDown'#7#21'FunctionListMouseDown'#9'On'
+'MouseUp'#7#19'FunctionListMouseUp'#7'Options'#11#17'tvoAutoItemHeight'#16't'
+'voHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadOnly'#14'tvoShowButton'
+'s'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#5'TEdit'#14'editS'
+'earchList'#4'Left'#2#0#6'Height'#2#21#3'Top'#3#245#1#5'Width'#3#182#0#5'Ali'
+'gn'#7#8'alBottom'#8'OnChange'#7#20'editSearchListChange'#8'TabOrder'#2#1#0#0
+#6'TLabel'#17'FunctionListLabel'#4'Left'#2#2#6'Height'#2#14#3'Top'#2#2#5'Wid'
+'th'#3#178#0#5'Align'#7#5'alTop'#9'Alignment'#7#8'taCenter'#20'BorderSpacing'
+'.Around'#2#2#7'Caption'#6#12'Functionlist'#10'Font.Style'#11#6'fsBold'#0#11
+'Par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arusResources.Add('TFunctionListFrame','FORMDATA',[
'TPF0'#18'TFunctionListFrame'#17'FunctionListFrame'#4'Left'#2#0#6'Height'#3#10
+#2#3'Top'#2#0#5'Width'#3#182#0#5'Align'#7#6'alLeft'#12'ClientHeight'#3#10#2
+#11'ClientWidth'#3#182#0#9'OnEndDock'#7#12'FrameEndDock'#8'TabOrder'#2#0#10
+'DesignLeft'#3#145#1#9'DesignTop'#3#219#0#0#9'TTreeView'#12'FunctionList'#4
+'Left'#2#0#6'Height'#3#227#1#3'Top'#2#18#5'Width'#3#182#0#5'Align'#7#8'alCli'
+'ent'#17'DefaultItemHeight'#2#15#8'ReadOnly'#9#10'ScrollBars'#7#10'ssAutoBot'
+'h'#8'TabOrder'#2#0#10'OnDblClick'#7#20'FunctionListDblClick'#10'OnDeletion'
+#7#20'FunctionListDeletion'#11'OnMouseDown'#7#21'FunctionListMouseDown'#9'On'
+'MouseUp'#7#19'FunctionListMouseUp'#7'Options'#11#17'tvoAutoItemHeight'#16't'
+'voHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadOnly'#14'tvoShowButton'
+'s'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#5'TEdit'#14'editS'
+'earchList'#4'Left'#2#0#6'Height'#2#21#3'Top'#3#245#1#5'Width'#3#182#0#5'Ali'
+'gn'#7#8'alBottom'#8'OnChange'#7#20'editSearchListChange'#8'TabOrder'#2#1#0#0
+#6'TLabel'#17'FunctionListLabel'#4'Left'#2#2#6'Height'#2#14#3'Top'#2#2#5'Wid'
+'th'#3#178#0#5'Align'#7#5'alTop'#9'Alignment'#7#8'taCenter'#20'BorderSpacing'
+'.Around'#2#2#7'Caption'#6#12'Functionlist'#10'Font.Style'#11#6'fsBold'#0#11
+'ParentColor'#8#10'ParentFont'#8#11'OnMouseDown'#7#26'FunctionListLabelMouse'
+'Down'#0#0#12'TSpeedButton'#11'CloseButton'#4'Left'#3#134#0#6'Height'#2#16#3
+'Top'#2#2#5'Width'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0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#9
+'NumGlyphs'#2#0#7'OnClick'#7#16'CloseButtonClick'#0#0#0
]);

View File

@ -1,391 +1,391 @@
unit framefunctionlist;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, MufasaBase,Forms, ComCtrls, StdCtrls, Controls,
ExtCtrls, Buttons;
type
{ TFunctionListFrame }
TFunctionListFrame = class(TFrame)
editSearchList: TEdit;
FunctionList: TTreeView;
FunctionListLabel: TLabel;
CloseButton: TSpeedButton;
procedure editSearchListChange(Sender: TObject);
procedure FrameEndDock(Sender, Target: TObject; X, Y: Integer);
procedure FunctionListDblClick(Sender: TObject);
procedure FunctionListDeletion(Sender: TObject; Node: TTreeNode);
procedure FunctionListLabelMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FunctionListMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
procedure CloseButtonClick(Sender: TObject);
procedure FunctionListMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
FFilterTree : TTreeView;
procedure FilterTreeVis(Vis : boolean);
function GetFilterTree: TTreeView;
{ private declarations }
public
DraggingNode : TTreeNode;
ScriptNode : TTreeNode;
InCodeCompletion : boolean;
CompletionCaret : TPoint;
StartWordCompletion : TPoint;
CompletionLine : string;
CompletionStart : string;
property FilterTree : TTreeView read GetFilterTree;
procedure LoadScriptTree( Script : String);
function Find(Next : boolean; backwards : boolean = false) : boolean;
{ public declarations }
end;
TMethodInfo = record
MethodStr : PChar;
BeginPos : integer;
end;
PMethodInfo = ^TMethodInfo;
implementation
uses
TestUnit, Graphics, simpleanalyzer;
{ TFunctionListFrame }
procedure TFunctionListFrame.editSearchListChange(Sender: TObject);
begin
Find(false);
end;
procedure TFunctionListFrame.FrameEndDock(Sender, Target: TObject; X, Y: Integer
);
begin
if Target is TPanel then
begin
Form1.SplitterFunctionList.Visible := true;
CloseButton.Visible:= true;
end
else if Target is TCustomDockForm then
begin
TCustomDockForm(Target).Caption := 'Functionlist';
TCustomDockForm(Target).OnClose := @DockFormOnClose;
Form1.SplitterFunctionList.Visible:= false;
CloseButton.Visible:= false;
end;
end;
procedure TFunctionListFrame.FunctionListDblClick(Sender: TObject);
var
Node : TTreeNode;
begin
if FilterTree.Visible then
Node := FilterTree.Selected
else
node := FunctionList.Selected;
if node<> nil then
if node.Level > 0 then
if node.Data <> nil then
begin;
Form1.CurrScript.SynEdit.InsertTextAtCaret( GetMethodName(PMethodInfo(node.Data)^.MethodStr,true));
Form1.RefreshTab;
end;
end;
procedure TFunctionListFrame.FunctionListDeletion(Sender: TObject;
Node: TTreeNode);
begin
if node.data <> nil then
begin
StrDispose(PMethodInfo(node.data)^.MethodStr);
Freemem(node.data,sizeof(TMethodInfo));
end;
end;
procedure TFunctionListFrame.FunctionListLabelMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
Self.DragKind := dkDock;
Self.BeginDrag(false, 40);
end;
procedure TFunctionListFrame.DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
begin
CloseAction := caHide;
Form1.MenuItemFunctionList.Checked := False;
end;
procedure TFunctionListFrame.CloseButtonClick(Sender: TObject);
begin
self.Hide;
Form1.MenuItemFunctionList.Checked := False;
end;
procedure TFunctionListFrame.FunctionListMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
N: TTreeNode;
MethodInfo : TMethodInfo;
begin
if InCodeCompletion then
begin;
mDebugLn('Not yet implemented');
exit;
end;
if not (Sender is TTreeView) then
exit;
N := TTreeView(Sender).GetNodeAt(x, y);
if(N = nil)then
exit;
if button = mbRight then
if N.Data <> nil then
begin
MethodInfo := PMethodInfo(N.data)^;
if (MethodInfo.BeginPos > 0) then
Form1.CurrScript.SynEdit.SelStart := MethodInfo.BeginPos + 1;
end;
end;
procedure TFunctionListFrame.FilterTreeVis(Vis: boolean);
begin
FunctionList.Visible:= not Vis;
FilterTree.Visible := Vis;
end;
function TFunctionListFrame.GetFilterTree: TTreeView;
begin
Result := FFilterTree;
if Assigned(Result) then
exit;
FFilterTree := TTreeView.Create(Self);
FFilterTree.Parent := Self;
FFilterTree.Visible := false;
FFilterTree.SetBounds(FunctionList.Left,FunctionList.Top,FunctionList.Width,FunctionList.Height);
FFilterTree.Align := alClient;
FFilterTree.ReadOnly:= True;
FFilterTree.ScrollBars:= ssAutoBoth;
FFilterTree.OnMouseDown:= FunctionList.OnMouseDown;
FFilterTree.OnMouseUp:= FunctionList.OnMouseUp;
FFilterTree.OnChange:= FunctionList.OnChange;
FFilterTree.OnExit := FunctionList.OnExit;
FFilterTree.OnDblClick:= FunctionList.OnDblClick;
Result := FFilterTree;
//We do not want to delete the data from the FilterTree
// FilterTree.OnDeletion:= FunctionList.OnDeletion;
end;
procedure TFunctionListFrame.LoadScriptTree(Script: String);
var
I : integer;
Analyzer : TScriptAnalyzer;
tmpNode : TTreeNode;
begin
if ScriptNode = nil then
exit;
if FilterTree.Visible then
mDebugLn('Might get some acces violations now..');
ScriptNode.DeleteChildren;
Analyzer := TScriptAnalyzer.create;
Analyzer.ScriptToAnalyze:= Script;
Analyzer.analyze;
for i := 0 to Analyzer.MethodLen - 1 do
begin
tmpNode := FunctionList.Items.AddChild(ScriptNode,Analyzer.Methods[i].Name);
tmpNode.Data := GetMem(SizeOf(TMethodInfo));
with PMethodInfo(tmpNode.Data)^ do
begin
MethodStr:= strnew(PChar(Analyzer.Methods[i].CreateMethodStr));
BeginPos:= Analyzer.Methods[i].BeginPos;
end;
end;
ScriptNode.Expand(true);
Analyzer.free;
end;
function TFunctionListFrame.Find(Next : boolean; backwards : boolean = false) : boolean;
var
Start,Len,i,index,posi,c: Integer;
FoundFunction : boolean;
LastSection : string;
str : string;
RootNode : TTreeNode;
NormalNode : TTreeNode;
Node : TTreeNode;
InsertStr : string;
begin
if(editSearchList.Text = '')then
begin
editSearchList.Color := clWhite;
FunctionList.FullCollapse;
if InCodeCompletion then
begin;
Form1.CurrScript.SynEdit.Lines[CompletionCaret.y - 1] := CompletionStart;
Form1.CurrScript.SynEdit.LogicalCaretXY:= point(CompletionCaret.x,CompletionCaret.y);
Form1.CurrScript.SynEdit.SelEnd:= Form1.CurrScript.SynEdit.SelStart;
end;
FilterTreeVis(False);
ScriptNode.Expand(true);
exit;
end;
//We only have to search the next item in our filter tree.. Fu-king easy!
if next then
begin;
if FilterTree.Visible = false then
begin;
mDebugLn('ERROR: You cannot search next, since the Tree isnt generated yet');
Find(false);
exit;
end;
if FilterTree.Selected <> nil then
begin;
if backwards then
start := FilterTree.Selected.AbsoluteIndex - 1
else
Start := FilterTree.Selected.AbsoluteIndex + 1;
end
else
begin
if backwards then
Start := FilterTree.Items.Count - 1
else
Start := 0;
end;
Len := FilterTree.Items.Count;
i := start + len; //This is for the backwards compatibily, we do mod anways.. it just makes sure -1 isn't negative.
c := 0;
while c < (len ) do
begin;
if FilterTree.Items[i mod len].Level = 1 then
begin
FilterTree.Items[i mod len].Selected:= true;
InsertStr := FilterTree.Items[i mod len].Text;
Result := true;
break;
end;
if backwards then
dec(i)
else
inc(i);
inc(c);
end;
end else
begin
FilterTree.Items.Clear;
FoundFunction := False;
if FunctionList.Selected <> nil then
Start := FunctionList.Selected.AbsoluteIndex
else
Start := 0;
Len := FunctionList.Items.Count;
LastSection := '';
for i := start to start + FunctionList.Items.Count - 1 do
begin;
Node := FunctionList.Items[i mod FunctionList.Items.Count];
if(Node.Level = 1)then
if(pos(lowercase(editSearchList.Text), lowercase(Node.Text)) > 0)then
begin
if not FoundFunction then
begin
FoundFunction := True;
index := i mod FunctionList.Items.Count;
InsertStr:= node.Text;
end;
if LastSection <> Node.Parent.Text then //We enter a new section, add it to the filter tree!
RootNode := FilterTree.Items.AddChild(nil,Node.Parent.Text);
FilterTree.Items.AddChild(RootNode,Node.Text).Data := Node.Data;
LastSection:= RootNode.Text;
// break;
end;
end;
Result := FoundFunction;
if Result then
begin;
FilterTreeVis(True);
FilterTree.FullExpand;
FilterTree.Items[1].Selected:= True;
mDebugLn(FunctionList.Items[Index].Text);
FunctionList.FullCollapse;
FunctionList.Items[Index].Selected := true;
FunctionList.Items[index].ExpandParents;
editSearchList.Color := clWhite;
end else
begin
FilterTreeVis(false);
editSearchList.Color := 6711039;
if InCodeCompletion then
Form1.CurrScript.SynEdit.Lines[CompletionCaret.y - 1] := CompletionStart;
end;
end;
if result and InCodeCompletion then
begin;
str := format(CompletionLine, [InsertStr]);
with Form1.CurrScript.SynEdit do
begin;
Lines[CompletionCaret.y - 1] := str;
LogicalCaretXY:= StartWordCompletion;
i := SelStart;
posi := pos(lowercase(editSearchList.text), lowercase(InsertStr)) + length(editSearchList.text) - 1; //underline the rest of the word
if Posi = Length(InsertStr) then //Special occasions
begin;
if Length(editSearchList.Text) <> Posi then //We found the last part of the text -> for exmaple when you Search for bitmap, you can find LoadBitmap -> We underline 'Load'
begin;
SelStart := i;
SelEnd := i + pos(lowercase(editSearchList.text), lowercase(InsertStr)) -1;
Exit;
end;
//We searched for the whole text -> for example LoadBitmap, and we found LoadBitmap -> Underline the whole text
Posi := 0;
end;
//Underline the rest of the word
SelStart := i + posi;
SelEnd := SelStart + Length(InsertStr) - posi;
end;
end;
end;
procedure TFunctionListFrame.FunctionListMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
N: TTreeNode;
begin
if button = mbRight then
exit;
if InCodeCompletion then
begin;
mDebugLn('Not yet implemented');
exit;
end;
if not (Sender is TTreeView) then
exit;
N := TTreeView(Sender).GetNodeAt(x, y);
if(N = nil)then
begin
Self.DragKind := dkDock;
Self.BeginDrag(false, 40);
exit;
end;
Self.DragKind := dkDrag;
if(Button = mbLeft) and (N.Level > 0)then
Self.BeginDrag(False, 10);
DraggingNode := N;
end;
initialization
{$I framefunctionlist.lrs}
end.
unit framefunctionlist;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, MufasaBase,Forms, ComCtrls, StdCtrls, Controls,
ExtCtrls, Buttons;
type
{ TFunctionListFrame }
TFunctionListFrame = class(TFrame)
editSearchList: TEdit;
FunctionList: TTreeView;
FunctionListLabel: TLabel;
CloseButton: TSpeedButton;
procedure editSearchListChange(Sender: TObject);
procedure FrameEndDock(Sender, Target: TObject; X, Y: Integer);
procedure FunctionListDblClick(Sender: TObject);
procedure FunctionListDeletion(Sender: TObject; Node: TTreeNode);
procedure FunctionListLabelMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FunctionListMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
procedure CloseButtonClick(Sender: TObject);
procedure FunctionListMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
FFilterTree : TTreeView;
procedure FilterTreeVis(Vis : boolean);
function GetFilterTree: TTreeView;
{ private declarations }
public
DraggingNode : TTreeNode;
ScriptNode : TTreeNode;
InCodeCompletion : boolean;
CompletionCaret : TPoint;
StartWordCompletion : TPoint;
CompletionLine : string;
CompletionStart : string;
property FilterTree : TTreeView read GetFilterTree;
procedure LoadScriptTree( Script : String);
function Find(Next : boolean; backwards : boolean = false) : boolean;
{ public declarations }
end;
TMethodInfo = record
MethodStr : PChar;
BeginPos : integer;
end;
PMethodInfo = ^TMethodInfo;
implementation
uses
TestUnit, Graphics, simpleanalyzer;
{ TFunctionListFrame }
procedure TFunctionListFrame.editSearchListChange(Sender: TObject);
begin
Find(false);
end;
procedure TFunctionListFrame.FrameEndDock(Sender, Target: TObject; X, Y: Integer
);
begin
if Target is TPanel then
begin
Form1.SplitterFunctionList.Visible := true;
CloseButton.Visible:= true;
end
else if Target is TCustomDockForm then
begin
TCustomDockForm(Target).Caption := 'Functionlist';
TCustomDockForm(Target).OnClose := @DockFormOnClose;
Form1.SplitterFunctionList.Visible:= false;
CloseButton.Visible:= false;
end;
end;
procedure TFunctionListFrame.FunctionListDblClick(Sender: TObject);
var
Node : TTreeNode;
begin
if FilterTree.Visible then
Node := FilterTree.Selected
else
node := FunctionList.Selected;
if node<> nil then
if node.Level > 0 then
if node.Data <> nil then
begin;
Form1.CurrScript.SynEdit.InsertTextAtCaret( GetMethodName(PMethodInfo(node.Data)^.MethodStr,true));
Form1.RefreshTab;
end;
end;
procedure TFunctionListFrame.FunctionListDeletion(Sender: TObject;
Node: TTreeNode);
begin
if node.data <> nil then
begin
StrDispose(PMethodInfo(node.data)^.MethodStr);
Freemem(node.data,sizeof(TMethodInfo));
end;
end;
procedure TFunctionListFrame.FunctionListLabelMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
Self.DragKind := dkDock;
Self.BeginDrag(false, 40);
end;
procedure TFunctionListFrame.DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
begin
CloseAction := caHide;
Form1.MenuItemFunctionList.Checked := False;
end;
procedure TFunctionListFrame.CloseButtonClick(Sender: TObject);
begin
self.Hide;
Form1.MenuItemFunctionList.Checked := False;
end;
procedure TFunctionListFrame.FunctionListMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
N: TTreeNode;
MethodInfo : TMethodInfo;
begin
if InCodeCompletion then
begin;
mDebugLn('Not yet implemented');
exit;
end;
if not (Sender is TTreeView) then
exit;
N := TTreeView(Sender).GetNodeAt(x, y);
if(N = nil)then
exit;
if button = mbRight then
if N.Data <> nil then
begin
MethodInfo := PMethodInfo(N.data)^;
if (MethodInfo.BeginPos > 0) then
Form1.CurrScript.SynEdit.SelStart := MethodInfo.BeginPos + 1;
end;
end;
procedure TFunctionListFrame.FilterTreeVis(Vis: boolean);
begin
FunctionList.Visible:= not Vis;
FilterTree.Visible := Vis;
end;
function TFunctionListFrame.GetFilterTree: TTreeView;
begin
Result := FFilterTree;
if Assigned(Result) then
exit;
FFilterTree := TTreeView.Create(Self);
FFilterTree.Parent := Self;
FFilterTree.Visible := false;
FFilterTree.SetBounds(FunctionList.Left,FunctionList.Top,FunctionList.Width,FunctionList.Height);
FFilterTree.Align := alClient;
FFilterTree.ReadOnly:= True;
FFilterTree.ScrollBars:= ssAutoBoth;
FFilterTree.OnMouseDown:= FunctionList.OnMouseDown;
FFilterTree.OnMouseUp:= FunctionList.OnMouseUp;
FFilterTree.OnChange:= FunctionList.OnChange;
FFilterTree.OnExit := FunctionList.OnExit;
FFilterTree.OnDblClick:= FunctionList.OnDblClick;
Result := FFilterTree;
//We do not want to delete the data from the FilterTree
// FilterTree.OnDeletion:= FunctionList.OnDeletion;
end;
procedure TFunctionListFrame.LoadScriptTree(Script: String);
var
I : integer;
Analyzer : TScriptAnalyzer;
tmpNode : TTreeNode;
begin
if ScriptNode = nil then
exit;
if FilterTree.Visible then
mDebugLn('Might get some acces violations now..');
ScriptNode.DeleteChildren;
Analyzer := TScriptAnalyzer.create;
Analyzer.ScriptToAnalyze:= Script;
Analyzer.analyze;
for i := 0 to Analyzer.MethodLen - 1 do
begin
tmpNode := FunctionList.Items.AddChild(ScriptNode,Analyzer.Methods[i].Name);
tmpNode.Data := GetMem(SizeOf(TMethodInfo));
with PMethodInfo(tmpNode.Data)^ do
begin
MethodStr:= strnew(PChar(Analyzer.Methods[i].CreateMethodStr));
BeginPos:= Analyzer.Methods[i].BeginPos;
end;
end;
ScriptNode.Expand(true);
Analyzer.free;
end;
function TFunctionListFrame.Find(Next : boolean; backwards : boolean = false) : boolean;
var
Start,Len,i,index,posi,c: Integer;
FoundFunction : boolean;
LastSection : string;
str : string;
RootNode : TTreeNode;
NormalNode : TTreeNode;
Node : TTreeNode;
InsertStr : string;
begin
if(editSearchList.Text = '')then
begin
editSearchList.Color := clWhite;
FunctionList.FullCollapse;
if InCodeCompletion then
begin;
Form1.CurrScript.SynEdit.Lines[CompletionCaret.y - 1] := CompletionStart;
Form1.CurrScript.SynEdit.LogicalCaretXY:= point(CompletionCaret.x,CompletionCaret.y);
Form1.CurrScript.SynEdit.SelEnd:= Form1.CurrScript.SynEdit.SelStart;
end;
FilterTreeVis(False);
ScriptNode.Expand(true);
exit;
end;
//We only have to search the next item in our filter tree.. Fu-king easy!
if next then
begin;
if FilterTree.Visible = false then
begin;
mDebugLn('ERROR: You cannot search next, since the Tree isnt generated yet');
Find(false);
exit;
end;
if FilterTree.Selected <> nil then
begin;
if backwards then
start := FilterTree.Selected.AbsoluteIndex - 1
else
Start := FilterTree.Selected.AbsoluteIndex + 1;
end
else
begin
if backwards then
Start := FilterTree.Items.Count - 1
else
Start := 0;
end;
Len := FilterTree.Items.Count;
i := start + len; //This is for the backwards compatibily, we do mod anways.. it just makes sure -1 isn't negative.
c := 0;
while c < (len ) do
begin;
if FilterTree.Items[i mod len].Level = 1 then
begin
FilterTree.Items[i mod len].Selected:= true;
InsertStr := FilterTree.Items[i mod len].Text;
Result := true;
break;
end;
if backwards then
dec(i)
else
inc(i);
inc(c);
end;
end else
begin
FilterTree.Items.Clear;
FoundFunction := False;
if FunctionList.Selected <> nil then
Start := FunctionList.Selected.AbsoluteIndex
else
Start := 0;
Len := FunctionList.Items.Count;
LastSection := '';
for i := start to start + FunctionList.Items.Count - 1 do
begin;
Node := FunctionList.Items[i mod FunctionList.Items.Count];
if(Node.Level = 1)then
if(pos(lowercase(editSearchList.Text), lowercase(Node.Text)) > 0)then
begin
if not FoundFunction then
begin
FoundFunction := True;
index := i mod FunctionList.Items.Count;
InsertStr:= node.Text;
end;
if LastSection <> Node.Parent.Text then //We enter a new section, add it to the filter tree!
RootNode := FilterTree.Items.AddChild(nil,Node.Parent.Text);
FilterTree.Items.AddChild(RootNode,Node.Text).Data := Node.Data;
LastSection:= RootNode.Text;
// break;
end;
end;
Result := FoundFunction;
if Result then
begin;
FilterTreeVis(True);
FilterTree.FullExpand;
FilterTree.Items[1].Selected:= True;
mDebugLn(FunctionList.Items[Index].Text);
FunctionList.FullCollapse;
FunctionList.Items[Index].Selected := true;
FunctionList.Items[index].ExpandParents;
editSearchList.Color := clWhite;
end else
begin
FilterTreeVis(false);
editSearchList.Color := 6711039;
if InCodeCompletion then
Form1.CurrScript.SynEdit.Lines[CompletionCaret.y - 1] := CompletionStart;
end;
end;
if result and InCodeCompletion then
begin;
str := format(CompletionLine, [InsertStr]);
with Form1.CurrScript.SynEdit do
begin;
Lines[CompletionCaret.y - 1] := str;
LogicalCaretXY:= StartWordCompletion;
i := SelStart;
posi := pos(lowercase(editSearchList.text), lowercase(InsertStr)) + length(editSearchList.text) - 1; //underline the rest of the word
if Posi = Length(InsertStr) then //Special occasions
begin;
if Length(editSearchList.Text) <> Posi then //We found the last part of the text -> for exmaple when you Search for bitmap, you can find LoadBitmap -> We underline 'Load'
begin;
SelStart := i;
SelEnd := i + pos(lowercase(editSearchList.text), lowercase(InsertStr)) -1;
Exit;
end;
//We searched for the whole text -> for example LoadBitmap, and we found LoadBitmap -> Underline the whole text
Posi := 0;
end;
//Underline the rest of the word
SelStart := i + posi;
SelEnd := SelStart + Length(InsertStr) - posi;
end;
end;
end;
procedure TFunctionListFrame.FunctionListMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
N: TTreeNode;
begin
if button = mbRight then
exit;
if InCodeCompletion then
begin;
mDebugLn('Not yet implemented');
exit;
end;
if not (Sender is TTreeView) then
exit;
N := TTreeView(Sender).GetNodeAt(x, y);
if(N = nil)then
begin
Self.DragKind := dkDock;
Self.BeginDrag(false, 40);
exit;
end;
Self.DragKind := dkDrag;
if(Button = mbLeft) and (N.Level > 0)then
Self.BeginDrag(False, 10);
DraggingNode := N;
end;
initialization
{$I framefunctionlist.lrs}
end.

File diff suppressed because it is too large Load Diff

View File

@ -1,357 +1,357 @@
{
This file is part of the Mufasa Macro Library (MML)
Copyright (c) 2009 by Raymond van Venetië and Merlijn Wajer
MML is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MML is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MML. If not, see <http://www.gnu.org/licenses/>.
See the file COPYING, included in this distribution,
for details about the copyright.
framescript for the Mufasa Macro Library
}
unit framescript;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, SynHighlighterPas, SynEdit, SynEditMarkupHighAll,
mmlpsthread,ComCtrls, SynEditKeyCmds, LCLType,MufasaBase, SynEditMarkupSpecialLine, Graphics, Controls;
const
ecCodeCompletion = ecUserFirst;
type
TScriptState = (ss_None,ss_Running,ss_Paused,ss_Stopping);
{
ss_None: Means the script either hasn't been run yet, or it has ended (Succesfully or terminated)
ss_Running: Means the script is running as we speak :-)
ss_Paused: Means the script is currently in pause modus.
ss_Stopping: Means we've asked PS-Script politely to stop the script (next time we press the stop button we won't be that nice).
}
{ TScriptFrame }
TScriptFrame = class(TFrame)
SynEdit: TSynEdit;
SynFreePascalSyn1: TSynFreePascalSyn;
procedure SynEditChange(Sender: TObject);
procedure SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure SynEditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
);
procedure SynEditProcessCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
procedure SynEditProcessUserCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
procedure SynEditSpecialLineColors(Sender: TObject; Line: integer;
var Special: boolean; var FG, BG: TColor);
procedure SynEditStatusChange(Sender: TObject; Changes: TSynStatusChanges);
private
OwnerPage : TPageControl;
OwnerSheet : TTabSheet;//The owner TTabsheet -> For title setting
public
ErrorData : TErrorData; //For threadsafestuff
ScriptErrorLine : integer; //Highlight the error line!
ScriptFile : string;//The path to the saved/opened file currently in the SynEdit
StartText : string;//The text synedit holds upon start/open/save
ScriptName : string;//The name of the currently opened/saved file.
ScriptDefault : string;//The default script e.g. program new; begin end.
ScriptChanged : boolean;//We need this for that little * (edited star).
ScriptThread : TMThread;//Just one thread for now..
FScriptState : TScriptState;//Stores the ScriptState, if you want the Run/Pause/Start buttons to change accordingly, acces through Form1
procedure undo;
procedure redo;
procedure HandleErrorData;
procedure MakeActiveScriptFrame;
procedure ScriptThreadTerminate(Sender: TObject);
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
{ public declarations }
end;
implementation
uses
TestUnit, SynEditTypes, LCLIntF, StrUtils,framefunctionlist;
{ TScriptFrame }
procedure TScriptFrame.SynEditChange(Sender: TObject);
begin
ScriptErrorLine:= -1;
if not ScriptChanged then
begin;
ScriptChanged:= True;
Form1.Caption:= Format(WindowTitle,[ScriptName + '*']);
OwnerSheet.Caption:=ScriptName + '*';
end;
end;
procedure TScriptFrame.SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
begin
if Source is TFunctionListFrame then
if TFunctionListFrame(Source).DraggingNode.Data <> nil then
SynEdit.InsertTextAtCaret( GetMethodName(PMethodInfo(TFunctionListFrame(Source).DraggingNode.Data)^.MethodStr,true));
end;
procedure TScriptFrame.SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
Accept := Source = Form1.frmFunctionList;
if(Accept)then
begin
SynEdit.CaretXY := SynEdit.PixelsToLogicalPos(point(x, y));
if(not(Form1.Active))then Form1.BringToFront;
if(Form1.ActiveControl <> SynEdit)then Form1.ActiveControl := SynEdit;
end;
end;
procedure TScriptFrame.SynEditKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = VK_F3 then
begin;
Form1.ActionFindNextExecute(Sender);
key := 0;
end;
end;
procedure TScriptFrame.SynEditProcessCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
begin
case Command of
ecUndo : begin
Command:= ecNone;
Self.Undo;
end;
ecRedo : begin
Command := ecNone;
self.Redo;
end;
end;
end;
procedure TScriptFrame.SynEditProcessUserCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
var
LineText,SearchText : string;
Caret : TPoint;
i,endI : integer;
begin
if Command = ecCodeCompletion then
begin
form1.FunctionListShown(True);
with form1.frmFunctionList do
if editSearchList.CanFocus then
begin;
editSearchList.SetFocus;
LineText := SynEdit.LineText;
Caret:=SynEdit.LogicalCaretXY;
i := Caret.X - 1;
endi := caret.x;
if (i > length(LineText)) or ((i = 0) and (length(lineText) = 0)) then
begin
SearchText:= '';
CompletionLine := PadRight(linetext,caret.x);
end
else begin
while (i > 0) and (LineText[i] in ['a'..'z','A'..'Z','0'..'9','_']) do
dec(i);
while LineText[endi] in ['a'..'z','A'..'Z','0'..'9','_'] do
inc(endi);
SearchText := Trim(copy(LineText, i + 1, Caret.X - i - 1));
CompletionLine := LineText;
end;
CompletionStart:= LineText;
Delete(CompletionLine,i+1,endi - i - 1);
Insert('%s',CompletionLine,i+1);
CompletionCaret := Point(endi,Caret.y);
StartWordCompletion:= Point(i+1,caret.y);
mDebugLn(CompletionLine);
mDebugLn(CompletionStart);
InCodeCompletion := true;
editSearchList.Text:= SearchText;
editSearchList.SelStart:= Length(searchText);
SynEdit.SelectedColor.Style:= [fsUnderline];
SynEdit.SelectedColor.Foreground:= clBlack;
SynEdit.SelectedColor.Background:= clWhite;
Synedit.MarkupByClass[TSynEditMarkupHighlightAllCaret].TempDisable;
end;
end;
end;
procedure TScriptFrame.SynEditSpecialLineColors(Sender: TObject;
Line: integer; var Special: boolean; var FG, BG: TColor);
begin
if line = ScriptErrorLine then
begin;
Special := true;
BG := $50a0ff;
FG := 0;
end;
end;
procedure TScriptFrame.SynEditStatusChange(Sender: TObject;
Changes: TSynStatusChanges);
begin
{$IFDEF UpdateEditButtons}
if scSelection in changes then
begin;
Form1.TT_Cut.Enabled := SynEdit.SelAvail;
form1.TT_Copy.Enabled:= Form1.TT_Cut.Enabled;
form1.TT_Paste.Enabled:= SynEdit.CanPaste;
end;
{$ENDIF}
end;
procedure TScriptFrame.undo;
begin
SynEdit.Undo;
if ScriptChanged then
if SynEdit.Lines.Text = StartText then
begin;
Form1.Caption:= format(WindowTitle,[ScriptName]);
OwnerSheet.Caption:= ScriptName;
ScriptChanged := false;
end;
end;
procedure TScriptFrame.redo;
begin
SynEdit.Redo;
if ScriptChanged then
if SynEdit.Lines.Text = StartText then
begin;
Form1.Caption:= format(WindowTitle,[ScriptName]);
OwnerSheet.Caption := ScriptName;
ScriptChanged := false;
end;
end;
procedure TScriptFrame.HandleErrorData;
var
i : integer;
begin
if ErrorData.Module <> '' then
begin;
if not FileExists(ErrorData.Module) then
formWriteln(Format('ERROR comes from a non-existing file (%s)',[ErrorData.Module]))
else
begin
ErrorData.Module:= SetDirSeparators(ErrorData.Module);// Set it right ;-)
for i := 0 to Form1.Tabs.Count - 1 do
if lowercase(TMufasaTab(Form1.Tabs[i]).ScriptFrame.ScriptFile) = lowercase(ErrorData.Module) then
begin;
ErrorData.Module:= '';
TMufasaTab(Form1.Tabs[i]).ScriptFrame.ErrorData := Self.ErrorData;
TMufasaTab(Form1.Tabs[i]).ScriptFrame.HandleErrorData;
Exit;
end;
Form1.LoadScriptFile(ErrorData.Module,true);
ErrorData.Module:= '';
Form1.CurrScript.ErrorData := Self.ErrorData;
Form1.CurrScript.HandleErrorData;
exit;
end;
end;
MakeActiveScriptFrame;
ScriptErrorLine:= ErrorData.Row;
SynEdit.Invalidate;
if ErrorData.Col = -1 then
SynEdit.SelStart:= ErrorData.Position
else
SynEdit.LogicalCaretXY := Point(ErrorData.Col,ErrorData.Row);
if pos('error',lowercase(ErrorData.Error)) > 0 then
formWriteln(Format('%s at line %d',[ErrorData.Error,ErrorData.Row]))
else
formWriteln(Format('Error: %s at line %d',[ErrorData.Error,ErrorData.Row]));
end;
procedure TScriptFrame.MakeActiveScriptFrame;
var
i : integer;
begin
if Form1.Visible then
for i := 0 to OwnerPage.PageCount - 1 do
if OwnerPage.Pages[i] = OwnerSheet then
begin;
OwnerPage.TabIndex := i;
if OwnerSheet.CanFocus then
OwnerSheet.SetFocus;
exit;
end;
end;
procedure TScriptFrame.ScriptThreadTerminate(Sender: TObject);
begin
FScriptState:= ss_None;
Form1.RefreshTab;
end;
procedure AddKey(const SynEdit : TSynEdit; const ACmd: TSynEditorCommand; const AKey: word;const AShift: TShiftState);
begin
with SynEdit.KeyStrokes.Add do
begin
Key := AKey;
Shift := AShift;
Command := ACmd;
end;
end;
constructor TScriptFrame.Create(TheOwner: TComponent);
var
MarkCaret : TSynEditMarkupHighlightAllCaret;
begin
inherited Create(TheOwner);
OwnerSheet := TTabSheet(TheOwner);
OwnerPage := TPageControl(OwnerSheet.Owner);
StartText:= SynEdit.Lines.text;
ScriptDefault:= StartText;
ScriptName:= 'Untitled';
ScriptChanged := false;
FScriptState:= ss_None;
ScriptErrorLine:= -1;
OwnerSheet.Caption:= ScriptName;
SynEdit.Options:= SynEdit.Options- [eoGroupUndo];
SynEdit.Options:= SynEdit.Options+ [eoGroupUndo,eoPersistentCaret];
SynEdit.IncrementColor.Background := $30D070;
SynEdit.HighlightAllColor.Background:= clYellow;
SynEdit.HighlightAllColor.Foreground:= clDefault;
MarkCaret := TSynEditMarkupHighlightAllCaret(SynEdit.MarkupByClass[TSynEditMarkupHighlightAllCaret]);
if assigned(MarkCaret) then
begin
with MarkCaret.MarkupInfo do
begin;
Background :=$E6E6E6;
FrameColor := clGray;
end;
MarkCaret.Enabled := True;
MarkCaret.FullWord:= True;
MarkCaret.FullWordMaxLen:= 3;
MarkCaret.WaitTime := 1500;
MarkCaret.IgnoreKeywords := true;
end;
AddKey(SynEdit,ecCodeCompletion,VK_SPACE,[ssCtrl]);
// TSynPasSyn(SynEdit.Highlighter).NestedComments:= false; Does not work :(
end;
destructor TScriptFrame.Destroy;
begin
inherited Destroy;
end;
initialization
{$I framescript.lrs}
end.
{
This file is part of the Mufasa Macro Library (MML)
Copyright (c) 2009 by Raymond van Venetië and Merlijn Wajer
MML is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MML is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MML. If not, see <http://www.gnu.org/licenses/>.
See the file COPYING, included in this distribution,
for details about the copyright.
framescript for the Mufasa Macro Library
}
unit framescript;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, SynHighlighterPas, SynEdit, SynEditMarkupHighAll,
mmlpsthread,ComCtrls, SynEditKeyCmds, LCLType,MufasaBase, SynEditMarkupSpecialLine, Graphics, Controls;
const
ecCodeCompletion = ecUserFirst;
type
TScriptState = (ss_None,ss_Running,ss_Paused,ss_Stopping);
{
ss_None: Means the script either hasn't been run yet, or it has ended (Succesfully or terminated)
ss_Running: Means the script is running as we speak :-)
ss_Paused: Means the script is currently in pause modus.
ss_Stopping: Means we've asked PS-Script politely to stop the script (next time we press the stop button we won't be that nice).
}
{ TScriptFrame }
TScriptFrame = class(TFrame)
SynEdit: TSynEdit;
SynFreePascalSyn1: TSynFreePascalSyn;
procedure SynEditChange(Sender: TObject);
procedure SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure SynEditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
);
procedure SynEditProcessCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
procedure SynEditProcessUserCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
procedure SynEditSpecialLineColors(Sender: TObject; Line: integer;
var Special: boolean; var FG, BG: TColor);
procedure SynEditStatusChange(Sender: TObject; Changes: TSynStatusChanges);
private
OwnerPage : TPageControl;
OwnerSheet : TTabSheet;//The owner TTabsheet -> For title setting
public
ErrorData : TErrorData; //For threadsafestuff
ScriptErrorLine : integer; //Highlight the error line!
ScriptFile : string;//The path to the saved/opened file currently in the SynEdit
StartText : string;//The text synedit holds upon start/open/save
ScriptName : string;//The name of the currently opened/saved file.
ScriptDefault : string;//The default script e.g. program new; begin end.
ScriptChanged : boolean;//We need this for that little * (edited star).
ScriptThread : TMThread;//Just one thread for now..
FScriptState : TScriptState;//Stores the ScriptState, if you want the Run/Pause/Start buttons to change accordingly, acces through Form1
procedure undo;
procedure redo;
procedure HandleErrorData;
procedure MakeActiveScriptFrame;
procedure ScriptThreadTerminate(Sender: TObject);
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
{ public declarations }
end;
implementation
uses
TestUnit, SynEditTypes, LCLIntF, StrUtils,framefunctionlist;
{ TScriptFrame }
procedure TScriptFrame.SynEditChange(Sender: TObject);
begin
ScriptErrorLine:= -1;
if not ScriptChanged then
begin;
ScriptChanged:= True;
Form1.Caption:= Format(WindowTitle,[ScriptName + '*']);
OwnerSheet.Caption:=ScriptName + '*';
end;
end;
procedure TScriptFrame.SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
begin
if Source is TFunctionListFrame then
if TFunctionListFrame(Source).DraggingNode.Data <> nil then
SynEdit.InsertTextAtCaret( GetMethodName(PMethodInfo(TFunctionListFrame(Source).DraggingNode.Data)^.MethodStr,true));
end;
procedure TScriptFrame.SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
Accept := Source = Form1.frmFunctionList;
if(Accept)then
begin
SynEdit.CaretXY := SynEdit.PixelsToLogicalPos(point(x, y));
if(not(Form1.Active))then Form1.BringToFront;
if(Form1.ActiveControl <> SynEdit)then Form1.ActiveControl := SynEdit;
end;
end;
procedure TScriptFrame.SynEditKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = VK_F3 then
begin;
Form1.ActionFindNextExecute(Sender);
key := 0;
end;
end;
procedure TScriptFrame.SynEditProcessCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
begin
case Command of
ecUndo : begin
Command:= ecNone;
Self.Undo;
end;
ecRedo : begin
Command := ecNone;
self.Redo;
end;
end;
end;
procedure TScriptFrame.SynEditProcessUserCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
var
LineText,SearchText : string;
Caret : TPoint;
i,endI : integer;
begin
if Command = ecCodeCompletion then
begin
form1.FunctionListShown(True);
with form1.frmFunctionList do
if editSearchList.CanFocus then
begin;
editSearchList.SetFocus;
LineText := SynEdit.LineText;
Caret:=SynEdit.LogicalCaretXY;
i := Caret.X - 1;
endi := caret.x;
if (i > length(LineText)) or ((i = 0) and (length(lineText) = 0)) then
begin
SearchText:= '';
CompletionLine := PadRight(linetext,caret.x);
end
else begin
while (i > 0) and (LineText[i] in ['a'..'z','A'..'Z','0'..'9','_']) do
dec(i);
while LineText[endi] in ['a'..'z','A'..'Z','0'..'9','_'] do
inc(endi);
SearchText := Trim(copy(LineText, i + 1, Caret.X - i - 1));
CompletionLine := LineText;
end;
CompletionStart:= LineText;
Delete(CompletionLine,i+1,endi - i - 1);
Insert('%s',CompletionLine,i+1);
CompletionCaret := Point(endi,Caret.y);
StartWordCompletion:= Point(i+1,caret.y);
mDebugLn(CompletionLine);
mDebugLn(CompletionStart);
InCodeCompletion := true;
editSearchList.Text:= SearchText;
editSearchList.SelStart:= Length(searchText);
SynEdit.SelectedColor.Style:= [fsUnderline];
SynEdit.SelectedColor.Foreground:= clBlack;
SynEdit.SelectedColor.Background:= clWhite;
Synedit.MarkupByClass[TSynEditMarkupHighlightAllCaret].TempDisable;
end;
end;
end;
procedure TScriptFrame.SynEditSpecialLineColors(Sender: TObject;
Line: integer; var Special: boolean; var FG, BG: TColor);
begin
if line = ScriptErrorLine then
begin;
Special := true;
BG := $50a0ff;
FG := 0;
end;
end;
procedure TScriptFrame.SynEditStatusChange(Sender: TObject;
Changes: TSynStatusChanges);
begin
{$IFDEF UpdateEditButtons}
if scSelection in changes then
begin;
Form1.TT_Cut.Enabled := SynEdit.SelAvail;
form1.TT_Copy.Enabled:= Form1.TT_Cut.Enabled;
form1.TT_Paste.Enabled:= SynEdit.CanPaste;
end;
{$ENDIF}
end;
procedure TScriptFrame.undo;
begin
SynEdit.Undo;
if ScriptChanged then
if SynEdit.Lines.Text = StartText then
begin;
Form1.Caption:= format(WindowTitle,[ScriptName]);
OwnerSheet.Caption:= ScriptName;
ScriptChanged := false;
end;
end;
procedure TScriptFrame.redo;
begin
SynEdit.Redo;
if ScriptChanged then
if SynEdit.Lines.Text = StartText then
begin;
Form1.Caption:= format(WindowTitle,[ScriptName]);
OwnerSheet.Caption := ScriptName;
ScriptChanged := false;
end;
end;
procedure TScriptFrame.HandleErrorData;
var
i : integer;
begin
if ErrorData.Module <> '' then
begin;
if not FileExists(ErrorData.Module) then
formWriteln(Format('ERROR comes from a non-existing file (%s)',[ErrorData.Module]))
else
begin
ErrorData.Module:= SetDirSeparators(ErrorData.Module);// Set it right ;-)
for i := 0 to Form1.Tabs.Count - 1 do
if lowercase(TMufasaTab(Form1.Tabs[i]).ScriptFrame.ScriptFile) = lowercase(ErrorData.Module) then
begin;
ErrorData.Module:= '';
TMufasaTab(Form1.Tabs[i]).ScriptFrame.ErrorData := Self.ErrorData;
TMufasaTab(Form1.Tabs[i]).ScriptFrame.HandleErrorData;
Exit;
end;
Form1.LoadScriptFile(ErrorData.Module,true);
ErrorData.Module:= '';
Form1.CurrScript.ErrorData := Self.ErrorData;
Form1.CurrScript.HandleErrorData;
exit;
end;
end;
MakeActiveScriptFrame;
ScriptErrorLine:= ErrorData.Row;
SynEdit.Invalidate;
if ErrorData.Col = -1 then
SynEdit.SelStart:= ErrorData.Position
else
SynEdit.LogicalCaretXY := Point(ErrorData.Col,ErrorData.Row);
if pos('error',lowercase(ErrorData.Error)) > 0 then
formWriteln(Format('%s at line %d',[ErrorData.Error,ErrorData.Row]))
else
formWriteln(Format('Error: %s at line %d',[ErrorData.Error,ErrorData.Row]));
end;
procedure TScriptFrame.MakeActiveScriptFrame;
var
i : integer;
begin
if Form1.Visible then
for i := 0 to OwnerPage.PageCount - 1 do
if OwnerPage.Pages[i] = OwnerSheet then
begin;
OwnerPage.TabIndex := i;
if OwnerSheet.CanFocus then
OwnerSheet.SetFocus;
exit;
end;
end;
procedure TScriptFrame.ScriptThreadTerminate(Sender: TObject);
begin
FScriptState:= ss_None;
Form1.RefreshTab;
end;
procedure AddKey(const SynEdit : TSynEdit; const ACmd: TSynEditorCommand; const AKey: word;const AShift: TShiftState);
begin
with SynEdit.KeyStrokes.Add do
begin
Key := AKey;
Shift := AShift;
Command := ACmd;
end;
end;
constructor TScriptFrame.Create(TheOwner: TComponent);
var
MarkCaret : TSynEditMarkupHighlightAllCaret;
begin
inherited Create(TheOwner);
OwnerSheet := TTabSheet(TheOwner);
OwnerPage := TPageControl(OwnerSheet.Owner);
StartText:= SynEdit.Lines.text;
ScriptDefault:= StartText;
ScriptName:= 'Untitled';
ScriptChanged := false;
FScriptState:= ss_None;
ScriptErrorLine:= -1;
OwnerSheet.Caption:= ScriptName;
SynEdit.Options:= SynEdit.Options- [eoGroupUndo];
SynEdit.Options:= SynEdit.Options+ [eoGroupUndo,eoPersistentCaret];
SynEdit.IncrementColor.Background := $30D070;
SynEdit.HighlightAllColor.Background:= clYellow;
SynEdit.HighlightAllColor.Foreground:= clDefault;
MarkCaret := TSynEditMarkupHighlightAllCaret(SynEdit.MarkupByClass[TSynEditMarkupHighlightAllCaret]);
if assigned(MarkCaret) then
begin
with MarkCaret.MarkupInfo do
begin;
Background :=$E6E6E6;
FrameColor := clGray;
end;
MarkCaret.Enabled := True;
MarkCaret.FullWord:= True;
MarkCaret.FullWordMaxLen:= 3;
MarkCaret.WaitTime := 1500;
MarkCaret.IgnoreKeywords := true;
end;
AddKey(SynEdit,ecCodeCompletion,VK_SPACE,[ssCtrl]);
// TSynPasSyn(SynEdit.Highlighter).NestedComments:= false; Does not work :(
end;
destructor TScriptFrame.Destroy;
begin
inherited Destroy;
end;
initialization
{$I framescript.lrs}
end.

View File

@ -1,381 +1,381 @@
unit simpleanalyzer;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, SynEdit, SynHighlighterPas,MufasaBase, Clipbrd;
type
TScriptVar = record
VarName, VarType : string;
end;
{ TScriptMethod }
TScriptMethod = class(TObject)
BeginPos, EndPos : integer;
isFunction : Boolean;
Name : string;
Parameters,Vars : array of TScriptVar;
ParameterLen,VarLen : integer;
Returns : String;
Methods : Array of TScriptMethod;
MethodLen : Integer;
function AddMethod( iszehfunction : boolean; TheName : string): TScriptMethod;
procedure AddVar( TheName, TheType : string);
procedure AddParam( TheName : string);
constructor create( iszehfunction : Boolean; TheName : string);
function CreateMethodStr : string;
Destructor Destroy; override;
end;
{ TScriptAnalyzer }
TScriptAnalyzer = class(TObject)
ScriptToAnalyze : string;
ScriptName : string;
Methods : Array of TScriptMethod;
MethodLen : Integer;
Main : TScriptMethod;
HasMain : boolean;
Vars : Array of TScriptVar;
VarLen : integer;
Function AddMethod( iszehfunction : boolean; Name : string): TScriptMethod;
procedure AddVar( TheName, TheType : string);
procedure analyze;
constructor create;
Destructor Destroy; override;
end;
implementation
uses
mPasLex,strutils;
destructor TScriptAnalyzer.Destroy;
var
i : integer;
begin;
for i := 0 to MethodLen - 1 do
Self.Methods[i].Free;
Main.Free;
inherited;
end;
destructor TScriptMethod.Destroy;
var
i : integer;
begin;
for i := 0 to MethodLen - 1 do
Self.Methods[i].Free;
inherited;
end;
constructor TScriptMethod.create( iszehfunction : Boolean; TheName : string);
begin;
inherited Create;
Self.isFunction := iszehfunction;
Self.Name := TheName;
end;
function TScriptMethod.CreateMethodStr: string;
var
i : integer;
LastType : string;
begin
if isFunction then
result := 'function ' + Name
else
result := 'procedure '+ name;
if ParameterLen > 0 then
begin;
result := result + '(';
LastType := '';
for i := 0 to ParameterLen - 1 do
begin;
if lasttype <> '' then
if lowercase(lasttype) <> lowercase(Parameters[i].VarType) then
result := result + ' : ' + LastType + '; '
else
result := result + ', ';
result := result + Parameters[i].VarName;
lasttype := Parameters[i].VarType;
end;
Result := result + ' : ' + Parameters[ParameterLen - 1].VarType + ')';
end;
if isFunction then
result := result + ' : ' + Returns
else
result := result + ';';
end;
constructor TScriptAnalyzer.create;
begin;
inherited create;
ScriptName := 'Default';
Main := TScriptMethod.create(false,'!main');
end;
procedure TScriptMethod.addVar( TheName, TheType : string);
begin;
inc(Self.VarLen);
SetLength(Self.Vars, self.varlen);
Self.Vars[Self.VarLen - 1].VarName := TheName;
Self.Vars[Self.VarLen - 1].VarType := TheType;
end;
procedure TScriptAnalyzer.AddVar( TheName, TheType : string);
begin;
inc(Self.VarLen);
SetLength(Self.Vars, self.VarLen);
Self.Vars[Self.VarLen - 1].VarName := TheName;
Self.Vars[Self.VarLen - 1].VarType := TheType;
end;
function TScriptMethod.AddMethod( iszehfunction : boolean; TheName : string) : TScriptMethod;
begin;
inc(Self.MethodLen);
SetLength(Self.Methods, Self.MethodLen);
Self.Methods[Self.Methodlen - 1] := TScriptMethod.create(iszehfunction,TheName);
Result :=Self.Methods[Self.Methodlen - 1];
end;
function TScriptAnalyzer.AddMethod( iszehfunction : boolean; Name : string) : TScriptMethod;
begin;
inc(Self.MethodLen);
SetLength(Self.Methods, Self.MethodLen);
Self.Methods[Self.Methodlen - 1] := TScriptMethod.create(iszehfunction,Name);
Result :=Self.Methods[Self.Methodlen - 1];
end;
procedure TScriptMethod.AddParam(TheName: string);
begin;
inc(Self.ParameterLen);
SetLength(Self.Parameters, self.ParameterLen);
Self.Parameters[Self.ParameterLen - 1].VarName := TheName;
end;
procedure TScriptAnalyzer.analyze;
var
LastTk : TTokenKind;
StartPos,LastPos: integer;
LastTkString : string;
I : integer;
TempInt : integer;
InMethod : Boolean;
ExpectingType : boolean; //Params and result
WaitingForResult : boolean;
StartParam : integer;
StartVar : integer;
Method : TScriptMethod;
InTypes : Boolean;
TempName : string;
BeginCount : integer;
InGlobal : boolean;
InParams : boolean;
InVarSection : Boolean;
Lex : TmwPasLex;
begin
Lex := TmwPasLex.Create;
Lex.Origin := PChar(Self.ScriptToAnalyze);
InTypes := False;
InMethod := False;
InParams := False;
Method := nil;
BeginCount := 0;
ExpectingType := False;
WaitingForResult := False;
StartParam := 0;
InVarSection := False;
while (Lex.TokenID <> tkNull) do
begin;
LastTk := Lex.TokenID;
LastPos := Lex.RunPos;
Lex.NextNoJunk;
case LastTk of
// tkInclude : ShowMessage(Lex.Token);
// if (FParser.Token[Length(FParser.Token)] = '}') then
// FIncludes.Add(StringReplace(LowerCase(Trim(Copy(FParser.Token, 11, Length(FParser.Token) - 11))), '/', '\', [rfReplaceAll]));
tkProgram : if Lex.TokenID = tkIdentifier then
Self.ScriptName := Lex.Token;
tkRoundOpen: begin;
LastTkString := Lex.Token;
if InMethod and InParams then
StartParam := 0;
end;
tkType : InVarSection := False;
tkBegin : begin;
InVarSection := False;
if InMethod then
inc(BeginCount)
else if BeginCount = 0 then
begin;
InVarSection := false;
InMethod := true;
HasMain := True;
Method := Main;
Main.BeginPos := LastPos - 4;
Inc(BeginCount);
end;
end;
tkCase : begin;
if InMethod then
inc(BeginCount);
end;
tkEnd : if InMethod then
begin;
Dec(BeginCount);
if BeginCount = 0 then
begin;
Method.EndPos := LastPos;
InMethod := False;
end;
end;
tkIdentifier: begin;
if (InMethod and InParams) or (InVarSection) then
begin;
{ if ExpectingType then
begin;
FormAnalyzer.SynEdit1.Lines.add(copy( FormAnalyzer.SynEdit1.Lines.Text,StartPos, LastPos - StartPos));
LastTKString := copy( FormAnalyzer.SynEdit1.Lines.GetText,StartPos, Lex.TokenPos - StartPos);
for i := StartParam to Method.ParameterLen - 1 do
Method.Parameters[i].VarType := LastTkString;
end
else
Method.AddParam(LastTkString); }
if not ExpectingType and InVarSection then
Method.AddVar(LastTKString,'') else
if not ExpectingType then
Method.AddParam(LastTKString);
end;
end;
tkVar : begin;
if InMethod and Not InParams then
InVarSection := True;
if not InMethod then
begin;
Method := Main;
InGlobal := True;
InVarSection := True;
end;
if InVarSection then
StartVar := Method.VarLen;
LastTKString := Lex.Token;
end;
tkConst : begin;
if not InMethod then
InVarSection := false;
LastTKString := Lex.token;
end;
tkComma : begin;
LastTKString := Lex.Token;
end;
tkColon : begin;
LastTkString := Lex.Token;
if (InMethod and InParams) or InVarSection then
begin;
ExpectingType := True;
StartPos := LastPos;
end
else if InMethod and WaitingForresult then
begin;
Method.Returns := Lex.Token;
WaitingForResult := False;
end;
end;
tkSemiColon : begin;
if (InMethod and InParams) or (InVarSection) then
begin;
if ExpectingType then
begin;
LastTKString := Trim(copy( ScriptToAnalyze,StartPos + 1, LastPos - StartPos - 1));
if (InParams and InMethod) then
for i := StartParam to Method.ParameterLen - 1 do
Method.Parameters[i].VarType := LastTkString
else
for i := StartVar to Method.VarLen - 1 do
Method.Vars[i].VarType := LastTKString;
ExpectingType := False;
end;
LastTkString := Lex.Token;
StartParam := Method.ParameterLen;
StartVar := Method.VarLen;
end;
end;
tkRoundClose: if InMethod and InParams then
begin;
if ExpectingType then
begin;
LastTKString := Trim(copy(ScriptToAnalyze,StartPos + 2, LastPos - StartPos - 2));
for i := StartParam to Method.ParameterLen - 1 do
Method.Parameters[i].VarType := LastTkString;
ExpectingType := False;
end;
InParams := False;
end;
tkProcedure,
tkFunction : begin;
if (InVarSection or (InMethod and InParams)) and ExpectingType then
begin;
//Do nothing since the this procedure/function is a var ;-)
end else
begin;
if not InMethod then
InVarSection := False;
if (not InTypes) and (not InVarSection) then
begin;
WaitingForResult := LastTK = tkFunction;
if Lex.TokenID <> tkIdentifier then
begin;
mDebugLn('Analyzer: No method name -> exiting');
exit;
end;
TempName := Lex.Token;
TempInt := Lex.TokenPos;
Lex.NextNoJunk;
if Lex.TokenID = tkRoundOpen then
InParams := True
else if Lex.TokenID = tkPoint then
begin;
mDebugLn('Analyzer: In class definition?');
// FormAnalyzer.SynEdit2.Lines.add('In class definition *cough*');
Lex.NextNoJunk;
TempName := Lex.Token;
end else if ((Lex.TokenID = tkSemicolon) xor WaitingForResult) or ((Lex.TokenID = tkColon) xor WaitingForResult) then
begin;
InParams := False;
end else
begin;
mDebugLn('Analyzer: You''re missing some stuff in the procedure declaration');
Exit;
end;
if InMethod then
Method := Method.AddMethod(WaitingForResult,TempName)
else
Method := Self.AddMethod(WaitingForResult,TempName);
InMethod := true;
Method.Beginpos := TempInt;
end;
end;
end;
end;
// SynEdit2.Lines.Add(TokeToString(Lex.TokenID) + '-' + Lex.Token);
end;
end;
end.
unit simpleanalyzer;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, SynEdit, SynHighlighterPas,MufasaBase, Clipbrd;
type
TScriptVar = record
VarName, VarType : string;
end;
{ TScriptMethod }
TScriptMethod = class(TObject)
BeginPos, EndPos : integer;
isFunction : Boolean;
Name : string;
Parameters,Vars : array of TScriptVar;
ParameterLen,VarLen : integer;
Returns : String;
Methods : Array of TScriptMethod;
MethodLen : Integer;
function AddMethod( iszehfunction : boolean; TheName : string): TScriptMethod;
procedure AddVar( TheName, TheType : string);
procedure AddParam( TheName : string);
constructor create( iszehfunction : Boolean; TheName : string);
function CreateMethodStr : string;
Destructor Destroy; override;
end;
{ TScriptAnalyzer }
TScriptAnalyzer = class(TObject)
ScriptToAnalyze : string;
ScriptName : string;
Methods : Array of TScriptMethod;
MethodLen : Integer;
Main : TScriptMethod;
HasMain : boolean;
Vars : Array of TScriptVar;
VarLen : integer;
Function AddMethod( iszehfunction : boolean; Name : string): TScriptMethod;
procedure AddVar( TheName, TheType : string);
procedure analyze;
constructor create;
Destructor Destroy; override;
end;
implementation
uses
mPasLex,strutils;
destructor TScriptAnalyzer.Destroy;
var
i : integer;
begin;
for i := 0 to MethodLen - 1 do
Self.Methods[i].Free;
Main.Free;
inherited;
end;
destructor TScriptMethod.Destroy;
var
i : integer;
begin;
for i := 0 to MethodLen - 1 do
Self.Methods[i].Free;
inherited;
end;
constructor TScriptMethod.create( iszehfunction : Boolean; TheName : string);
begin;
inherited Create;
Self.isFunction := iszehfunction;
Self.Name := TheName;
end;
function TScriptMethod.CreateMethodStr: string;
var
i : integer;
LastType : string;
begin
if isFunction then
result := 'function ' + Name
else
result := 'procedure '+ name;
if ParameterLen > 0 then
begin;
result := result + '(';
LastType := '';
for i := 0 to ParameterLen - 1 do
begin;
if lasttype <> '' then
if lowercase(lasttype) <> lowercase(Parameters[i].VarType) then
result := result + ' : ' + LastType + '; '
else
result := result + ', ';
result := result + Parameters[i].VarName;
lasttype := Parameters[i].VarType;
end;
Result := result + ' : ' + Parameters[ParameterLen - 1].VarType + ')';
end;
if isFunction then
result := result + ' : ' + Returns
else
result := result + ';';
end;
constructor TScriptAnalyzer.create;
begin;
inherited create;
ScriptName := 'Default';
Main := TScriptMethod.create(false,'!main');
end;
procedure TScriptMethod.addVar( TheName, TheType : string);
begin;
inc(Self.VarLen);
SetLength(Self.Vars, self.varlen);
Self.Vars[Self.VarLen - 1].VarName := TheName;
Self.Vars[Self.VarLen - 1].VarType := TheType;
end;
procedure TScriptAnalyzer.AddVar( TheName, TheType : string);
begin;
inc(Self.VarLen);
SetLength(Self.Vars, self.VarLen);
Self.Vars[Self.VarLen - 1].VarName := TheName;
Self.Vars[Self.VarLen - 1].VarType := TheType;
end;
function TScriptMethod.AddMethod( iszehfunction : boolean; TheName : string) : TScriptMethod;
begin;
inc(Self.MethodLen);
SetLength(Self.Methods, Self.MethodLen);
Self.Methods[Self.Methodlen - 1] := TScriptMethod.create(iszehfunction,TheName);
Result :=Self.Methods[Self.Methodlen - 1];
end;
function TScriptAnalyzer.AddMethod( iszehfunction : boolean; Name : string) : TScriptMethod;
begin;
inc(Self.MethodLen);
SetLength(Self.Methods, Self.MethodLen);
Self.Methods[Self.Methodlen - 1] := TScriptMethod.create(iszehfunction,Name);
Result :=Self.Methods[Self.Methodlen - 1];
end;
procedure TScriptMethod.AddParam(TheName: string);
begin;
inc(Self.ParameterLen);
SetLength(Self.Parameters, self.ParameterLen);
Self.Parameters[Self.ParameterLen - 1].VarName := TheName;
end;
procedure TScriptAnalyzer.analyze;
var
LastTk : TTokenKind;
StartPos,LastPos: integer;
LastTkString : string;
I : integer;
TempInt : integer;
InMethod : Boolean;
ExpectingType : boolean; //Params and result
WaitingForResult : boolean;
StartParam : integer;
StartVar : integer;
Method : TScriptMethod;
InTypes : Boolean;
TempName : string;
BeginCount : integer;
InGlobal : boolean;
InParams : boolean;
InVarSection : Boolean;
Lex : TmwPasLex;
begin
Lex := TmwPasLex.Create;
Lex.Origin := PChar(Self.ScriptToAnalyze);
InTypes := False;
InMethod := False;
InParams := False;
Method := nil;
BeginCount := 0;
ExpectingType := False;
WaitingForResult := False;
StartParam := 0;
InVarSection := False;
while (Lex.TokenID <> tkNull) do
begin;
LastTk := Lex.TokenID;
LastPos := Lex.RunPos;
Lex.NextNoJunk;
case LastTk of
// tkInclude : ShowMessage(Lex.Token);
// if (FParser.Token[Length(FParser.Token)] = '}') then
// FIncludes.Add(StringReplace(LowerCase(Trim(Copy(FParser.Token, 11, Length(FParser.Token) - 11))), '/', '\', [rfReplaceAll]));
tkProgram : if Lex.TokenID = tkIdentifier then
Self.ScriptName := Lex.Token;
tkRoundOpen: begin;
LastTkString := Lex.Token;
if InMethod and InParams then
StartParam := 0;
end;
tkType : InVarSection := False;
tkBegin : begin;
InVarSection := False;
if InMethod then
inc(BeginCount)
else if BeginCount = 0 then
begin;
InVarSection := false;
InMethod := true;
HasMain := True;
Method := Main;
Main.BeginPos := LastPos - 4;
Inc(BeginCount);
end;
end;
tkCase : begin;
if InMethod then
inc(BeginCount);
end;
tkEnd : if InMethod then
begin;
Dec(BeginCount);
if BeginCount = 0 then
begin;
Method.EndPos := LastPos;
InMethod := False;
end;
end;
tkIdentifier: begin;
if (InMethod and InParams) or (InVarSection) then
begin;
{ if ExpectingType then
begin;
FormAnalyzer.SynEdit1.Lines.add(copy( FormAnalyzer.SynEdit1.Lines.Text,StartPos, LastPos - StartPos));
LastTKString := copy( FormAnalyzer.SynEdit1.Lines.GetText,StartPos, Lex.TokenPos - StartPos);
for i := StartParam to Method.ParameterLen - 1 do
Method.Parameters[i].VarType := LastTkString;
end
else
Method.AddParam(LastTkString); }
if not ExpectingType and InVarSection then
Method.AddVar(LastTKString,'') else
if not ExpectingType then
Method.AddParam(LastTKString);
end;
end;
tkVar : begin;
if InMethod and Not InParams then
InVarSection := True;
if not InMethod then
begin;
Method := Main;
InGlobal := True;
InVarSection := True;
end;
if InVarSection then
StartVar := Method.VarLen;
LastTKString := Lex.Token;
end;
tkConst : begin;
if not InMethod then
InVarSection := false;
LastTKString := Lex.token;
end;
tkComma : begin;
LastTKString := Lex.Token;
end;
tkColon : begin;
LastTkString := Lex.Token;
if (InMethod and InParams) or InVarSection then
begin;
ExpectingType := True;
StartPos := LastPos;
end
else if InMethod and WaitingForresult then
begin;
Method.Returns := Lex.Token;
WaitingForResult := False;
end;
end;
tkSemiColon : begin;
if (InMethod and InParams) or (InVarSection) then
begin;
if ExpectingType then
begin;
LastTKString := Trim(copy( ScriptToAnalyze,StartPos + 1, LastPos - StartPos - 1));
if (InParams and InMethod) then
for i := StartParam to Method.ParameterLen - 1 do
Method.Parameters[i].VarType := LastTkString
else
for i := StartVar to Method.VarLen - 1 do
Method.Vars[i].VarType := LastTKString;
ExpectingType := False;
end;
LastTkString := Lex.Token;
StartParam := Method.ParameterLen;
StartVar := Method.VarLen;
end;
end;
tkRoundClose: if InMethod and InParams then
begin;
if ExpectingType then
begin;
LastTKString := Trim(copy(ScriptToAnalyze,StartPos + 2, LastPos - StartPos - 2));
for i := StartParam to Method.ParameterLen - 1 do
Method.Parameters[i].VarType := LastTkString;
ExpectingType := False;
end;
InParams := False;
end;
tkProcedure,
tkFunction : begin;
if (InVarSection or (InMethod and InParams)) and ExpectingType then
begin;
//Do nothing since the this procedure/function is a var ;-)
end else
begin;
if not InMethod then
InVarSection := False;
if (not InTypes) and (not InVarSection) then
begin;
WaitingForResult := LastTK = tkFunction;
if Lex.TokenID <> tkIdentifier then
begin;
mDebugLn('Analyzer: No method name -> exiting');
exit;
end;
TempName := Lex.Token;
TempInt := Lex.TokenPos;
Lex.NextNoJunk;
if Lex.TokenID = tkRoundOpen then
InParams := True
else if Lex.TokenID = tkPoint then
begin;
mDebugLn('Analyzer: In class definition?');
// FormAnalyzer.SynEdit2.Lines.add('In class definition *cough*');
Lex.NextNoJunk;
TempName := Lex.Token;
end else if ((Lex.TokenID = tkSemicolon) xor WaitingForResult) or ((Lex.TokenID = tkColon) xor WaitingForResult) then
begin;
InParams := False;
end else
begin;
mDebugLn('Analyzer: You''re missing some stuff in the procedure declaration');
Exit;
end;
if InMethod then
Method := Method.AddMethod(WaitingForResult,TempName)
else
Method := Self.AddMethod(WaitingForResult,TempName);
InMethod := true;
Method.Beginpos := TempInt;
end;
end;
end;
end;
// SynEdit2.Lines.Add(TokeToString(Lex.TokenID) + '-' + Lex.Token);
end;
end;
end.

View File

@ -1,22 +1,22 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TSimbaUpdateForm','FORMDATA',[
'TPF0'#16'TSimbaUpdateForm'#15'SimbaUpdateForm'#4'Left'#3#6#1#6'Height'#3'K'#1
+#3'Top'#3#219#0#5'Width'#3#217#1#13'ActiveControl'#7#12'UpdateButton'#11'Bor'
+'derIcons'#11#12'biSystemMenu'#10'biMinimize'#0#7'Caption'#6#12'Update Simba'
+#12'ClientHeight'#3'K'#1#11'ClientWidth'#3#217#1#8'OnCreate'#7#10'FormCreate'
+#6'OnShow'#7#15'CleanUpdateForm'#10'LCLVersion'#6#6'0.9.29'#0#12'TProgressBa'
+'r'#16'DownloadProgress'#4'Left'#2#8#6'Height'#2#29#3'Top'#3#12#1#5'Width'#3
+#198#1#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#6'Smooth'#9#8'TabOrd'
+'er'#2#0#0#0#7'TButton'#12'UpdateButton'#4'Left'#3#131#1#6'Height'#2#25#3'To'
+'p'#3','#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6
+#7'Update!'#7'OnClick'#7#17'UpdateButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'
+#11'CloseButton'#4'Left'#2#8#6'Height'#2#25#3'Top'#3','#1#5'Width'#2'K'#7'An'
+'chors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#5'Close'#7'OnClick'#7#16'Clo'
+'seButtonClick'#8'TabOrder'#2#2#0#0#5'TMemo'#9'UpdateLog'#4'Left'#2#8#6'Heig'
+'ht'#3#253#0#3'Top'#2#8#5'Width'#3#198#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
+'akRight'#8'akBottom'#0#8'TabOrder'#2#3#0#0#6'TLabel'#13'DownloadSpeed'#4'Le'
+'ft'#2'`'#6'Height'#2#14#3'Top'#3'2'#1#5'Width'#2'N'#7'Anchors'#11#6'akLeft'
+#8'akBottom'#0#7'Caption'#6#13'DownloadSpeed'#11'ParentColor'#8#7'Visible'#8
+#0#0#0
]);
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TSimbaUpdateForm','FORMDATA',[
'TPF0'#16'TSimbaUpdateForm'#15'SimbaUpdateForm'#4'Left'#3#6#1#6'Height'#3'K'#1
+#3'Top'#3#219#0#5'Width'#3#217#1#13'ActiveControl'#7#12'UpdateButton'#11'Bor'
+'derIcons'#11#12'biSystemMenu'#10'biMinimize'#0#7'Caption'#6#12'Update Simba'
+#12'ClientHeight'#3'K'#1#11'ClientWidth'#3#217#1#8'OnCreate'#7#10'FormCreate'
+#6'OnShow'#7#15'CleanUpdateForm'#10'LCLVersion'#6#6'0.9.29'#0#12'TProgressBa'
+'r'#16'DownloadProgress'#4'Left'#2#8#6'Height'#2#29#3'Top'#3#12#1#5'Width'#3
+#198#1#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#6'Smooth'#9#8'TabOrd'
+'er'#2#0#0#0#7'TButton'#12'UpdateButton'#4'Left'#3#131#1#6'Height'#2#25#3'To'
+'p'#3','#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6
+#7'Update!'#7'OnClick'#7#17'UpdateButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'
+#11'CloseButton'#4'Left'#2#8#6'Height'#2#25#3'Top'#3','#1#5'Width'#2'K'#7'An'
+'chors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#5'Close'#7'OnClick'#7#16'Clo'
+'seButtonClick'#8'TabOrder'#2#2#0#0#5'TMemo'#9'UpdateLog'#4'Left'#2#8#6'Heig'
+'ht'#3#253#0#3'Top'#2#8#5'Width'#3#198#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
+'akRight'#8'akBottom'#0#8'TabOrder'#2#3#0#0#6'TLabel'#13'DownloadSpeed'#4'Le'
+'ft'#2'`'#6'Height'#2#14#3'Top'#3'2'#1#5'Width'#2'N'#7'Anchors'#11#6'akLeft'
+#8'akBottom'#0#7'Caption'#6#13'DownloadSpeed'#11'ParentColor'#8#7'Visible'#8
+#0#0#0
]);

View File

@ -1,64 +1,64 @@
program new;
{$LoadDLL libsmart}
function IsKeyDown(C:Char): Boolean;
begin
Result := SmartIsKeyDown(ord(c));
end;
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;
procedure KeyUp(key: byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;
procedure KeyDown(key: byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;
var
w,h:integer;
begin
SmartSetup('http://world19.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503);
SetTargetArray(SmartImageArray(), 765,503);
getclientdimensions(w,h);
writeln(inttostr(w) + ' , ' + inttostr(h));
if findcolortolerance(w,h,00000,0,0,764,502,300) then
smartmovemouse(w,h);
savescreenshot('/tmp/smart.bmp');
//Wait(5000);
end.
program new;
{$LoadDLL libsmart}
function IsKeyDown(C:Char): Boolean;
begin
Result := SmartIsKeyDown(ord(c));
end;
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;
procedure KeyUp(key: byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;
procedure KeyDown(key: byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;
var
w,h:integer;
begin
SmartSetup('http://world19.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503);
SetTargetArray(SmartImageArray(), 765,503);
getclientdimensions(w,h);
writeln(inttostr(w) + ' , ' + inttostr(h));
if findcolortolerance(w,h,00000,0,0,764,502,300) then
smartmovemouse(w,h);
savescreenshot('/tmp/smart.bmp');
//Wait(5000);
end.

View File

@ -1,142 +1,142 @@
program new;
var
Bmpz : integer;
w,h : integer;
begin
Bmpz := BitmapFromString(166, 73, 'beNq9Xf2PVeURtv+Jv' +
'zeKSYvZaNlc2/S4N22tmtoYE0NsLdYQQoiClpgNQaSUUpRSpFhC/a' +
'yIX0QCVaOtxn/MYWd39rnPM/Pecz/OJm82994958z7vjPvfM+c1ZW' +
'f/+RHOtZWd9vwD/T7eLT7Fz+9z/7G17g+LrYfbdC99ks3mvil2/jF' +
'nxDP8YfbX/8Q/8WB/wro9KM/wQbOKmau42f33W0Dv6aXLTgcCu6Dz' +
'6cbreDqYi3+tRttbm8nk9/YwxVcFG07ogORopitNieQjo/y22/jdH'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FUOdspksM4okml9bq4J+EmnE61lUI0J69vEdNUq' +
'Q4lZpZG+tLhS++s2ClLUXE21Aqzg7ia7J6X1renO0Bmvuv8lGs5W3' +
'xXcE6wyaNQKRduHgE6sW/fWSSLdbfWcTFXPsNJ5LO9wTAveUxcxvf' +
'WV6psUv423Syd8dbLrO/HqwPu2RiQSilKMegawti01UJtJ3w4iIe2' +
'ry1KUA7kh/QmPgetGv8Ew37Q1Qa9uRUUfsEZibUP/SZ1saRd9dbv1' +
'gZVSTtuVpMt0PkzqE5VETZWA9ORAYtxORWo4HJuqd6EyhpGdBsanM' +
'pM+fH7qXVRxSZ6WbsS9QJMebtBVLH1PqzZk07pdJOxutBsNn0huof' +
'6H6avb2+2V0KYgqUdS1VFABNOoOkm3FI98BHDT0ADJgrLZi5G3j3a' +
'Po+8BCV1cWQ==');
GetBitmapSize(bmpz,w,h);
Writeln(inttostr(w) + '-' + inttostr(h));
SetBitmapSize(Bmpz,w div 2, h div 2);
SaveBitmap(Bmpz,'/tmp/test.bmp');
//FreeBitmap(Bmpz);
Bmpz := LoadBitmap('/tmp/test.bmp');
SetBitmapSize(bmpz,w,h);
SaveBitmap(Bmpz,'/tmp/test2.bmp');
program new;
var
Bmpz : integer;
w,h : integer;
begin
Bmpz := BitmapFromString(166, 73, 'beNq9Xf2PVeURtv+Jv' +
'zeKSYvZaNlc2/S4N22tmtoYE0NsLdYQQoiClpgNQaSUUpRSpFhC/a' +
'yIX0QCVaOtxn/MYWd39rnPM/Pecz/OJm82994958z7vjPvfM+c1ZW' +
'f/+RHOtZWd9vwD/T7eLT7Fz+9z/7G17g+LrYfbdC99ks3mvil2/jF' +
'nxDP8YfbX/8Q/8WB/wro9KM/wQbOKmau42f33W0Dv6aXLTgcCu6Dz' +
'6cbreDqYi3+tRttbm8nk9/YwxVcFG07ogORopitNieQjo/y22/jdH' +
'XF1+W/2GSqDcSlxTPxK2IWf8Tf/bE+W7rXL/NpBDbjXzGlWMsD994' +
'V0/av9//4h36N345LC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1renO0Bmvuv8lGs5W3' +
'xXcE6wyaNQKRduHgE6sW/fWSSLdbfWcTFXPsNJ5LO9wTAveUxcxvf' +
'WV6psUv423Syd8dbLrO/HqwPu2RiQSilKMegawti01UJtJ3w4iIe2' +
'ry1KUA7kh/QmPgetGv8Ew37Q1Qa9uRUUfsEZibUP/SZ1saRd9dbv1' +
'gZVSTtuVpMt0PkzqE5VETZWA9ORAYtxORWo4HJuqd6EyhpGdBsanM' +
'pM+fH7qXVRxSZ6WbsS9QJMebtBVLH1PqzZk07pdJOxutBsNn0huof' +
'6H6avb2+2V0KYgqUdS1VFABNOoOkm3FI98BHDT0ADJgrLZi5G3j3a' +
'Po+8BCV1cWQ==');
GetBitmapSize(bmpz,w,h);
Writeln(inttostr(w) + '-' + inttostr(h));
SetBitmapSize(Bmpz,w div 2, h div 2);
SaveBitmap(Bmpz,'/tmp/test.bmp');
//FreeBitmap(Bmpz);
Bmpz := LoadBitmap('/tmp/test.bmp');
SetBitmapSize(bmpz,w,h);
SaveBitmap(Bmpz,'/tmp/test2.bmp');
end.