Browse Source

Initial Release on http://luaforge.net

Jean-Francois Goulet 20 years ago
parent
commit
a456c82af2
100 changed files with 4892 additions and 0 deletions
  1. 616 0
      LuaEdit/About.dfm
  2. 87 0
      LuaEdit/About.pas
  3. 109 0
      LuaEdit/AddBreakpoint.dfm
  4. 125 0
      LuaEdit/AddBreakpoint.pas
  5. 128 0
      LuaEdit/AddToPrj.dfm
  6. 117 0
      LuaEdit/AddToPrj.pas
  7. 93 0
      LuaEdit/AsciiTable.dfm
  8. 46 0
      LuaEdit/AsciiTable.pas
  9. 25 0
      LuaEdit/Bin/Caller.lua
  10. BIN
      LuaEdit/Bin/Convert.exe
  11. 4 0
      LuaEdit/Bin/Function.lua
  12. BIN
      LuaEdit/Bin/Graphics/Exclamation.ico
  13. BIN
      LuaEdit/Bin/Graphics/LuaEditLogo.ico
  14. BIN
      LuaEdit/Bin/Graphics/Project.ico
  15. BIN
      LuaEdit/Bin/Graphics/Unit.ico
  16. 130 0
      LuaEdit/Bin/Help/AsciiTable.txt
  17. BIN
      LuaEdit/Bin/Help/LuaEdit.chm
  18. BIN
      LuaEdit/Bin/Help/refman-5.0.pdf
  19. BIN
      LuaEdit/Bin/LuaEdit.exe
  20. BIN
      LuaEdit/Bin/LuaEditSys.dll
  21. BIN
      LuaEdit/Bin/lua.dll
  22. 716 0
      LuaEdit/Breakpoints.dfm
  23. 313 0
      LuaEdit/Breakpoints.pas
  24. 107 0
      LuaEdit/CntString.dfm
  25. 48 0
      LuaEdit/CntString.pas
  26. 88 0
      LuaEdit/Connecting.dfm
  27. 73 0
      LuaEdit/Connecting.pas
  28. 122 0
      LuaEdit/Contributors.dfm
  29. 53 0
      LuaEdit/Contributors.pas
  30. 573 0
      LuaEdit/EditorSettings.dfm
  31. 640 0
      LuaEdit/EditorSettings.pas
  32. 85 0
      LuaEdit/ErrorLookup.dfm
  33. 67 0
      LuaEdit/ErrorLookup.pas
  34. 87 0
      LuaEdit/ExSaveExit.dfm
  35. 31 0
      LuaEdit/ExSaveExit.pas
  36. 28 0
      LuaEdit/FunctionList.dfm
  37. 35 0
      LuaEdit/FunctionList.pas
  38. 57 0
      LuaEdit/GoToLine.dfm
  39. 56 0
      LuaEdit/GoToLine.pas
  40. BIN
      LuaEdit/Graphics/DotNet_Style/AddBreakpoint.bmp
  41. 108 0
      LuaEdit/Graphics/DotNet_Style/AddBreakpoint.~dfm
  42. 125 0
      LuaEdit/Graphics/DotNet_Style/AddBreakpoint.~pas
  43. BIN
      LuaEdit/Graphics/DotNet_Style/AddFile.bmp
  44. BIN
      LuaEdit/Graphics/DotNet_Style/AddToWatch.bmp
  45. BIN
      LuaEdit/Graphics/DotNet_Style/Break.bmp
  46. BIN
      LuaEdit/Graphics/DotNet_Style/BreakOnBreakpoint.bmp
  47. BIN
      LuaEdit/Graphics/DotNet_Style/BreakOnEmptyBreakpoint.bmp
  48. BIN
      LuaEdit/Graphics/DotNet_Style/Breakpoint.bmp
  49. BIN
      LuaEdit/Graphics/DotNet_Style/BreakpointCondition.bmp
  50. BIN
      LuaEdit/Graphics/DotNet_Style/Breakpoints.bmp
  51. BIN
      LuaEdit/Graphics/DotNet_Style/CONNECT2.ICO
  52. BIN
      LuaEdit/Graphics/DotNet_Style/CallStack.bmp
  53. BIN
      LuaEdit/Graphics/DotNet_Style/CheckSyntax.bmp
  54. BIN
      LuaEdit/Graphics/DotNet_Style/Comment.bmp
  55. BIN
      LuaEdit/Graphics/DotNet_Style/Copy.bmp
  56. BIN
      LuaEdit/Graphics/DotNet_Style/CurrentStack.bmp
  57. BIN
      LuaEdit/Graphics/DotNet_Style/Cut.bmp
  58. BIN
      LuaEdit/Graphics/DotNet_Style/Delete.bmp
  59. BIN
      LuaEdit/Graphics/DotNet_Style/DisableAllBreakpoints.bmp
  60. BIN
      LuaEdit/Graphics/DotNet_Style/EmptyBreakpoint.bmp
  61. BIN
      LuaEdit/Graphics/DotNet_Style/EnableAllBreakpoints.bmp
  62. BIN
      LuaEdit/Graphics/DotNet_Style/Find.ico
  63. BIN
      LuaEdit/Graphics/DotNet_Style/FindAgain.bmp
  64. BIN
      LuaEdit/Graphics/DotNet_Style/FindInFiles.bmp
  65. BIN
      LuaEdit/Graphics/DotNet_Style/GoToLine.bmp
  66. BIN
      LuaEdit/Graphics/DotNet_Style/GoToLine.ico
  67. BIN
      LuaEdit/Graphics/DotNet_Style/Help.bmp
  68. BIN
      LuaEdit/Graphics/DotNet_Style/HelpBook.bmp
  69. BIN
      LuaEdit/Graphics/DotNet_Style/Indent.bmp
  70. BIN
      LuaEdit/Graphics/DotNet_Style/LuaEditLogo.ico
  71. BIN
      LuaEdit/Graphics/DotNet_Style/LuaGlobals.bmp
  72. BIN
      LuaEdit/Graphics/DotNet_Style/LuaLocals.bmp
  73. BIN
      LuaEdit/Graphics/DotNet_Style/LuaOutput.bmp
  74. BIN
      LuaEdit/Graphics/DotNet_Style/LuaStack.bmp
  75. BIN
      LuaEdit/Graphics/DotNet_Style/Messages.bmp
  76. BIN
      LuaEdit/Graphics/DotNet_Style/New.bmp
  77. BIN
      LuaEdit/Graphics/DotNet_Style/NewBreakpoint.bmp
  78. BIN
      LuaEdit/Graphics/DotNet_Style/NewProject.bmp
  79. BIN
      LuaEdit/Graphics/DotNet_Style/NewUnit.bmp
  80. BIN
      LuaEdit/Graphics/DotNet_Style/Open.bmp
  81. BIN
      LuaEdit/Graphics/DotNet_Style/OpenProject.bmp
  82. BIN
      LuaEdit/Graphics/DotNet_Style/Output.bmp
  83. BIN
      LuaEdit/Graphics/DotNet_Style/Paste.bmp
  84. BIN
      LuaEdit/Graphics/DotNet_Style/Pause.bmp
  85. BIN
      LuaEdit/Graphics/DotNet_Style/Play.bmp
  86. BIN
      LuaEdit/Graphics/DotNet_Style/Print.bmp
  87. BIN
      LuaEdit/Graphics/DotNet_Style/Project.bmp
  88. BIN
      LuaEdit/Graphics/DotNet_Style/ProjectSettings.bmp
  89. BIN
      LuaEdit/Graphics/DotNet_Style/ProjectTree.bmp
  90. BIN
      LuaEdit/Graphics/DotNet_Style/Redo.bmp
  91. BIN
      LuaEdit/Graphics/DotNet_Style/RemoveAllBreakpoints.bmp
  92. BIN
      LuaEdit/Graphics/DotNet_Style/RemoveFile.bmp
  93. BIN
      LuaEdit/Graphics/DotNet_Style/Restart.bmp
  94. BIN
      LuaEdit/Graphics/DotNet_Style/Rings.bmp
  95. BIN
      LuaEdit/Graphics/DotNet_Style/RunToCursor.bmp
  96. BIN
      LuaEdit/Graphics/DotNet_Style/Save.bmp
  97. BIN
      LuaEdit/Graphics/DotNet_Style/SaveAll.bmp
  98. BIN
      LuaEdit/Graphics/DotNet_Style/SaveAs.bmp
  99. BIN
      LuaEdit/Graphics/DotNet_Style/SaveProjectAs.bmp
  100. BIN
      LuaEdit/Graphics/DotNet_Style/Search.bmp

+ 616 - 0
LuaEdit/About.dfm

@@ -0,0 +1,616 @@
+object frmAbout: TfrmAbout
+  Left = 320
+  Top = 189
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsSingle
+  Caption = 'About LuaEdit'
+  ClientHeight = 289
+  ClientWidth = 409
+  Color = clWhite
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object imgLuaLogo: TImage
+    Left = 312
+    Top = 8
+    Width = 88
+    Height = 88
+    Cursor = crHandPoint
+    Picture.Data = {
+      0A544A504547496D6167655D110000FFD8FFE000104A46494600010100000100
+      010000FFDB00430006040506050406060506070706080A100A0A09090A140E0F
+      0C1017141818171416161A1D251F1A1B231C1616202C20232627292A29191F2D
+      302D283025282928FFDB0043010707070A080A130A0A13281A161A2828282828
+      2828282828282828282828282828282828282828282828282828282828282828
+      28282828282828282828282828FFC00011080080008003012200021101031101
+      FFC4001D000001050101010100000000000000000000040506070809030201FF
+      C400441000010303010505030808030900000000010203040005110607122131
+      410813516171142281152332374291A1B1526272747582B3C117339224343843
+      5694A2C2D1FFC4001A0101000203010000000000000000000000000306020405
+      01FFC40031110002010303030105070500000000000000010203041105213112
+      134151142232A1B10623344271C1D161728191F0FFDA000C0301000211031100
+      3F00D534514500514514014514500514DAFDD92DDC9309B8739F73290A71B64F
+      76807A959C0FBB26BEAE8F5CDB52136C8719F041DE53D20B6127A700939A01C2
+      8A4935C9C88695438EC3B2B86F36E3A509F3C2B74FE55F8C49922DCA7E6C32DB
+      E80A258657DE938E5BA70324D00B28A436ABA31724B8594486D6D1016DBECA9B
+      5249F250E3F0A5D40145346AAD4B68D296776E77F9CD43868E1BCBE254AE894A
+      47151E1C8551F70ED4B606A5A9106C373911C1C77AE3886C9F309E3F89AD9A16
+      95ABACD38E51E3925C9A1E8AAF766BB5DD2FAF9CF66B5C87235C82778C296908
+      7081CCA704850F439F102AC2A8AA529D2974CD6184F3C051451519E8514536B4
+      BB93D797379088F6D606E8DEC297214403BC3F4523978939E5D4021DD5336E4F
+      C68B1DE5B0C652E4A2375BDF071B89CF151E792380C73A18B3456AE6BB82CBCF
+      CB24EE2DE70ABBA07ECA07248F419A72A8C6BAD77A7B4441127515C1B614B04B
+      4C27DF79DFD940E27D790EA6B2842537D315963824F4564BD63DA82EB25C719D
+      276A620B1C84899F3AE91E212084A7D0EF555D74DAF6BDB9AD4A91AA6E48CF48
+      CB0C0FB900575E968971359962246EA23A0B45739D9DA16B265CDF6F55DF42BF
+      7F74FF00ED529B06DE75FD9DC1BD79170687FCA9CCA5C07F98615F8D493D06B2
+      5EEC933CEEA377D36DAED0DDB1E74C59127D996384671CDF43673CD39C91E99C
+      79551BA07B4CD9AE6E3717574155A1F51C7B5324BAC13E63E923FF0021E26AFD
+      813235C21B32E048664C5793BEDBAD2C2D0B1E208E04572ABDAD5B778AB1C122
+      927C186FB48EB195A9F69371885D57C9D697150E3B40FBA14938715EA540F1F0
+      00555553ADB8D8A469FDA9EA38D210A4A5F96B96CA8F2536EA8AC11F791EA0D4
+      16AEF6918C6841438C235A5C8A2DB3A55B27C79B6F7DC8F2E3B81D69D6CE1485
+      039045744F66BA8CEADD0B65BE29212ECB8E14E84F20E0252BC796F035CE415D
+      09D8958E469DD9669DB6CD416E4A23F7AE215CD0A714A70A4F98DEC7C2B91AF4
+      63DB84BCE7E5FF0060929724DE8A2BCA5B8E3515E71968BCEA105486C100AC81
+      C071F1AAB9308AE6DCF7E7C16A2AFB8869577B21E046F2B77186C0F02799F018
+      EB4E548ACADCA6AD51937177BE99B99755803DE3C4818E83381E42A2DB60D72C
+      680D172AEAB087262FE661B2A3FE63C41C67C860A8F90C75ACE9D39549284796
+      1BC115DBBED8E36818A6D768EEE56A479190857144549E4B58EA4F44FC4F0E78
+      B6F977B85F6E6FDC6F131E9935F3BCB79D56547CBC87801C074AF3BADC65DDAE
+      5267DC5F5C89925C2EBAEACE4AD44F13496AED63630B48616F2F2CD6949C828A
+      28ADE310A70B0D92E5A82E2DC0B241913A62F8A5A6105471D49F01E678537819
+      381C4D6FFD89ECFE1E83D1B163A5947CAD29B4BB39F23DE538467733FA29CE00
+      F53CC9AD0D42F959C13C65BE0CA11EA665C6FB3C6D09517BE36D8897319EE4CC
+      6F7FF3C7E35E3A2F586B2D8AEA3F61BA4294D425AB79FB6CAC84389EAB6D5C40
+      3FAC9C83D735BAAA23B51D0F6FD79A5255AE736812024AE24823DE61DC70503E
+      04E011D4570E1AC3AAFB77314E2C93B78DD114D51A5F4A6DDF45C2BA41925A90
+      94911E6A120BB1D5F69A713D403CD39F3078E4D1170ECCFAD5896A6E2BF6994C
+      67DD7448523879A4A723E19A62D876BF95B36D6EA8D7252D36892EFB35C19278
+      36A077438078A4F3F1191E15BB1B5A5C4256DA8290A194A927208F115956AB71
+      A5CBB74DE60F8C8494F7667DD92F6758DA76E6C5DF57CB62E5358505B311849E
+      E10B1C42945401591D0600F5AD074DB3A44B8F77B7A50D9720BFBED3BBA824B6
+      BC652A27F478287A914E55C8B8B9A9732EBA8F248925C0536CF9725178B6448C
+      8CB4F1716FACA49094253C067A12A527E00D395218F700FDE26C04B647B336D2
+      CB9BDCCAF7B863CB77F1A80F45D58AFB586AC5DF36886D0CB84C1B3361909078
+      1794029C3EBF453FCA6B6938B0DB6A5A8E1291927CAB9A5A8EE4BBC6A0B9DCDD
+      254E4C92E48513E2A5157F7AEEE85454AACAA3FCABEA4555ED81BA8A92ECF745
+      DCB5DEA0167B33915B95DD2DEDE92B2946EA719E20139E23A5345FAD6FD92F77
+      0B5CC2DAA4C27D71DC2D92525485149C12070C8F0AB3AA9172E84F721C0868A2
+      8ACC1EB0DD0C4B65E29DE0DAD2B23C70735D33B6CD62E56E8B3622C391E4B497
+      9B58E4A4A8641FB8D731EAFCD83EDD53A46DEDE9FD54879FB4367FD9A534379C
+      8C09FA253F6919E231C4798C01C7D62CE771052A7BB8F833A7249EE6C4AF975C
+      434D2DC754942100A94A51C0007326A028DB2ECFD717DA06A9801BC67077C2FF
+      00D18DEFC2A8CDB8EDFD9BF5AA4D834507D10E424B72A7B892853883CD0DA798
+      07A93838C8C75AAEDBE9F5EB4FA7A5AFEAD1339A450FAB273573D53799F1FF00
+      C99535E7D1FB2A714A1F81AD9DD97F562F52ECD23C694E15CDB42FD8965478A9
+      B032D9FF0049DDFE5AC395A1BB185D54CEB0BEDA8A886E5424BF8E854DAC0FC9
+      C3565D5A8295ABC7E521A6FDE35A4E71D6A148723A038F21B5290827014A00E0
+      7DF5E7699A8B8DAE24D6F8224349740F0C8CE295523B5CD666B2F18C85212C3C
+      B8E524018521441C63A70AA69B02CA4719F88E5CA6B2CA5225B496FBF2118241
+      077727AF5F4A5948DA8B199BA489085E25496D01692AE69467040FE6E7E9407C
+      DF778D96E1DDFD3F67731EBBA6B99B5D3F5A42D0A4A8652A1823C45734F545AD
+      765D4975B5BA9295C394EB0411FA2A23FB558FECFC97DE47F4FDC86AF82D6EC8
+      DF5B49FDC1FF00CD155F6D4FEB2F567F1595FD555583D91BEB693FB83FF9A2AB
+      EDA9FD65EACFE2B2BFAAAAEA53FC6CFF00B57D4C1FC245EA62E6CF6E88D9AB5A
+      DCC885F25B8FFB386B795DF6F6F14E71BB8C6478D43AB40CBFF83C83FC4CFF00
+      5D7535D55952E8E9F3248F22B3928AB25B9DBBDE605B6329097E6486E3B6A592
+      1214B5048271D3269E3683A3E7E86D4AF592EAF467A534843857194A5230A191
+      C5401FC2BE7671F585A5FF008A45FEB26A7FDAA55B9B659CA290AC478E70AE47
+      DCEB495592B88D3F0D37F3431B643486C1350DE6C4CDE2EF70B7582DEFA429A3
+      39642D493C41DDE4011E241F2AF3D6FB07BFE9DD3EF5F2DF3EDD7BB5B092B757
+      0D6779081CD5BA78103AE0923C319A74D4969DA96DA3E4DB8BBA7931EDEC35BB
+      19293ECCC104E77C25C5E4E4606470C015666C636797AD09A575AB1A86642519
+      908A930187BBC2DE10E02B50E433903873C79573AA5E55A4BAE55239CFC2BF5F
+      5E4CD453DB0642ABA7B236F7F8B1EEE702DEFEF7A651FDF154B5689EC5F6953D
+      AAEFD7629F9B8D0D31C2B1F69C5857E4D9FBEB7B51928DACDBF43187C46B7A47
+      6C4424264FC9E50429F597B7559F9DCFBD9F039E94B2915A6DE9B732F369714E
+      175F71F529431C56A2AC7C338F85514D916D37CBB777F78B7CF43810A8C9710A
+      1BB9EF10B03867A714A4FC29C293DCA209D6F93154B5B61E6D48DF412149C8E6
+      08EA2805158C3B5A692559B5F22F6C37885786C2C903825F400958F88DD57C4D
+      6C6B626526DD193702DAA5A5B01D5367292AC7123D6A33B56D13175EE8D99679
+      052DC83F3B15F50CF72F273BAAF43920F9135BDA75D7B2D7537C3D998CE39465
+      7EC8FF005B29FDC1FF00CD15EBAFB627AFAEBAE350DC2058BBD892AE0FBECAFD
+      A991BC8538A20E0AF23811CEAAF0EEA0D09A965B0CBF2ED3788A551DD2D2CA16
+      9F1191CC1C039E4460D3A7F8A5AEBFEADBD7FDD2BFFB5699D1ADDE75E8B58692
+      DF3FB1026B186395E362DAF6CF6A9972B8D8FB98511A53CF39ED4CAB75091927
+      01793C3C2AD0D396599AB7B271B7581BF6CB8439CB7171DBE2B3BAE951481D55
+      BAA040EBD2A969FB46D637084FC39DA9AECFC57D05B75A724A8A5692304119E2
+      0D25D1BAD750E8D94EBFA6AE8FC153B8EF109C290E6396F2140A4FAE295685C5
+      582EA6BA934D738DBD426913AD8BECE2FAFEB9B65CEF56D956AB35AA4225C995
+      39A5309F7140A503780C92A0070E59A90EDC13057DA5E026F1B9F2729E8024EF
+      FD1EEFDDDECF9639F9556FAAF6A5ACB5521A6EF57C90EB2D389750D3494B280B
+      49C8510803241E2339C546AF779B8DF6E0B9D799B2274C580953CFACAD440180
+      32691B6AD3ABDDAAD2D9AC21949611A27B4FB1AFA46AF6E3DA59BCB9A70B0811
+      DBB721C2D9563DFDF08FB59E5BDD318EB4EFD9DF41DFB4FE99D5B2EFB1D71A6D
+      DA16E4684EFF00BC29294AFDF52798C950001E3E9C334958F6CFAF6C96C45BE0
+      EA178C66D210D879A6DE5200E4029692703D69B2DBB4AD5F6ED4EEEA162FB295
+      7675BEE5C79EC3814DE73B852A053BB9E2063874AD6F62B8EC76174A4BCEFBE3
+      D7D3E665D4B3922D36248832571A6B0EC790DE02DA75050A49C750788ADC5D99
+      B492B4BECCA23B29B289D7557B6BA1438A52A003693FCA01C78A8D501B1FD257
+      5DB06D1646A1D50B322DEC3A8767BE5B084BEB00043202401C4019C7248F122B
+      6B2404A425200006001D2B4F5ABBCC55BF9E5FF07B4E3E44F746E43B6D94DC35
+      213256D292D2967002883827E35FB6D8A20DBA2C54A8A830D25BDE3CCE063349
+      642273B7D89B854DDBD96D4E384287CEB87DD4A08E78032AF5C79D3955749828
+      A28A01B66479A2EF12544777A3E0B52185AB09DDE6169FD60787983E54E54536
+      C183261DCE5AC4A2EC07F2E069CC9534E13C774FE81E78E87970A02BADB8EC82
+      16D0A0FB6412DC3D44C2375A7C8F75E48E4DB98E9E0AE63CC70AC55A974FDD34
+      CDD9EB65F613D0E6B47DE6DC1CC78A4F2503D08C8AE94B2EB6F369719710E36A
+      E4A41C83F1A64D61A3EC5AC2DDEC5A8ADCCCC6867714A185B64F542C7149F43E
+      B5D7B0D5656CBB73DE3F344728677473768AD35ACBB2DBE971C7B47DE90B6F9A
+      635C06EA8790712307E291EB5575D761DB42B73842F4EBD210392E2BADBA0FC0
+      2B3F8559296A16D5566335FE76FA91383456D454D9AD93EBC717BA9D297607F5
+      98291F79E1529B07677D7B745A7DAE1C4B5B44FD3972124E3F651BC7EFC5492B
+      BA105994D7FB3CE96CA82ACBD90EC8AF5B419ADBFB8B836142BE7A72D3C158E6
+      96C1FA4AFC075F03A0340F66ED376471B95A91F72F92D3821A527BB8E0FEC649
+      57C4E0F855E31D86A330DB319A432CB6909436DA425290390007215C6BCD6E29
+      38DBF3EBFC12469FA8DBA534EDB74AD8A2DA2C91931E1474E1291C4A8F5528F5
+      513C49A5776765336F7976F603F2F186D0A56E8DE271927C0733D70294B8A210
+      BEEC0538064249C64F4E3D290D923CD663ADCBA490F4A795BEA4A3836D70C042
+      3AE06399E24E4F9556A5272797C930A60B4EB30D86E4BE643E9400B748037D58
+      E2703957BD14578028A28A00A28A280416FB4C5B7CA90F424AD94BFEF2D94ABE
+      6F7BAA8279027AE39D7C5B6E8A9529D8B2214A8925B0558713942D39C652B194
+      9E9C381F2A72A28028A6D6ECB0D9B999EC079A7D4A2A7021E5843848C7BC8CEE
+      9FBA89F0EE2F4B4BB0EE82332000595474B80F1E2739078D00E58A2915D23CE9
+      086C5BE7221A81F7D4A603BBC3C0648C57EB909C7ED822C996F970A405BEC9EE
+      96A23A8C72CF9500A5E710CB2B75C3BADA1254A3E0073A456AB926E8DBCB623C
+      A658180DBAF37B9DE67AA41E38F502BDADB6F8F6D8E598A1C082A2B5171C538A
+      528F324A8934AA806EB45A58B6075685BAFCA7882F48795BCE38472C9E400E80
+      600A71A28A00A28A280FFFD9}
+    Proportional = True
+    OnClick = imgLuaLogoClick
+  end
+  object Image1: TImage
+    Left = 8
+    Top = 8
+    Width = 289
+    Height = 89
+    Cursor = crHandPoint
+    Picture.Data = {
+      0A544A504547496D616765052A0000FFD8FFE000104A46494600010200006400
+      640000FFEC00114475636B7900010004000000640000FFEE002641646F626500
+      64C0000000010300150403060A0D000008A600001B1F0000220600002A03FFDB
+      0084000101010101010101010101010101010101010101010101010101010101
+      0101010101010101010101010101020202020202020202020203030303030303
+      0303030101010101010102010102020201020203030303030303030303030303
+      0303030303030303030303030303030303030303030303030303030303030303
+      03030303FFC20011080051017E03011100021101031101FFC400EE0001000104
+      030101000000000000000000000504060708020309010A010101000000000000
+      0000000000000000000110000103040201020404070000000000000603040500
+      0102071708271315401214169036371810205011313326110000050203030607
+      070E0A0B000000000102030405001112130621D1143122933415074151713223
+      16A6618191B27324471040A14262728292D3942535B5D6B1C1523374263676B6
+      173050A243536354645666961201000000000000000000000000000000901301
+      00020201030304010501010000000001001121314110516140719120F081A1B1
+      3050C1D1F190E1FFDA000C03010002110311000001F7CC8726CEE000008E20D3
+      E132B2A479467C4905E49DEBD800000000000000000001ABE952771B0AB66A57
+      1C4902CE5B9535A8E6703B0CFE6AC1125D45A664C244DA15FA00000000000000
+      00000D0A4DF55D0A4C945FABE7D26C61DA4E2C7262B36AD7CBA2F54DD8382E30
+      4C6C6153DBD5D014DF65A8000000000000000000068426FBAF8BE9761EBA2F81
+      46FA18653A57D113CDB4DE25F2C4914F5FD7C434F40572B1E6027E8017C9D4F5
+      7D7980000000000000000003CFC4905A4354933C85C4C97911AB954D4E4DCB5E
+      26ABA66E28CC765EA60536D16C74DAF2A000100280080A00008002D7995CD4D2
+      417815E7514E551F4A43B4A923C15E70290AA3895A50954499F4005110E48128
+      7D00A6288953E8001D041924579124996B26C898DCE2800000000000001401C4
+      D4A21CA72F22E0210BB8C7C5519C0C68751F0B54D95359C89526693019246E89
+      B2EA000000000000000001C4D0E4965D674CBA502DE64B24115E4194AB1C6114
+      F43971E241982D731259E5BAB326494DE45000000000000000000F86A125A65E
+      66362DD268D932C0382E144B98A05864905CC493661E5C7697D14C4D1B226605
+      00000000000000000010E511701682549F4B8D690B05260EC298A9294BB17B8B
+      3D27CA33A0AA5B94FA000000000000000000000000000000000003FFDA000801
+      0100010502CD54D3B5A518DF2C73C73B7F3AAE9042AF371B6AF7B8DA45EB65FF
+      0082AE9046B09168A56524CF0BA6E1256D92C96358E58E5F186B2F741F27AC23
+      D371AE67B29D885574D1C7EE48AF5149B60962DA7639DDDC4A336B8DCBE12D76
+      F32C1DD95530292CCF4DC5E795B4D455AEE23710B92588239AA4DE6581C971B4
+      7A3AEA286065B19C04916360B9584802E975B5D98B7248EF8BD8DF9A2B465FFE
+      6B684E290D09C7421EB6A89B6E7F3C771B0A031A3838B9BE0F41F4FB19628104
+      C4186B691F73D9DB4600A4A0118690EC8A1693C89409687D62D9DB30AD7FADA3
+      09FB20A7A61FAFB4D6B13E0A406F5A466DCA848C01847697FAFE2B637E68AD56
+      4A6D030FB5CA5EBD1DAEA9253AB1E762DCD9A0986E9E952B8F659F5B87B639FD
+      FE503D159DF33EDCA6B29AF35B45768CEDEA5285CA9996EC0FAEFB0FA89E8FDF
+      9D98FC97A17F4A77645A2F4F6BAF1787F62C7FC7C56C6958B6B2CB766F47B7CF
+      F745A2AB6D6C603D87431D91D7ECE196ED76AAB106DBDA7ADF620D82760C1C7E
+      026BB1BA306D49DDF9A74907F5A9D8686925FB43A2F1BFEE8B4556D8D8C05B13
+      118ECA04B58E69D92D090729B676C6B7D8037ADF746AE0D092B2513282485EC9
+      EB26F139ECDD64E2693DA03BF27288ED7288ED7288ED7288ED7288ED7288ED72
+      88ED7288ED7288ED7288ED7288ED7288ED7288ED7288ED7288ED7288ED7288ED
+      7288ED7288ED7288ED7288ED7288ED7288ED7288ED21B2601C6769C657670880
+      D2AEB286EBA5EFECBD72A4E3FAF6952919D7956BD9FAE749C775E92A523BAF4A
+      D5A1FAE76AC62BAED85F261D7CCEDECBD72AF65EB9526C3AF68D291BD795ABD9
+      BAE55846F5E53ACA33AF19DF069A013B2917D7756E932EBF215E0AAF055782AB
+      C155E0AA51CE8246BDE7AE5493EEBEAF5E0AAF055782ABC1559ADA112AC1FF00
+      5F14BF82AF5E0AAF055782ABC155E0AACD4D0C9DAF31D74C6E93BEBFAF5FDF44
+      DA9490EBDA34C9F6885946D7C7E491158C92B5F578EDEFC5C3B5C5C3B5C5C3B5
+      C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3
+      B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5C3B5C5E3B527
+      AF44DE1E1B6B2EACEBE5D212D3AE157E981C6DE363C16470904C0E3D486830E9
+      9A32061A425CF352EBB1266DF5F0D271B9C68462AFB783FA8FD883314D82A00F
+      9665AF45DF25B101A15B647A03D58D7CE2045755CCCC17040DC34567A97530F8
+      ABFD560115089598FD9DF1521FABFB799E9A7AF6799C03693D9FB246BAF71536
+      FA1364E9CD5330C24F448B953D3F4F615BE525DFB28DE22025CDD82C25B2A733
+      8EEB980CEA8FFAD1A9CFD95A1C697242D8ED74F2F8BC3E906513338F6604DE1F
+      14308B0C33DAE4AD5D8EF6ABE92FAD7597A3FB676DEB7187C54DB24981B98348
+      53F9D270DC548F2479AE8F63096418480589251905A94121ED130C7517EB4A4F
+      9C6A79948C520A22806F2820FB5F349D0B5F586B3958615070296D681D321315
+      E84B927D545493B534D489396232E6929B0D80C92437D78BCD06BC7F11203F84
+      1E388D7C53962DDD59BC4B26B7BE38E56710118E6E843306F6F6763F3E09E29E
+      2E1AA2E715046194C9B0FC635A5A06357A4C72292BA9031AAD6237138D20D516
+      D6550497C6E37137CED1CD2D8610EC70C97838E734DA218B4FEA5FFFDA000801
+      0200010502FC043FFFDA0008010300010502FC043FFFDA0008010202063F0204
+      3FFFDA0008010302063F02043FFFDA0008010101063F02B9CC050F76B0F104BF
+      96AE51B87FA0F48A14BE51AEB49FE306FAEB49FE306FAF44A94DE41FA9E95429
+      7CA35CC5883EFD58CB9007CB574CE06F20D6D3943DFAE68DFEBC878BCC51224B
+      4BC5C59CE90802A42C83E41A18C9898A7282800B6CB8085EB890D47AA8C6BDF2
+      CCEE2B2FE0086037D9A41C986E2648A6F842B11CD60ACBE2098BC570AC6758A0
+      5F285614572187DC10AC4AAC5287BA35878B4FF18B5741729F678C29C69A59EB
+      E668A70EEE4B363D44135F120F63DA816EE1BB94F059E8FDADEF426F5B35B05F
+      C00FE12DFE1F1ABFADBADBF3F84FDDFA8366D24651FA724590158F26B3554C4E
+      0C58013070ACD9943171437B80F2500ACE0851C37F3829D6982C93C6E9A10CEE
+      57323556E45FE6EFA35A5AEBB7729E0F9FFF0026F7A6124D25A65E9DF4D21162
+      4925D9A8994AAB19177889C330686C77641E110B5476A075333CD567667D8926
+      2E58A6DC3859176CCB84ABC73953695BEDE772D4C439DE2EAA317C2811576A26
+      6706E2239ABC1CC3269A29F9CE3C050D946909F75D86D06E2DA35014DC491C04
+      14C2774A5CED59800E13600CD3980440D963492C5540C27200F2DFEBCD13FDF2
+      D2BFB758FD469FD1C9F169C384CD844A89CDB3C95C4766B9CDBDF176D4EDAFF7
+      9DA783EC5290B32551D342E9B75260991D3A6A39C8C844B629B319AE82BB08F4
+      DB2F6DB510FE11B2CD167BA81BC6AA63C8C93CC48AB1D2AE84B85F3C7242F3DA
+      176805F6576BCD3D769C3116149AC7B4585B9A44C8980173B9724F4A9B4C574E
+      C9091513008E2280739943482CC594E498628D8977ADE61B4A48144C728198C7
+      ABA808E9D009D33073083B4A34BEA2D32E1EA2DA3C1351FC43874B3D4059E222
+      6B396ABBB3A8ED355003661C0EA1CA6200DAC3CAE5C5EF8B45C98FC333A72A72
+      0B454D7ABBA99F766766CC768C8C4F07C34C47BC79FA422517120DF888F6EAA5
+      E8CA38B1E11E688D101DF7B39E21E78FF98DDE11F17E3C405211FABE6D6D412A
+      58F2BE68AF6B4ACC948476BACDB2D13CA249382AAAAAC76814BB79BEF15C6B35
+      5DC948B94CA6518A120ED9318EC5CEC844F1ABB75DCAC4BE13A8650486FB5287
+      28BED63A1DF67BB41848690956EC3519A7A312702FE3645DA6F01CB99172CE65
+      A9D8A4514F3930290DCE4EE206AD3A6F16B563FB0752541EA3D4DA6C64E55D1E
+      5C1675DB7A85963E127249923E823A59A362E041B1436102F6DBB6B5A68AD4DD
+      9F0DA0E2205A291E8CB6A67F10D929070C34B39C012EE259B3C555395FB93603
+      2E6D97D96285AA050EEC5D463A8A5537FC68C4EA35F51A2197C07078DC2D2726
+      295C0EA5B9C18BDDB513EF43EBBD13FDF2D2BFB758FD46ED1F680D72D9422652
+      18ABE91D409D8402DF6D1E14A12462E4E2CEE1BAD904928F76C0CB6594B9B945
+      749242A65E61715B92E1E3FA9A8CCFA1DFB0474F69A7DA7E54CEDBA887093AAC
+      CC328118A82850B3B2251CB09C9CA5C3B796B4DAC3E0D6CC7F60EA4DD4D753BF
+      D71ABF47B7956F9EC59689943C24928D4E24E11E3E9312B94CC47488098112A0
+      3E8CC43665EE408F8D172FF5A77AE8CDC5407684D2FAAF594B04D1176CD1178E
+      E424857D3683C833265CC552C0A31C9102814C41286B63078348EA41F821DE52
+      B7FF00C2247F6CE9CAD47AC21508F732711D8FC323289385981BB427A2E2D6CF
+      4DA3A64E0D85BBD30970A85E7807286C14545DB6832665B10271B381CBE2C5A9
+      8F5A36726FB349C3CCE9864E8B1C9B849A8C7A13C574A89CABBB76A62B3A3DC7
+      17256B6ECBCFED3F5475276770B7E2B8EEC679C270D6DB9FC461C1F7553FD919
+      9D99EA61BB4F2BAAF6876CC4F65E7DB6711C3F1797F738EB4F7F7D58FEC0D495
+      A67E5B51FF008AA72BBC139C8061FD0BF634A4207F17D469C3E5E3C92725BF93
+      416FAEF4EC93E5CA8348DD410B22E96C275329BB1926CE97572D229D55302490
+      8D8A0261F0050A6B6B6C072EC10F56F571BEC9200C5AFEDC7B33AC7F77EB4E7A
+      B338594458A5380F6EC64E3F2B8CEC8E1B9B28C99194CCE18FE6DED6DBCA14D5
+      96B3955A0E5A3DBB768B2831B2726D64B28A2903C6AA44347EA104E44C0CA155
+      2A784E7B171805E994620F9EAD0AA3770B3FD5278C97458B454A4BB566DE37B3
+      559B7AE175361C4504924C2C2073ED00898DD35A84B26E5AEA36B24AA4319331
+      F81B271530D4CAE3938E6499ACABC20580716DE4E5A63A7F593E5A1D68366931
+      6B209B17B24C5FB16A0441914A48B6EF1E37768B60029C0C9658E0C407B9B015
+      F6A4D1D16DB51EAB95F44F5C4469B534F3F785C491BF4CCECB4547B95501CB0B
+      581C9B1102E50E509F8363ACCA2E65A1656311CCD3FAA52266BE62BB526232B0
+      89940B895DBB69499D432A48D623A69DC795C0367AFAEE1591887054B2639B3B
+      5F9C9B438DF0E1D9CBC9561D71610FFD67587EEFD7F6E3D99D63FBBF5A7434D4
+      E164D16449AE2CC2C6523851175D93C36C9364C8C7C7C31FCDBDADB6DB29265A
+      EE4578795628A48A9200C1FC9B397C0183894FB25ABD728393E1C4A90E994802
+      3CD30F20767412C564C65D6772F313717A4E423630245503E628FDBA5168CC48
+      4C3E51325D406A720946E65AE186A2A3F4D6A12CA396BA8DB48AA89A32663F03
+      64E2E61A995C7271CC931B2AEC81601C5B79396A16027753163E45A292E2B350
+      889E7997C5CE493D47D3B08B74D8D8D172536C38DAFB76D6A9988B7E9BD8E95E
+      CF16CE85370DB3410848E64A7A078937729E059B98BCE205EDE2A6696A99D5A1
+      661BA69B47882913352055D64124CA77ADD7896120970EE4D7100398AA146E02
+      1C8230EBE8672C01826D9D03E06310E20DB028AB82289FA072CE3CCA2A611504
+      C397E1E51F017E748F207FBC2EFAEB48F481BEBAD23D206FAEB48F481BEBAD23
+      D206FAEB48F481BEBAD23D206FAEB48F481BEBAD23D206FAEB48F481BEBAD23D
+      206FAEB48F481BEBAD23D206FAEB48F481BEBAD23D206FAEB48F481BEBAD23D2
+      06FAEB48F481BEBAD23D206FAEB48F481BEBAD23D206FAEB48F481BEBAD23D20
+      6FAEB48F481BEBAD23D206FA0211CA4223F761BE8EF7303248002237F18807F1
+      D4E06B84B4EAAD4538BE083531230E85FF0048F1590128024FF878F0FB97A113
+      C5772A26F08998E8611F7EE95EBF54F727F98685FC957A265DCD25F26DB4493E
+      2902AEAC7F730A7CA35D107F8C41AFD57DCA7E65A17F275E89877329FC9B5D10
+      4F8A40AF4AC7B9957E51AE883FC620D6C8BEE503C8CB42FE4EAE58DEE58A3E32
+      B3D0E03F0827563B3EE6CE1E2337D1260F80495FAA7B93FCC742FE4ABF54F727
+      F98685FC957A265DCD25F26DB4493E2902BD2B0EE655F946BA20FF0018835FAA
+      7B93FCC742FE4ABD1B0EE613FBC6BA20BFC040AB9E3FB9838F8CCD343987ECA7
+      58536DDCF103C444745943E002D5D58EEE5D41F1A8D3439C7FDA4C6BD0B4EE71
+      1F92434527F14A15F44DEC7D7D137B1F5F44DEC7D7D137B1F5F44DEC7D5D65FB
+      9F483FE62BA2C9F1842BF5B7727F9F685FCAD7A079DCDADF24E344A9F14E35F4
+      4DEC7D7D137B1F5F44DEC7D7D137B1F57555EE8530F19CFA309F1842B0A6F3B9
+      B38F888E344987E003D6CFF2947FF8FAFA26F63EBE89BD8FAFA26F63EBE89BD8
+      FAFA26F63EAEA29DD1103C67368D287D91AB1A53B9528F885EE8601F8054AF42
+      EBB9D5BE496D14A7C530D6D1EE97D8EAB2AFBB9A4BE51CE8827C638507673CEE
+      91557C1C138D1C752FEE64184D52423C2F63FAD6861FE67B3BB17D656F7FFB6E
+      03B3FF00032FDCAB3848A6F2942AFC2A3D186EAEAA8F461BABAAA3D186EAEAA8
+      F461BABAAA3D186EAEAA8F461BABAAA3D186EAEAA8F461BABAAA3D186EAEAA8F
+      461BABAAA3D186EAEAA8F461BABAAA3D186EAEAA8F461BABAAA3D186EAEAA8F4
+      61BABAAA3D186EAEAA8F461BABAAA3D186EAEAA8F461BABAAA3D186EAEAA8F46
+      1BABAAA3D186EAEAA8F461BABAAA3D1977569ED3D271C93B8D92564C8E5A828E
+      1AE68378591789FA766AB7704C0B3729B9A70E4F154486B284EC85A78CF422BF
+      48F788FF008A347F09C5FEAB7EF4886571C97F3983162D97B0DA255D00D534D9
+      015E0C8987B7CD8FAA707FDA031940B066F99EFF008281354AD31072F3495893
+      235FC5256050AD2FEE812838745B1AFE22177569B62B334946927A82123DCA3C
+      E4B39B3D936CD964B311326AA7989AA217288183C03504EE074F9239CBED4AD6
+      3D65864259EE36EA46CB393259720FDDA45BA8D4A3700036CF2D24E546E80060
+      BED217C5E4A14848D7100DBCD2502781A5F93CD2566289B5B5AFE6977502252B
+      3B88DB90940AA2DD030085F610BBA98C6B54132AF26F9947238530C59AF9CA4D
+      8960B6D1C4A5460EB88A4E21C4C71478E2F1FDE03F32E0CC5B83831938778F41
+      B94A6744B660100DB70DF09ACDCFA0104474F8C7A18B9B30377DC43ACD1FD3BF
+      3DEAF95F71EFDE95722DD10C2988F985F1792835CF7AEA9F837246AB99115E51
+      B3364490B702D136F0405977AFC415015300980043617094C63477783DDE18C3
+      00B119BB3B6170E9EB55E35EAA44D278CCEFF1C8A0B20758335358C36280DF01
+      8820672B0017241AA623E2F3D3FAEF457F489CFF000C4D56914BBD644CB3CBCD
+      1B4A94BEB672876476C0FF00564413FF00A4EB3F81F6F50D17DDF1059C5CB765
+      C6114384A882520FE4556B986ED71E2C4A5495487F93EFDEB4F24CB4B9A6A4A7
+      CEF934001DA51EA384E288C8641E494B999BF5CEB09A412C04CA101B88060294
+      0295EF560181A0E49284949E21F0A4573FD5F59E25311AF5444080FD1118E5CA
+      89C6C37C27000B9882C66F51A5C545847EAD7B2C89CB999CC23A7E74CE086262
+      2E680B76BE688D8C1B076545BE2C1F60316843188D0AE81DE3C780131C6566CC
+      A995248BB0A05FB61DB5A1C3C5AC74A7EDD635A45D3A30113F5EE393B986C188
+      607521BF80941C1AC5138361F34DF715DB98C4AA069BD06B89FC377725A6D337
+      C39F4EA7B188A9EA9F786E0A7BEDBB37DA98841BFB9914A9D8777DAD35BEA903
+      AB9AFE362E24F10CD4C3F3160137252AD528D29D3C275470667384709C0A5A77
+      FE61777B1BA5AC242348D3EA463AB56588703F10A2CA338C68D588A624260CB5
+      5531AF7E6610BCDC3E61D54E1E6A5A2923A83739938E7EE1A10C6E5E70951A89
+      9A9049670D625E91F1916E098AE73B7031D0CBCD3A69DC1C01476886CAD2B00C
+      747C8AA3A89F33D36B4FBE3C735908F5E4DFF0ACDB919A0121C6C799DAC4329F
+      3A4B00184408610B0C43F8D6E8306FA8D07A774D1B10116FC6C728D339D95220
+      1534CCE937E4C587CE3104C3CE11115936EA009F207600FDCD69FC5D47D7289F
+      32F9593D83A872715B665DF0DAFE1B513972BD5DD6F918F172F6CEA2E0F0F86D
+      9983078392A47971F0085BA643EBB80D44EC4C9B28C5644EB2A54565B0839889
+      0644F44826AAA6BA8E403600D69176C8C7789C184D82C2A3278DB2C644D0F82D
+      C637404D8B801E4BF2520A469721DB3322E1B2A4286249C3731554542DC042E4
+      508034D22BBD4D36AE7C7299A41E1E5CC911C89408B2B1B2302709341172050C
+      699848036001C7840D46EEF7BBB875A3A08ECFB31471C31D9B6462C4712ED59A
+      0BFCED655FDCC0B28B001840E61E718D880FA0175542C91A1F5547836E09F1CA
+      2A4CBC995902F1046C66DCF2BF2EDC760BEDA410CB02095328727B9501247B83
+      78B9D86925CE0439F022C645B3A54D813298E7C24487600088D271FA988D269B
+      B7724768B498D1D312AD91789A6AA2474924EA09C2247044973940E1CE029C43
+      C234D98E86611ED5C04924A2DC069C5A14781066F887209D48D62064F3D44F99
+      7E50BDB651342F7851AE1564845B58776C059C8AE8C9368CC918F51B398A2E73
+      75CBC2A460309913A6B16E06D806A9AD15A7A2DD6996E7D3DA8E02160546524B
+      1CA93C6AF9BB559776545D37CF9055C66A863B854D88E22A1C4D886BD4AD4AD5
+      F46A640934947CC9191F9FB79555754E70750FFA499BE48AE052039309885210
+      4A701F366A3F4B69C92828C9149BB979A85F1B504B399B9041439506DF3E565A
+      5536CD5272A18A2A9885C673D8817B9E7E4131C6DE52725A490530289E24A41F
+      B8764E62A522851C2B784029BCC22CC1FA48E3239686028E737502CA01310081
+      552F9C5F7436ECA67ADE420971D631D902D16522E738922AD4809B550C836C50
+      4BBA6C4002A6AA988C402058C184B5DBA0D5764C9935E1229A2B6CE2A42732AA
+      B971804C42B972610C405110294850B8DAE2847E9B66CD27E126928E0EDA1948
+      F5382068F48A10573326F8D3CF513E6E21BDAF6D948685EF4E21C3964D9BB36A
+      758119355BBD2470978072571107ED566FCA448B9862E1C4371C56309418E83D
+      0B16BB4D3E811A3332E66CBB56C8C6B4508A15AB423BF9F2CAB83A7E95458004
+      4046F88C61105A2EDFCE37292DF7A251FE2FAEECB100C1589248A51F702AC21B
+      2B12AD8861FBD0DD58524085F7837563C92E2F2056128582B0AA50305623354E
+      FF007A15E89B90BEF057A46E437BC1BAAE46C40FC10DD563B620FBC1BAB6354C
+      3F042AC9140A1585428183DDACCE153C5F7A1BAB2C122817C56AC4544B7F2057
+      A56E437BC1BABD0A04279003FD65FFDA0008010103013F21F32C151299CBAAAC
+      AF7EF1FD0216A7B045A98A1DA8AA0C9F61E972D0F609FA2533C5944CAB1FB833
+      0AE764416C078F596BA81F22F265D332262723033BDDD60F39E1D577A58C8C65
+      AAF110E5B5B57ED72FA4176E8F99E2202BF867B51E0FE59695975273911A3B57
+      DE1FD51B6545884D433BB4C355D20F61686ACD374D3F9C66417408E3EE0F14AA
+      CDE494210D1EF33936D49AEF515F10CEC5BFE8BC79164C2DC38D20D85B0C1222
+      BB6793A31289FB72A64E440D21CE627A580A819436C125CD515BF6060DE4F569
+      A2FA4ED5F761B15B0BB365FF00B8ACBFF47082827A76EB304DBCAAC211594D02
+      6C0BA868BA59407AE896C4A0AAD8991D422D8D1AC89686C6191598F44BDAB394
+      82046EE5D917FCA4A759000F56359494A29B6839EDA8B3691C3A969DB5C9710F
+      95CF38C2B0B0318902367E3B89372375A466BAFF002EFF0010C28F683F3200F0
+      B257171AD0AE1AFEFA3A1734C039C3894FE3BE0B28EF27C7AD56EF1E0366BCC2
+      CF68570DF6A6B3B977B4E8D78ABFC0F0E398A1498D60B77559A14AD57E0E5851
+      600A9DFDC967DA64D4C19E1F00497CACFE229ABF3FDEC4C826DB7FADB7243430
+      7E0690699CA1FB9C170E494FB72254A0457ED3096F846709F79B13F76F3A79EB
+      9FB77E1102E038E0E867CCBAE9FB94ED2B1EDEAF77B142F8FB11F691A25EF434
+      309B2E1F860C80D5D128B719AEFB94235FB7646C36125624BDF52C51CF74DF80
+      B839AF020E74AF1A2CCA3D6650450FDAE97B2D0B39D6422529677B6EF0B45154
+      A849FB76D300AC8C44119C2AAA3E4BAB14285C39149FF3C1901ABA25CEAD389C
+      C56E0FCF2C8D574D69E1F35ECAB33DA1D302EED5DBEBDCE01504648D6ACCA081
+      DA6401F88038850217D59A5FCF580142D0AAA4A0B8456A949464789139149F31
+      5A639948CEEEFD47A9B366CD9B366CD9B366CD9B366CD9B366CD9B366CD9BC52
+      001FFCA123095D50B9D6E005479E4DB0A3FE8519847355F2B0F4540D19D82F88
+      13B0F75BE62C558BB629CBA3DFA127C05FA445FC48833D137B019C4B9C71EE8E
+      AB950946760FE2062DEEEDF551BF3F7FDF388333FE0439D13FE8A3311D1B1BE1
+      AFA76DB268ADA49F99926904D89BD0C0172C97FA2DB310AD8C3DD04FFA32EB4C
+      12B40E9167C9F536DBA605BF9288956B7679F82C12C8EE24A82C06ED41FB8B5A
+      BB29F1064CB1ED336497A76D5D690DF365A5DB59188C369BF50D9B366CD9B366
+      CD9B366CD9B366CD9B366CD9B366CE34C951455392D9706D223F4709717FC0B1
+      193D7E072957C16E1DCC76802DB39964DF6FF4CAC7DAAADDFC47B4455DDC195C
+      D5DC9DC49F2C106144F30EB8B3FF00311A42ABC16F6473716BDA665B3F139004
+      A66CFE253C39136B06B2FB71DA0C8364F70924A978073C3D1DE03233067711A4
+      C5805BB176C4EF9B7A70C4580C2BDA5033D80E8177E0584540E5523AE46AE048
+      8A234D8662D17C6EBD53AE834936CEF18A24E5EC4AE9139157333C0E06203F74
+      D3019540B68805C202B30EBD63C28C0B1D09012D4568939C183818B5CAD53C2C
+      0E4511D3D818A55B5650D2D4E59763A15AD986981889428566F782B99F6FC5FA
+      E835ED1F8CDBAE31091C860D0D6ECEBD6E43DA04AD09F9B20487AE08BE61EF2F
+      D850B84B08299A879851487D165667383DA15E328C7880128C7C32EB6DFED1B1
+      B90A8B30941E21E4A9A1F73DDF1EC0D30C4D9FC82F3FE6BD5A17C14D5CE1356B
+      B71756125C4C6AAEEDD5B55931D8C62F3207022623CAADCB3251BEC0190316D9
+      E6B76C8ED25F138BDE64942970B9214D249130AB8332B63D23AA329C240B0344
+      414053F3E01357651A4370C60942B0E4184D685BCE071C4693BE3979729EE45D
+      48585CB0565BC5C693B06B6BCB65336FF3454AEBDC4B78D1D808AB18F12F1339
+      BAF02B8A8C8C31A800439D18219351662852B3365EC5C22930E05744CF4426C0
+      E405EAC819D40B491491A45290B4FB062C55539D08B54ECF8F57F02A106798A0
+      04724562A5CC56EDFF002A94F32560BF885EDC8BBE6E3885841DA20792910CC4
+      CD26EE6257B417F04CFB9E5E2F023B0C1F43F333A2C0DE3FD10C94600031182C
+      154065CD917796FDF298921541551300B9FF00E5DE6F9BCB7F31C5C765FE2515
+      558D57F71FFFDA0008010203013F21FF00C10FFFDA0008010303013F21FF00C1
+      0FFFDA000C03010002110311000010820000025A008650000000000000000000
+      0024CB4994934DA4930000000000000000000042D16984C168B6830000000000
+      0000000000C2A001838945908C00000000000000000000D2532D12894D374A92
+      49B6924DA4924DB6AD300920820000124900000100020000020825A5B6DB6DB6
+      DB6DB6924B5489D8E48ECA654E0000000000000000001282643AA92C261C2500
+      0000000000000000109549A6532834124900000000000000000002086D9293AD
+      90DA40000000000000000000000000000000000000FFDA0008010103013F1074
+      182A400E55658F7DE7BAEFCC26A948A2225894B8CFF40E1BB7EA2DCEE202937F
+      FD2F060B943ECBE20EB0AA18CD5342E1B9E6060FB2471DDF31B458BB1895ED70
+      A353546FBE531023A9608D0EC7B316CA1593BD67344D06E6DDD5FAC491CD98A6
+      622406511404DEABFD8E55CC56D9A4C2CEDB5BB8DDA400A05AB714590F8B5AAC
+      2C1F53028C376D6280B69A0BE548B2B55BD37B144574748A9110C97E7F130F99
+      AAB4E984DFE222F0319598D792CC2025EB015AE56820CF2B066B20BA4E00C9F9
+      9509B7108105AF0A4115BFFCBA55C2A9B3B465D8822C5DC83C0490506420472E
+      B890D6B00301283CF450F585803534C427998728346CB0E21681EFD293BC788E
+      5265E732BDFDA0012C4B13B3EACC440DC0A0DDC51DCE8CD829BCBB396FBD4246
+      22AA275E7767C458775B21658D002FFC096535808ADE8674124140E08345141B
+      B100068E339D1187D216330970BA68523494461039B244840DBD873AD5A84C15
+      8A1335A7F9E9CA1B894095A4BA471869573AB6691DD0E619E986CFC6A4518748
+      C487EE12B6997C2BF38E71D57C9D62F696D318984DB07ED6B75792AD288C35BC
+      61835DECB5147F4037F10935B4BA982B8656CDAE57945E50F5BB0656383820E3
+      B055B146338D69E6F85EA3F925E69534990F851A0AF55EDEE42EDFB420398E3B
+      59E783A14E24E80B9F704DE654D0231348FC26446133BB5BB53EEB596612FC07
+      E28CA5EE71B064AB1591740BCC3D197930FCB78F2C41FB76ED5FC60733E4CFFD
+      C357C2EAD372F525AA86A2D9C0E973921735BAAB5971F98AA52A306CC2CAF15E
+      AD4A57526C6D442EC519B0A6F2A0A85EEC44A000CAB8025575E64CDB8F63B665
+      5709D554B97B22091CDBBCDF956F72A21AB45DEF72B109364C2FC57B0CDD4B47
+      CB178AB307BE00525C711DBDC60757FA00B64DCB26B9BECD9D204F194B245AD2
+      79123C8A311280032AE00905AB6417B4B82D7B92D0C78A66C6973930584154AE
+      30C5A34AB34B72F54079DC9B44C3FD27F8733E5361856F3FE32AC53974F4C6AB
+      8073A5B129011A51B4A74AC98595597CC3504E0C80E47A90C1834EFDFBF5E0C1
+      837EFDF83060C1837EFDFBF7E7A334CB7C1BB8889A1FA6E8DE963292472029EB
+      F2D693A55F28D76ADEE33D39F1287F5B3CFF00A55ED694527FB25EB1DC5B812C
+      15DAD1C42684EC5EAB5C59813FED69EF12B85A3DDC35FCCC4EFF0005D581D788
+      BE565CAB9FA79F18871A76A79C212FD90D819401D8ABE3196B94DE4F5BF1A1A2
+      FD0F6B44B5DE60C7D62CD561F5E2284C6D607BAC1FCC3C0A341C7B6340200430
+      0003D8307D200097F60118322E5050213844A32AF2B933E78CC8242139114277
+      130FD0002681611771427107F3A7DAEA1CCDA5A1DC447EA0000A88CA0C0DA9A0
+      F78C5D549F5D5215BF1043855205EA93371C1316183BAA008E405A4CDECAE388
+      7B478DC89437F75599EFB3B8E77215BDF0E6AE46FD86F16B1748B25BDBE5EEF5
+      1FBF7EFDFBF7EFDFBF7EFDFBF7EFDFBF7EBC1830638FD97CA37DC78E579B9919
+      F872C9829361DF74C8401AC5A9340CAA297E7AA1590E63C704BC46785D962F03
+      80E079DCB95E485668AABF350F84CA1D106137864D773772A6B5EF6294DEAA1B
+      C1A511B320EC7EC01D6B443700C17751512AAE2A17421946DA62F9980D0B53A4
+      F230DE2504D05E901BB5DC2B11D25321B1E2A146F0C9ED568667842B35447F8E
+      DF0A726EB50C377260852BC5DC8E54215BD61C58566E1E82A6290CE4A0E130FE
+      F77D29CAD8A6A0E18A86D155793CBD51B5F7E21C9088EB51409000D9D960CB00
+      80522B3496B84CCE4461C9C6ECA888E2A54B3F25AFB31A96F5B2A83AFEA4C212
+      9CBD6D05A80634E14991DC8BB0737981477E025E16B77A18AE20A3C56A54719F
+      B66AB8BEC0C6C1F70B0CE5BD997C5B6457009593BCEF62402162984EFAD6485F
+      854F44E2DAF658AA01A36E4E65CEA30CEE7945A21018F154AF3C548942302AE4
+      66E1B549D0AC427C1834685B2E25136F395515BEB01C73E51C1E4FDCE13D31F9
+      1BAB7214E289FCBEA92C48BFC96595742C282A8285C6DC6130D2E0455CCACA7B
+      E591004706655C5CAFBD6E96C3B92245D89C7925844CD1675B8F8CBAC4B205C1
+      B1004BC849575871E200EB49E7EF17BE96804EA79DFD4D6C27C921657ADB7B44
+      241720E294F9B1A089A1F490179A1BC779C274CFB9A1C6C5293D42ACF3E8A151
+      5ABFFAB3A899D690DE077FD704AAA5571B815E36DE425147A6D8213E9C75D629
+      F6715587008246651BE7B6A0EB6D24F0A4856307FE27A5C0CAE976E2C81C8B3E
+      945ACEC68B9CD39F76BEAD3A36C65E73492C0DA2F27BAC1043B5996576A8BED4
+      0C2B6AFB8637B2472C52E0350F262868D2AD6F00843C680060D18E022F9D2E01
+      EF631F131A5CADF21FFD8A802566EBB36DB66E29812AFB6651C9C404DEB16071
+      5AA621F102815E7383501B4CD1C9AACD120470A187660C9146F90444AC88DEE5
+      89321DA56AE516BC4161BDB02B541A22A7EB403C28A6422E522534D77C9A73EF
+      2A2FA94D056AA8D5338F63A315DABFB8FF00FFDA0008010203013F10FF00C10F
+      FFDA0008010303013F10FE9ACBFA6FA59EBABE8BE97D2FA55CAFA2A513E7D719
+      7E9A9C43A9D5B95D1D74F7E9E3D61BFBF3D333DFE83A3A86FF001D6FE9E7D76B
+      ABF597D5E971847A32FA7CCF998964B259313E67CCC4B259313E67CCF99F3D2C
+      964B2592CEBEFF00D1A3FB2E3AA77944A25128944A25128944A25128944A2512
+      8944A251313E67CCF9950DCC6E30566263A6638D459A99ED3DBA575772FADFAB
+      E7C74C4D75B9CC75F573D59AD75E7D693DE5F5D7461D38CF5CCB3A63898AF12E
+      67D7574AFA595DFEFF0071207D15D02BFB9FFFD9}
+    Proportional = True
+    Stretch = True
+    OnClick = Image1Click
+  end
+  object btnClose: TButton
+    Left = 325
+    Top = 256
+    Width = 75
+    Height = 25
+    Cancel = True
+    Caption = '&Close'
+    Default = True
+    TabOrder = 0
+    OnClick = btnCloseClick
+  end
+  object GroupBox1: TGroupBox
+    Left = 8
+    Top = 104
+    Width = 393
+    Height = 145
+    Caption = 'Product Description'
+    TabOrder = 1
+    object lblVersion: TLabel
+      Left = 82
+      Top = 51
+      Width = 15
+      Height = 13
+      Caption = '1.0'
+    end
+    object Label2: TLabel
+      Left = 16
+      Top = 51
+      Width = 38
+      Height = 13
+      Caption = 'Version:'
+    end
+    object Label3: TLabel
+      Left = 82
+      Top = 34
+      Width = 115
+      Height = 13
+      Caption = 'Jean-Fran'#231'ois Goulet  -  '
+    end
+    object Label5: TLabel
+      Left = 16
+      Top = 34
+      Width = 34
+      Height = 13
+      Caption = 'Author:'
+    end
+    object Label6: TLabel
+      Left = 16
+      Top = 120
+      Width = 145
+      Height = 13
+      Caption = 'Memory Available to Windows:'
+    end
+    object lblMemory: TLabel
+      Left = 168
+      Top = 120
+      Width = 56
+      Height = 13
+      Caption = '523 520 KB'
+    end
+    object lblOS: TLabel
+      Left = 16
+      Top = 104
+      Width = 114
+      Height = 13
+      Caption = 'Windows XP Build 2600'
+    end
+    object Label7: TLabel
+      Left = 198
+      Top = 34
+      Width = 108
+      Height = 13
+      Cursor = crHandPoint
+      Caption = '[email protected]'
+      DragCursor = crArrow
+      Font.Charset = DEFAULT_CHARSET
+      Font.Color = clBlue
+      Font.Height = -11
+      Font.Name = 'MS Sans Serif'
+      Font.Style = []
+      ParentFont = False
+      OnClick = Label7Click
+    end
+    object Label8: TLabel
+      Left = 16
+      Top = 68
+      Width = 47
+      Height = 13
+      Caption = 'Copyright:'
+    end
+    object Label9: TLabel
+      Left = 82
+      Top = 68
+      Width = 210
+      Height = 13
+      Caption = 'Copyright'#169' 2004-2005 Jean-Fran'#231'ois Goulet'
+    end
+  end
+end

+ 87 - 0
LuaEdit/About.pas

@@ -0,0 +1,87 @@
+unit About;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, jpeg, ExtCtrls, ShellAPI;
+
+type
+  TfrmAbout = class(TForm)
+    btnClose: TButton;
+    GroupBox1: TGroupBox;
+    lblVersion: TLabel;
+    Label2: TLabel;
+    Label3: TLabel;
+    imgLuaLogo: TImage;
+    Label5: TLabel;
+    Label6: TLabel;
+    lblMemory: TLabel;
+    lblOS: TLabel;
+    Label7: TLabel;
+    Label8: TLabel;
+    Label9: TLabel;
+    Image1: TImage;
+    procedure imgLuaLogoClick(Sender: TObject);
+    procedure btnCloseClick(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure Label7Click(Sender: TObject);
+    procedure Image1Click(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+    function GetTotalMemsize: String;
+  end;
+
+var
+  frmAbout: TfrmAbout;
+
+function GetFileVersion(const FileName: PChar): PChar; cdecl; external 'LuaEditSys.dll';
+function GetOSInfo: PChar; cdecl; external 'LuaEditSys.dll';
+
+implementation
+
+uses Math;
+
+{$R *.dfm}
+
+procedure TfrmAbout.imgLuaLogoClick(Sender: TObject);
+begin
+  ShellExecute(Self.Handle, 'open', 'http://www.lua.org', nil, nil, SW_SHOWNORMAL);
+end;
+
+procedure TfrmAbout.btnCloseClick(Sender: TObject);
+begin
+  Self.Close;
+end;
+
+procedure TfrmAbout.FormShow(Sender: TObject);
+begin
+  lblOS.Caption := GetOSInfo;
+  lblMemory.Caption := GetTotalMemsize;
+  lblVersion.Caption := GetFileVersion(PChar(Application.ExeName));
+end;
+
+function TfrmAbout.GetTotalMemsize: String;
+var
+  pMemStatus: TMemoryStatus;
+  TotalMem: Cardinal;
+begin
+  pMemStatus.dwLength := SizeOf(TMemoryStatus);
+  GlobalMemoryStatus(pMemStatus);
+  TotalMem := Ceil(pMemStatus.dwTotalPhys / 1024);
+  Result := IntToStr(TotalMem)+' KB';
+end;
+
+procedure TfrmAbout.Label7Click(Sender: TObject);
+begin
+  ShellExecute(Self.Handle, 'open', 'mailto:[email protected]?subject=About LuaEdit...', nil, nil, SW_SHOWNORMAL);
+end;
+
+procedure TfrmAbout.Image1Click(Sender: TObject);
+begin
+  ShellExecute(Self.Handle, 'open', 'http://luaedit.luaforge.net', nil, nil, SW_SHOWNORMAL);
+end;
+
+end.

+ 109 - 0
LuaEdit/AddBreakpoint.dfm

@@ -0,0 +1,109 @@
+object frmAddBreakpoint: TfrmAddBreakpoint
+  Left = 374
+  Top = 249
+  BorderStyle = bsDialog
+  Caption = 'Add Breakpoint'
+  ClientHeight = 201
+  ClientWidth = 369
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 160
+    Width = 369
+    Height = 41
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    DesignSize = (
+      369
+      41)
+    object Button1: TButton
+      Left = 288
+      Top = 10
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Cancel = True
+      Caption = '&Cancel'
+      ModalResult = 2
+      TabOrder = 0
+    end
+    object Button2: TButton
+      Left = 208
+      Top = 10
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&OK'
+      Default = True
+      ModalResult = 1
+      TabOrder = 1
+      OnClick = Button2Click
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 0
+    Width = 369
+    Height = 160
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 1
+    object Label1: TLabel
+      Left = 16
+      Top = 16
+      Width = 22
+      Height = 13
+      Caption = 'Unit:'
+    end
+    object Label2: TLabel
+      Left = 16
+      Top = 64
+      Width = 47
+      Height = 13
+      Caption = 'Condition:'
+    end
+    object Label3: TLabel
+      Left = 16
+      Top = 112
+      Width = 23
+      Height = 13
+      Caption = 'Line:'
+    end
+    object cboUnits: TComboBox
+      Left = 16
+      Top = 32
+      Width = 337
+      Height = 21
+      Style = csDropDownList
+      ItemHeight = 13
+      TabOrder = 0
+    end
+    object txtCondition: TEdit
+      Left = 16
+      Top = 80
+      Width = 337
+      Height = 21
+      TabOrder = 1
+    end
+    object txtLine: TEdit
+      Left = 16
+      Top = 128
+      Width = 89
+      Height = 21
+      MaxLength = 6
+      TabOrder = 2
+      OnKeyPress = txtLineKeyPress
+    end
+  end
+end

+ 125 - 0
LuaEdit/AddBreakpoint.pas

@@ -0,0 +1,125 @@
+unit AddBreakpoint;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ExtCtrls, lua, lualib, lauxlib, LuaUtils;
+
+type
+  TfrmAddBreakpoint = class(TForm)
+    Panel1: TPanel;
+    Panel2: TPanel;
+    Button1: TButton;
+    Button2: TButton;
+    Label1: TLabel;
+    cboUnits: TComboBox;
+    Label2: TLabel;
+    txtCondition: TEdit;
+    Label3: TLabel;
+    txtLine: TEdit;
+    procedure txtLineKeyPress(Sender: TObject; var Key: Char);
+    procedure Button2Click(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmAddBreakpoint: TfrmAddBreakpoint;
+
+implementation
+
+uses Main, Breakpoints;
+
+{$R *.dfm}
+
+procedure TfrmAddBreakpoint.txtLineKeyPress(Sender: TObject; var Key: Char);
+begin
+  if ((not (Ord(Key) in [48..57])) and (not (Ord(Key) = 8))) then
+    Key := Char(0);
+end;
+
+procedure TfrmAddBreakpoint.Button2Click(Sender: TObject);
+var
+  ReturnMsg: String;
+  L: PLua_State;
+  pBreakpoint: TBreakpoint;
+begin
+  ModalResult := mrNone;
+
+  if TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).pDebugInfos.GetBreakpointAtLine(StrToInt(txtLine.Text)) <> nil then
+  begin
+    Application.MessageBox(PChar('There is already a breakpoint set at line number '+txtLine.Text+'!'), 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtLine.SetFocus;
+    Exit;
+  end;
+
+  if txtCondition.Text <> '' then
+  begin
+    L := lua_open;
+
+    // test the given expression
+    if luaL_loadbuffer(L, PChar('return ('+txtCondition.Text+')'), Length('return ('+txtCondition.Text+')'), 'Main') <> 0 then
+    begin
+      ReturnMsg := lua_tostring(L, 1);
+      ReturnMsg := Copy(ReturnMsg, Pos(':', ReturnMsg) + 1, Length(ReturnMsg) - Pos(':', ReturnMsg));
+      ReturnMsg := Copy(ReturnMsg, Pos(':', ReturnMsg) + 1, Length(ReturnMsg) - Pos(':', ReturnMsg));
+      Application.MessageBox(PChar('The expression "'+txtCondition.Text+'" is not a valid expression: '#13#10#13#10#13#10+ReturnMsg), 'LuaEdit', MB_OK+MB_ICONERROR);
+      txtCondition.SetFocus;
+      Exit;
+    end;
+
+    lua_close(L);
+  end;
+
+  if txtLine.Text = '' then
+  begin
+    Application.MessageBox('You must specify a line number where to insert the breakpoint!', 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtLine.SetFocus;
+    Exit;
+  end
+  else if (StrToInt(txtLine.Text) > TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).synUnit.Lines.Count) or (StrToInt(txtLine.Text) < 1) then
+  begin
+    Application.MessageBox(PChar('The line number must stands between 1 and '+IntToStr(TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).synUnit.Lines.Count)+' for the unit "'+TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).sName+'"'), 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtLine.SetFocus;
+    Exit;
+  end;
+
+  if cboUnits.Text = '' then
+  begin
+    Application.MessageBox('You must select a unit where to insert the breakpoint!', 'LuaEdit', MB_OK+MB_ICONERROR);
+    cboUnits.SetFocus;
+    Exit;
+  end;
+
+  pBreakpoint := TBreakpoint.Create;
+  pBreakpoint.sCondition := txtCondition.Text;
+  pBreakpoint.iLine := StrToInt(txtLine.Text);
+  TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).pDebugInfos.lstBreakpoint.Add(pBreakpoint);
+  frmBreakpoints.RefreshBreakpointList;
+
+  if Assigned(pCurrentSynEdit) then
+    pCurrentSynEdit.Refresh;
+    
+  ModalResult := mrOk;
+end;
+
+procedure TfrmAddBreakpoint.FormShow(Sender: TObject);
+var
+  x: Integer;
+begin
+  cboUnits.Items.Clear;
+
+  for x := 0 to LuaOpenedUnits.Count - 1 do
+  begin
+    cboUnits.AddItem(TLuaUnit(LuaOpenedUnits.Items[x]).sName, LuaOpenedUnits.Items[x]);
+  end;
+
+  txtCondition.Text := '';
+  txtLine.Text := '';
+end;
+
+end.

+ 128 - 0
LuaEdit/AddToPrj.dfm

@@ -0,0 +1,128 @@
+object frmAddToPrj: TfrmAddToPrj
+  Left = 468
+  Top = 287
+  Width = 408
+  Height = 217
+  Caption = 'Add File to Project'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnCreate = FormCreate
+  OnDestroy = FormDestroy
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 150
+    Width = 400
+    Height = 33
+    Align = alBottom
+    BevelOuter = bvNone
+    Constraints.MinWidth = 400
+    TabOrder = 0
+    DesignSize = (
+      400
+      33)
+    object btnCancel: TButton
+      Left = 320
+      Top = 2
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&Cancel'
+      ModalResult = 2
+      TabOrder = 0
+    end
+    object btnOK: TButton
+      Left = 239
+      Top = 2
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&OK'
+      ModalResult = 1
+      TabOrder = 1
+      OnClick = btnOKClick
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 0
+    Width = 400
+    Height = 150
+    Align = alClient
+    BevelOuter = bvNone
+    Constraints.MinHeight = 150
+    Constraints.MinWidth = 400
+    TabOrder = 1
+    DesignSize = (
+      400
+      150)
+    object lblEG1: TLabel
+      Left = 56
+      Top = 44
+      Width = 288
+      Height = 13
+      Caption = '(Each File must be double-quoted and seperated by commas)'
+      WordWrap = True
+    end
+    object lblEG2: TLabel
+      Left = 56
+      Top = 59
+      Width = 226
+      Height = 13
+      Caption = '(EG: "C:\Test1.lua","C:\Test2.lua","TestX.lua")'
+    end
+    object btnBrowse: TButton
+      Left = 370
+      Top = 80
+      Width = 20
+      Height = 17
+      Anchors = [akTop, akRight]
+      Caption = '...'
+      TabOrder = 0
+      OnClick = btnBrowseClick
+    end
+    object txtExistingFile: TEdit
+      Left = 56
+      Top = 78
+      Width = 307
+      Height = 21
+      Anchors = [akLeft, akTop, akRight]
+      TabOrder = 1
+    end
+    object chkExisting: TRadioButton
+      Left = 24
+      Top = 24
+      Width = 305
+      Height = 17
+      Caption = 'Existing Unit(s)'
+      TabOrder = 2
+      OnClick = chkExistingClick
+    end
+    object chkNew: TRadioButton
+      Left = 24
+      Top = 112
+      Width = 113
+      Height = 17
+      Caption = 'New Unit'
+      Checked = True
+      TabOrder = 3
+      TabStop = True
+      OnClick = chkNewClick
+    end
+  end
+  object odlgOpenUnit: TOpenDialog
+    Filter = 'Lua Units (*.lua)|*.lua'
+    InitialDir = 'C:\'
+    Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing]
+    Left = 200
+    Top = 145
+  end
+end

+ 117 - 0
LuaEdit/AddToPrj.pas

@@ -0,0 +1,117 @@
+unit AddToPrj;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ExtCtrls, Registry;
+
+type
+  TfrmAddToPrj = class(TForm)
+    Panel1: TPanel;
+    Panel2: TPanel;
+    btnCancel: TButton;
+    btnOK: TButton;
+    btnBrowse: TButton;
+    txtExistingFile: TEdit;
+    chkExisting: TRadioButton;
+    chkNew: TRadioButton;
+    odlgOpenUnit: TOpenDialog;
+    lblEG1: TLabel;
+    lblEG2: TLabel;
+    procedure FormShow(Sender: TObject);
+    procedure chkExistingClick(Sender: TObject);
+    procedure chkNewClick(Sender: TObject);
+    procedure btnBrowseClick(Sender: TObject);
+    procedure FormCreate(Sender: TObject);
+    procedure FormDestroy(Sender: TObject);
+    procedure btnOKClick(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+    lstFiles: TStringList;
+  end;
+
+var
+  frmAddToPrj: TfrmAddToPrj;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmAddToPrj.FormShow(Sender: TObject);
+begin
+  txtExistingFile.Text := '';
+  txtExistingFile.Enabled := False;
+  btnBrowse.Enabled := False;
+  lblEG1.Enabled := False;
+  lblEG2.Enabled := False;
+  chkNew.Checked := True;
+  lstFiles.Clear;
+end;
+
+procedure TfrmAddToPrj.chkExistingClick(Sender: TObject);
+begin
+  txtExistingFile.Enabled := True;
+  btnBrowse.Enabled := True;
+  lblEG1.Enabled := True;
+  lblEG2.Enabled := True;
+end;
+
+procedure TfrmAddToPrj.chkNewClick(Sender: TObject);
+begin
+  txtExistingFile.Enabled := False;
+  btnBrowse.Enabled := False;
+  lblEG1.Enabled := False;
+  lblEG2.Enabled := False;
+end;
+
+procedure TfrmAddToPrj.btnBrowseClick(Sender: TObject);
+var
+  pReg: TRegistry;
+begin
+  pReg := TRegistry.Create;
+
+  if pReg.OpenKey('\Software\LuaEdit', False) then
+    odlgOpenUnit.InitialDir := pReg.ReadString('RecentPath');
+
+  if odlgOpenUnit.Execute then
+  begin
+    txtExistingFile.Text := odlgOpenUnit.Files.CommaText;
+  end;
+
+  pReg.Free;
+end;
+
+procedure TfrmAddToPrj.FormCreate(Sender: TObject);
+begin
+  lstFiles := TStringList.Create;
+end;
+
+procedure TfrmAddToPrj.FormDestroy(Sender: TObject);
+begin
+  lstFiles.Free;
+end;
+
+procedure TfrmAddToPrj.btnOKClick(Sender: TObject);
+var
+  x: Integer;
+begin
+  if chkExisting.Checked then
+  begin
+    lstFiles.CommaText := txtExistingFile.Text;
+    ModalResult := mrOk;
+
+    for x := 0 to lstFiles.Count - 1 do
+    begin
+      if not FileExists(lstFiles.Strings[x]) then
+      begin
+        Application.MessageBox(PChar('The file "'+lstFiles.Strings[x]+'" is innexistant.'), 'LuaEdit', MB_OK+MB_ICONERROR);
+        ModalResult := mrNone;
+      end;
+    end;
+  end;
+end;
+
+end.

+ 93 - 0
LuaEdit/AsciiTable.dfm

@@ -0,0 +1,93 @@
+object frmAsciiTable: TfrmAsciiTable
+  Left = 416
+  Top = 215
+  Width = 400
+  Height = 475
+  Caption = 'Ascii Table'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 400
+    Width = 392
+    Height = 41
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    DesignSize = (
+      392
+      41)
+    object Label1: TLabel
+      Left = 8
+      Top = 16
+      Width = 83
+      Height = 13
+      Caption = 'Enter Ascii Value:'
+    end
+    object btnClose: TButton
+      Left = 312
+      Top = 10
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Cancel = True
+      Caption = '&Close'
+      Default = True
+      ModalResult = 1
+      TabOrder = 0
+    end
+    object btnGetValue: TButton
+      Left = 232
+      Top = 10
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&Get Value'
+      TabOrder = 1
+      OnClick = btnGetValueClick
+    end
+    object txtAscii: TEdit
+      Left = 96
+      Top = 12
+      Width = 25
+      Height = 21
+      MaxLength = 1
+      TabOrder = 2
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 0
+    Width = 392
+    Height = 400
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 1
+    object memoAsciiTable: TMemo
+      Left = 0
+      Top = 0
+      Width = 392
+      Height = 400
+      Align = alClient
+      Font.Charset = ANSI_CHARSET
+      Font.Color = clWindowText
+      Font.Height = -11
+      Font.Name = 'Courier New'
+      Font.Style = []
+      ParentFont = False
+      ReadOnly = True
+      ScrollBars = ssBoth
+      TabOrder = 0
+      WordWrap = False
+    end
+  end
+end

+ 46 - 0
LuaEdit/AsciiTable.pas

@@ -0,0 +1,46 @@
+unit AsciiTable;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ExtCtrls;
+
+type
+  TfrmAsciiTable = class(TForm)
+    Panel1: TPanel;
+    Panel2: TPanel;
+    btnClose: TButton;
+    memoAsciiTable: TMemo;
+    btnGetValue: TButton;
+    txtAscii: TEdit;
+    Label1: TLabel;
+    procedure FormShow(Sender: TObject);
+    procedure btnGetValueClick(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmAsciiTable: TfrmAsciiTable;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmAsciiTable.FormShow(Sender: TObject);
+begin
+  txtAscii.Text := '';
+  memoAsciiTable.Lines.Clear;
+  memoAsciiTable.Lines.LoadFromFile(ExtractFileDir(Application.ExeName)+'\Help\AsciiTable.txt');
+end;
+
+procedure TfrmAsciiTable.btnGetValueClick(Sender: TObject);
+begin
+  if txtAscii.Text <> '' then
+    Application.MessageBox(PChar('Ascii code for '''+txtAscii.Text+''': '+IntToStr(Ord(txtAscii.Text[1]))), 'LuaEdit', MB_OK+MB_ICONINFORMATION);
+end;
+
+end.

+ 25 - 0
LuaEdit/Bin/Caller.lua

@@ -0,0 +1,25 @@
+dofile(".\Function.lua")
+local addition = 0
+
+function test(param1)
+   param1 = param1 + 5
+   param1 = test2(addition)
+   return param1
+end      
+
+function test2(param1)
+   param1 = param1 + 5
+   return param1
+end
+
+--while 1 == 1 do
+--   addition = addition + 1
+--end
+
+local bibi = 3
+local bobo = 7
+print(bibi)
+addition = test(addition)
+foo("hello")
+addition = bibi + bobo
+print(addition)

BIN
LuaEdit/Bin/Convert.exe


+ 4 - 0
LuaEdit/Bin/Function.lua

@@ -0,0 +1,4 @@
+function foo(param1)
+   param1 = param1 .. " world!"
+   return param1
+end

BIN
LuaEdit/Bin/Graphics/Exclamation.ico


BIN
LuaEdit/Bin/Graphics/LuaEditLogo.ico


BIN
LuaEdit/Bin/Graphics/Project.ico


BIN
LuaEdit/Bin/Graphics/Unit.ico


+ 130 - 0
LuaEdit/Bin/Help/AsciiTable.txt

@@ -0,0 +1,130 @@
+       Decimal   Octal   Hex    Binary     Value
+       -------   -----   ---    ------     -----
+         000      000    000   00000000      NUL    (Null char.)
+         001      001    001   00000001      SOH    (Start of Header)
+         002      002    002   00000010      STX    (Start of Text)
+         003      003    003   00000011      ETX    (End of Text)
+         004      004    004   00000100      EOT    (End of Transmission)
+         005      005    005   00000101      ENQ    (Enquiry)
+         006      006    006   00000110      ACK    (Acknowledgment)
+         007      007    007   00000111      BEL    (Bell)
+         008      010    008   00001000       BS    (Backspace)
+         009      011    009   00001001       HT    (Horizontal Tab)
+         010      012    00A   00001010       LF    (Line Feed)
+         011      013    00B   00001011       VT    (Vertical Tab)
+         012      014    00C   00001100       FF    (Form Feed)
+         013      015    00D   00001101       CR    (Carriage Return)
+         014      016    00E   00001110       SO    (Shift Out)
+         015      017    00F   00001111       SI    (Shift In)
+         016      020    010   00010000      DLE    (Data Link Escape)
+         017      021    011   00010001      DC1 (XON) (Device Control 1)
+         018      022    012   00010010      DC2       (Device Control 2)
+         019      023    013   00010011      DC3 (XOFF)(Device Control 3)
+         020      024    014   00010100      DC4       (Device Control 4)
+         021      025    015   00010101      NAK    (Negative Acknowledgement)
+         022      026    016   00010110      SYN    (Synchronous Idle)
+         023      027    017   00010111      ETB    (End of Trans. Block)
+         024      030    018   00011000      CAN    (Cancel)
+         025      031    019   00011001       EM    (End of Medium)
+         026      032    01A   00011010      SUB    (Substitute)
+         027      033    01B   00011011      ESC    (Escape)
+         028      034    01C   00011100       FS    (File Separator)
+         029      035    01D   00011101       GS    (Group Separator)
+         030      036    01E   00011110       RS    (Request to Send)(Record Separator)
+         031      037    01F   00011111       US    (Unit Separator)
+         032      040    020   00100000       SP    (Space)
+         033      041    021   00100001        !    (exclamation mark)
+         034      042    022   00100010        "    (double quote)
+         035      043    023   00100011        #    (number sign)
+         036      044    024   00100100        $    (dollar sign)
+         037      045    025   00100101        %    (percent)
+         038      046    026   00100110        &    (ampersand)
+         039      047    027   00100111        '    (single quote)
+         040      050    028   00101000        (    (left/opening parenthesis)
+         041      051    029   00101001        )    (right/closing parenthesis)
+         042      052    02A   00101010        *    (asterisk)
+         043      053    02B   00101011        +    (plus)
+         044      054    02C   00101100        ,    (comma)
+         045      055    02D   00101101        -    (minus or dash)
+         046      056    02E   00101110        .    (dot)
+         047      057    02F   00101111        /    (forward slash)
+         048      060    030   00110000        0
+         049      061    031   00110001        1
+         050      062    032   00110010        2
+         051      063    033   00110011        3
+         052      064    034   00110100        4
+         053      065    035   00110101        5
+         054      066    036   00110110        6
+         055      067    037   00110111        7
+         056      070    038   00111000        8
+         057      071    039   00111001        9
+         058      072    03A   00111010        :    (colon)
+         059      073    03B   00111011        ;    (semi-colon)
+         060      074    03C   00111100        <    (less than)
+         061      075    03D   00111101        =    (equal sign)
+         062      076    03E   00111110        >    (greater than)
+         063      077    03F   00111111        ?    (question mark)
+         064      100    040   01000000        @    (AT symbol)
+         065      101    041   01000001        A
+         066      102    042   01000010        B
+         067      103    043   01000011        C
+         068      104    044   01000100        D
+         069      105    045   01000101        E
+         070      106    046   01000110        F
+         071      107    047   01000111        G
+         072      110    048   01001000        H
+         073      111    049   01001001        I
+         074      112    04A   01001010        J
+         075      113    04B   01001011        K
+         076      114    04C   01001100        L
+         077      115    04D   01001101        M
+         078      116    04E   01001110        N
+         079      117    04F   01001111        O
+         080      120    050   01010000        P
+         081      121    051   01010001        Q
+         082      122    052   01010010        R
+         083      123    053   01010011        S
+         084      124    054   01010100        T
+         085      125    055   01010101        U
+         086      126    056   01010110        V
+         087      127    057   01010111        W
+         088      130    058   01011000        X
+         089      131    059   01011001        Y
+         090      132    05A   01011010        Z
+         091      133    05B   01011011        [    (left/opening bracket)
+         092      134    05C   01011100        \    (back slash)
+         093      135    05D   01011101        ]    (right/closing bracket)
+         094      136    05E   01011110        ^    (caret/cirumflex)
+         095      137    05F   01011111        _    (underscore)
+         096      140    060   01100000        `
+         097      141    061   01100001        a
+         098      142    062   01100010        b
+         099      143    063   01100011        c
+         100      144    064   01100100        d
+         101      145    065   01100101        e
+         102      146    066   01100110        f
+         103      147    067   01100111        g
+         104      150    068   01101000        h
+         105      151    069   01101001        i
+         106      152    06A   01101010        j
+         107      153    06B   01101011        k
+         108      154    06C   01101100        l
+         109      155    06D   01101101        m
+         110      156    06E   01101110        n
+         111      157    06F   01101111        o
+         112      160    070   01110000        p
+         113      161    071   01110001        q
+         114      162    072   01110010        r
+         115      163    073   01110011        s
+         116      164    074   01110100        t
+         117      165    075   01110101        u
+         118      166    076   01110110        v
+         119      167    077   01110111        w
+         120      170    078   01111000        x
+         121      171    079   01111001        y
+         122      172    07A   01111010        z
+         123      173    07B   01111011        {    (left/opening brace)
+         124      174    07C   01111100        |    (vertical bar)
+         125      175    07D   01111101        }    (right/closing brace)
+         126      176    07E   01111110        ~    (tilde)
+         127      177    07F   01111111      DEL    (delete)

BIN
LuaEdit/Bin/Help/LuaEdit.chm


BIN
LuaEdit/Bin/Help/refman-5.0.pdf


BIN
LuaEdit/Bin/LuaEdit.exe


BIN
LuaEdit/Bin/LuaEditSys.dll


BIN
LuaEdit/Bin/lua.dll


+ 716 - 0
LuaEdit/Breakpoints.dfm

@@ -0,0 +1,716 @@
+object frmBreakpoints: TfrmBreakpoints
+  Left = 329
+  Top = 298
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsSingle
+  Caption = 'Breakpoints'
+  ClientHeight = 266
+  ClientWidth = 539
+  Color = clBtnFace
+  DockSite = True
+  DragKind = dkDock
+  DragMode = dmAutomatic
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnCreate = FormCreate
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel2: TPanel
+    Left = 0
+    Top = 0
+    Width = 539
+    Height = 266
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 0
+    object tlbBreakpoints: TToolBar
+      Left = 0
+      Top = 0
+      Width = 539
+      Height = 24
+      AutoSize = True
+      Flat = True
+      Images = imlBreakpoints
+      ParentShowHint = False
+      ShowHint = True
+      TabOrder = 0
+      object tbtnAdd: TToolButton
+        Left = 0
+        Top = 0
+        Hint = 'Add New Breakpoint'
+        ImageIndex = 4
+        OnClick = tbtnAddClick
+      end
+      object tbtnToggle: TToolButton
+        Left = 23
+        Top = 0
+        Hint = 'Toggle Selected Breakpoint'
+        ImageIndex = 2
+        OnClick = tbtnToggleClick
+      end
+      object tbtnRemove: TToolButton
+        Left = 46
+        Top = 0
+        Hint = 'Remove Selected Breakpoint'
+        ImageIndex = 5
+        OnClick = tbtnRemoveClick
+      end
+      object ToolButton5: TToolButton
+        Left = 69
+        Top = 0
+        Width = 8
+        Caption = 'ToolButton5'
+        ImageIndex = 4
+        Style = tbsSeparator
+      end
+      object tbtnDisableAllBreakpoints: TToolButton
+        Left = 77
+        Top = 0
+        Hint = 'Disable All Breakpoints'
+        ImageIndex = 3
+        OnClick = tbtnDisableAllBreakpointsClick
+      end
+      object tbtnEnableAllBreakpoints: TToolButton
+        Left = 100
+        Top = 0
+        Hint = 'Enable All Breakpoints'
+        ImageIndex = 9
+        OnClick = tbtnEnableAllBreakpointsClick
+      end
+      object tbtnAllRemove: TToolButton
+        Left = 123
+        Top = 0
+        Hint = 'Remove All Breakpoints'
+        ImageIndex = 1
+        OnClick = tbtnAllRemoveClick
+      end
+      object ToolButton7: TToolButton
+        Left = 146
+        Top = 0
+        Width = 8
+        Caption = 'ToolButton7'
+        ImageIndex = 2
+        Style = tbsSeparator
+      end
+      object tbtnGoto: TToolButton
+        Left = 154
+        Top = 0
+        Hint = 'Goto Breakpoint'
+        ImageIndex = 0
+        OnClick = tbtnGotoClick
+      end
+      object tbtnEditCondition: TToolButton
+        Left = 177
+        Top = 0
+        Hint = 'Edit Condition'
+        ImageIndex = 6
+        OnClick = tbtnEditConditionClick
+      end
+    end
+    object lvwBreakpoints: TJvDotNetListView
+      Left = 0
+      Top = 24
+      Width = 539
+      Height = 242
+      Align = alClient
+      Checkboxes = True
+      Columns = <
+        item
+          AutoSize = True
+          Caption = 'Name'
+        end
+        item
+          Caption = 'Condition'
+          Width = 120
+        end
+        item
+          Caption = 'Hit Count'
+          Width = 100
+        end
+        item
+          Caption = 'Line'
+        end>
+      ReadOnly = True
+      RowSelect = True
+      PopupMenu = popmBreakpoints
+      SmallImages = imlBreakpoints
+      SortType = stText
+      TabOrder = 1
+      ViewStyle = vsReport
+      OnChange = lvwBreakpointsChange
+      OnChanging = lvwBreakpointsChanging
+      OnDblClick = lvwBreakpointsDblClick
+      ColumnsOrder = '0=265,1=120,2=100,3=50'
+    end
+  end
+  object imlBreakpoints: TImageList
+    Left = 56
+    Top = 80
+    Bitmap = {
+      494C01010A000E00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+      0000000000003600000028000000400000004000000001002000000000000040
+      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
+      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
+      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
+      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
+      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
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000041414100414141004141
+      4100414141004141410041414100000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000041414100FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0041414100000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000041414100FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      41004141410041414100414141004141410041414100FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000084848400C6C6C60084848400C6C6C60084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF00FFFFFF00FFFFFF0041414100FFFFFF0041414100FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000084848400C6C6C60084848400C6C6C60084848400C6C6C600848484000000
+      000000000000000000000000000000000000000000000000000041414100FFFF
+      FF00FFFFFF00FFFFFF0041414100FFFFFF004141410041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000C6C6C60084848400C6C6C60084848400C6C6C60084848400C6C6C6000000
+      000000000000000000000000000000000000000000000000000041414100FFFF
+      FF00FFFFFF00FFFFFF004141410041414100FFFFFF0041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000084848400C6C6C60084848400C6C6C60084848400C6C6C600848484000000
+      0000000000000000000000000000000000000000000041414100FFFFFF004141
+      4100FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000C6C6C60084848400C6C6C60084848400C6C6C60084848400C6C6C6000000
+      00000000000000000000000000000000000041414100FFFFFF00414141004141
+      4100FFFFFF0041414100FFFFFF0041414100FFFFFF0041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000084848400C6C6C60084848400C6C6C60084848400C6C6C600848484000000
+      0000000000000000000000000000000000004141410041414100000000004141
+      4100FFFFFF0041414100FFFFFF0041414100FFFFFF0041414100FFFFFF004141
+      4100FFFFFF004141410041414100000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000084848400C6C6C60084848400C6C6C60084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF0041414100FFFFFF0041414100FFFFFF00FFFFFF00414141004141
+      4100FFFFFF004141410000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF0041414100FFFFFF0041414100FFFFFF0041414100000000004141
+      4100414141000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF0041414100FFFFFF00414141004141410000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00004141410041414100FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000004141410041414100000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000009D4141009D4141009D4141009D41
+      41009D4141009D41410000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000041414100FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF004141410000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000041414100FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0041414100000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000008000000000000000000042424200424242004242
+      4200424242004242420042424200424242004242420042424200424242004242
+      4200424242004242420042424200424242000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      410041414100414141009D9D9D0041414100FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0041414100414141000000000000000000000000000000
+      000000008000FFFFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000042424200FFFFFF0042FF
+      FF00FFFFFF0042FFFF00FFFFFF0042FFFF00FFFFFF0042FFFF00FFFFFF0042FF
+      FF00FFFFFF0042FFFF00FFFFFF00424242000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF00FFFFFF0041414100FFFFFF0041414100FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0041414100FFFFFF000000000000000000000000000000
+      80000000800000008000FFFFFF00000000000000000000000000000000000000
+      00000000000000008000FFFFFF0000000000000000004242420042FFFF009D9D
+      9D009D9D9D009D9D9D009D9D9D009D9D9D009D9D9D00FFFFFF009D9D9D009D9D
+      9D009D9D9D009D9D9D0042FFFF00424242000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF0041414100FFFFFF004141410041414100FFFFFF0041414100FFFF
+      FF0041414100FFFFFF0041414100FFFFFF000000000000000000000000000000
+      80000000800000008000FFFFFF00000000000000000000000000000000000000
+      000000008000FFFFFF0000000000000000000000000042424200FFFFFF0042FF
+      FF004242420042424200FFFFFF0042FFFF00FFFFFF0042FFFF00FFFFFF0042FF
+      FF00FFFFFF0042FFFF00FFFFFF00424242000000000000000000000000000000
+      0000000000000000800000008000000080000000800000008000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF004141410041414100FFFFFF0041414100FFFFFF0041414100FFFF
+      FF0041414100FFFFFF0041414100FFFFFF000000000000000000000000000000
+      0000000080000000800000008000FFFFFF000000000000000000000000000000
+      800000008000FFFFFF0000000000000000000000000042424200424242004242
+      420042424200FFFFFF0042424200424242004242420042424200424242004242
+      4200424242004242420042424200424242000000000000000000000000000000
+      0000000080000000800000008000000080000000800000008000000080000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF00FFFFFF00FFFFFF00FFFFFF0041414100FFFFFF0041414100FFFF
+      FF0041414100FFFFFF0041414100FFFFFF000000000000000000000000000000
+      000000000000000080000000800000008000FFFFFF0000000000000080000000
+      8000FFFFFF000000000000000000000000000000000000000000000000004242
+      4200FFFFFF004242420000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000080000000800000008000000080000000800000008000000080000000
+      0000000000000000000000000000000000000000000041FFFF00000000004141
+      41009D9D9D00FFFFFF0041FFFF00FFFFFF0041414100FFFFFF0041414100FFFF
+      FF0041414100FFFFFF0041414100FFFFFF000000000000000000000000000000
+      000000000000000000000000800000008000000080000000800000008000FFFF
+      FF00000000000000000000000000000000004242420042424200000000004242
+      4200FFFFFF004242420000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000080000000800000008000000080000000800000008000000080000000
+      000000000000000000000000000000000000000000009D9D9D00FFFFFF004141
+      41009D9D9D0041FFFF00FFFFFF00FFFFFF0041414100FFFFFF0041414100FFFF
+      FF004141410041414100FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000080000000800000008000FFFFFF000000
+      00000000000000000000000000000000000042424200FFFFFF0042424200FFFF
+      FF00424242000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000080000000800000008000000080000000800000008000000080000000
+      00000000000000000000000000000000000000000000000000000000000041FF
+      FF009D9D9D00FFFFFF00FFFFFF00FFFFFF00FFFFFF004141410041414100FFFF
+      FF0041414100FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      000000000000000000000000800000008000000080000000800000008000FFFF
+      FF000000000000000000000000000000000042424200FFFFFF00FFFFFF00FFFF
+      FF00424242004242420000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000080000000800000008000000080000000800000008000000080000000
+      000000000000000000000000000000000000000000009D9D9D009D9D9D009D9D
+      9D00FFFFFF0041FFFF0041FFFF00FFFFFF00FFFFFF00FFFFFF00414141004141
+      4100FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      000000000000000080000000800000008000FFFFFF000000000000008000FFFF
+      FF000000000000000000000000000000000042424200FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF004242420000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000800000008000000080000000800000008000000000000000
+      0000000000000000000000000000000000000000000041FFFF00FFFFFF009D9D
+      9D0041FFFF00FFFFFF009D9D9D0041FFFF009D4141009D4141009D4141009D41
+      41009D4141009D4141009D4141009D4141000000000000000000000000000000
+      8000000080000000800000008000FFFFFF000000000000000000000000000000
+      800000008000FFFFFF00000000000000000042424200FFFFFF00FFFFFF00FFFF
+      FF00424242000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000CDCDCD009D9D9D0041FF
+      FF009D9D9D0041FFFF00000000009D9D9D0041FFFF009D4141009D4141009D41
+      41009D4141009D4141009D4141009D4141000000000000000000000080000000
+      80000000800000008000FFFFFF00000000000000000000000000000000000000
+      00000000800000008000FFFFFF000000000042424200FFFFFF00FFFFFF004242
+      4200000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000009D9D9D0041FFFF000000
+      00009D9D9D00FFFFFF0000000000000000009D9D9D0000000000000000000000
+      0000000000000000000000000000000000000000000000000000000080000000
+      8000FFFFFF000000000000000000000000000000000000000000000000000000
+      00000000000000008000000080000000000042424200FFFFFF00424242000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000041FFFF00000000000000
+      00009D9D9D0041FFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000004242420042424200000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00009D9D9D000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000009D9D9D0000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000041419D009D9D9D0000000000000000000000000041414100414141009D9D
+      9D00414141004141410041414100000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000009D9D9D009D9D9D00000000000000
+      0000000000000000000000000000000000000000000041414100414141004141
+      4100414141004141410041414100000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000041419D0041419D00000000000000000041414100FFFFFF009D9D9D004141
+      9D00FFFFFF00FFFFFF0041414100000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000009D9D9D009D9D9D009D9D9D000000
+      0000000000000000000000000000000000000000000041414100FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0041414100000000000000000000000000000000000000
+      0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF
+      0000000000000000000000000000000000000000000000000000000000000000
+      000041419D0041419D009D9D9D0000000000414141009D9D9D0041419D009D9D
+      9D00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000000000009D9D9D009D9D9D009D9D9D009D9D
+      9D000000000000000000000000000000000041414100FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      0000FFFF0000840000008400000084000000840000008400000084000000FFFF
+      FF00000000000000000000000000000000000000000000000000000000004141
+      41009D9D9D0041419D0041419D009D9D9D009D9D9D0041419D0041419D00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000000000009D9D9D009D9D9D009D9D9D004141
+      41004141410041414100414141004141410041414100FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      00000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
+      FF00000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF00CDCDCD0041419D0041419D0041419D0041419D00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000000000009D9D9D009D9D9D009D9D9D004141
+      4100CDCDCD00CDCDCD00FFFFFF0041414100FFFFFF0041414100FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00414141000000000000000000000000000000
+      00000000FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      FF0000000000000000000000000000000000000000000000000041414100FFFF
+      FF00FFFFFF004141410041419D0041419D0041419D0041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000000000009D9D9D009D9D9D0041414100CDCD
+      CD00CDCDCD00CDCDCD0041414100FFFFFF004141410041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      00000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
+      FF0000000000000000000000000000000000000000000000000041414100FFFF
+      FF00FFFFFF0041419D0041419D0041419D0041419D009D9D9D00FFFFFF004141
+      4100FFFFFF0041414100FFFFFF0041414100000000000000000000000000FFFF
+      FF00FFFFFF000000000000000000FFFFFF0000000000FFFFFF0000000000FFFF
+      FF0000000000FFFFFF0000000000000000009D9D9D009D9D9D0041414100CDCD
+      CD00CDCDCD00CDCDCD004141410041414100FFFFFF0041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000FFFF0000840000008400000084000000840000008400000084000000FFFF
+      FF00000000000000000000000000000000000000000041414100FFFFFF004141
+      9D0041419D0041419D009D9D9D00FFFFFF0041419D0041419D009D9D9D004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000FFFFFF0000000000FFFFFF0000000000FFFF
+      FF0000000000FFFFFF0000000000000000009D9D9D0041414100CDCDCD004141
+      4100CDCDCD00CDCDCD00CDCDCD00CDCDCD00CDCDCD0041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF
+      00000000000000000000000000000000000041414100FFFFFF00414141009D9D
+      9D00FFFFFF009D9D9D00FFFFFF0041414100FFFFFF0041419D0041419D009D9D
+      9D00FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000FFFFFF0000000000FFFFFF0000000000FFFF
+      FF0000000000FFFFFF00000000000000000041414100CDCDCD00414141004141
+      4100CDCDCD0041414100CDCDCD0041414100CDCDCD0041414100FFFFFF004141
+      4100FFFFFF0041414100FFFFFF00414141000000000000000000000000000000
+      0000FFFF0000840000008400000084000000FFFF000000000000000000000000
+      0000000000000000000000000000000000004141410041414100000000004141
+      4100FFFFFF0041414100FFFFFF0041414100FFFFFF004141410041419D004141
+      9D009D9D9D004141410041414100000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF0000000000FFFFFF0000000000FFFF
+      FF0000000000FFFFFF00000000000000000041414100414141009D9D9D004141
+      4100CDCDCD0041414100CDCDCD0041414100CDCDCD0041414100FFFFFF004141
+      4100FFFFFF004141410041414100000000000000000000000000000000000000
+      0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF0000000000FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF0041414100FFFFFF0041414100FFFFFF0041414100000000004141
+      4100414141004141410000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF0000000000FFFFFF0000000000FFFF
+      FF00000000000000000000000000000000009D9D9D009D9D9D009D9D9D004141
+      4100CDCDCD0041414100CDCDCD0041414100CDCDCD00CDCDCD00414141004141
+      4100FFFFFF004141410000000000000000000000000000000000000000000000
+      0000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF0041414100FFFFFF0041414100FFFFFF0041414100000000004141
+      4100414141000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF0000000000FFFFFF0000000000FFFF
+      FF00000000000000000000000000000000009D9D9D009D9D9D009D9D9D004141
+      4100CDCDCD0041414100CDCDCD0041414100CDCDCD00414141009D9D9D004141
+      4100414141000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000004141
+      4100FFFFFF0041414100FFFFFF00414141004141410000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00000000000000
+      0000000000000000000000000000000000009D9D9D009D9D9D009D9D9D004141
+      4100CDCDCD0041414100CDCDCD0041414100414141009D9D9D009D9D9D009D9D
+      9D009D9D9D009D9D9D0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00004141410041414100FFFFFF00414141000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000009D9D9D009D9D9D009D9D9D009D9D
+      9D004141410041414100CDCDCD00414141009D9D9D009D9D9D009D9D9D009D9D
+      9D009D9D9D009D9D9D009D9D9D00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000004141410041414100000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000009D9D9D009D9D9D009D9D9D009D9D
+      9D009D9D9D0041414100414141009D9D9D009D9D9D009D9D9D009D9D9D009D9D
+      9D009D9D9D009D9D9D009D9D9D009D9D9D00424D3E000000000000003E000000
+      2800000040000000400000000100010000000000000200000000000000000000
+      000000000000000000000000FFFFFF0000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000FFFFFFFF00000000FFFFFF8100000000
+      FFFFFF8100000000FFFFFF0000000000F83FE00000000000F01FE00000000000
+      E00FC00000000000E00FC00000000000E00F800000000000E00F000000000000
+      E00F200100000000F01FE00300000000F83FE02700000000FFFFE07F00000000
+      FFFFF0FF00000000FFFFF9FF00000000FF03FFFFFFFFFFFFFF03FFFFFFFFFFFF
+      FE01FFFD8000FFFFE000F3FF8000FFFFE000E1F98000F83FE000E1F38000F01F
+      E000F0E38000E00FE000F847E3FFE00FA000FC0F23FFE00F8000FE1F07FFE00F
+      E000FC0F03FFE00F8000F84F03FFF01F8000E0E307FFF83F8200C1F10FFFFFFF
+      937FC7F91FFFFFFFB3FFFFFF3FFFFFFFFFFFF7FFFFFF7FFFFFFFF381FC033F81
+      E007F301FC031F81E007F100F8010F00E007E000F0010000E007E000F0010000
+      E007C000E0010000E007C000C0010000E0078000C4010000E0070000FC010000
+      E0072001FC010001E00FE023FC030003E01FE027FC070007E03FE07FFE0F0003
+      FFFFF0FFFF3F0001FFFFF9FFFFFF000000000000000000000000000000000000
+      000000000000}
+  end
+  object popmBreakpoints: TPopupMenu
+    Left = 88
+    Top = 80
+    object RemoveBreakpoint1: TMenuItem
+      Caption = 'Remove Breakpoint'
+    end
+    object N1: TMenuItem
+      Caption = '-'
+    end
+    object Goto1: TMenuItem
+      Caption = 'Goto Breakpoint'
+    end
+    object Condition1: TMenuItem
+      Caption = 'Set Condition...'
+    end
+  end
+  object JvDockClient1: TJvDockClient
+    LRDockWidth = 100
+    TBDockHeight = 100
+    DirectDrag = False
+    ShowHint = True
+    EnableCloseButton = True
+    DockStyle = frmMain.jvDockVSNet
+    Left = 24
+    Top = 80
+  end
+end

+ 313 - 0
LuaEdit/Breakpoints.pas

@@ -0,0 +1,313 @@
+unit Breakpoints;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ExtCtrls, ComCtrls, ImgList, lua, lualib, lauxlib,
+  LuaUtils, Menus, JvExComCtrls, JvHeaderControl, JvComponent,
+  JvDockControlForm, ToolWin, JvListView, JvDotNetControls, TypInfo;
+
+type
+  TfrmBreakpoints = class(TForm)
+    Panel2: TPanel;
+    imlBreakpoints: TImageList;
+    popmBreakpoints: TPopupMenu;
+    RemoveBreakpoint1: TMenuItem;
+    N1: TMenuItem;
+    Goto1: TMenuItem;
+    Condition1: TMenuItem;
+    JvDockClient1: TJvDockClient;
+    tlbBreakpoints: TToolBar;
+    tbtnAdd: TToolButton;
+    tbtnToggle: TToolButton;
+    tbtnRemove: TToolButton;
+    tbtnDisableAllBreakpoints: TToolButton;
+    ToolButton5: TToolButton;
+    tbtnAllRemove: TToolButton;
+    ToolButton7: TToolButton;
+    tbtnGoto: TToolButton;
+    tbtnEditCondition: TToolButton;
+    lvwBreakpoints: TJvDotNetListView;
+    tbtnEnableAllBreakpoints: TToolButton;
+    procedure tbtnGotoClick(Sender: TObject);
+    procedure tbtnEditConditionClick(Sender: TObject);
+    procedure lvwBreakpointsChange(Sender: TObject; Item: TListItem; Change: TItemChange);
+    procedure RefreshBreakpointList;
+    procedure tbtnRemoveClick(Sender: TObject);
+    procedure tbtnToggleClick(Sender: TObject);
+    procedure lvwBreakpointsDblClick(Sender: TObject);
+    procedure tbtnDisableAllBreakpointsClick(Sender: TObject);
+    procedure tbtnEnableAllBreakpointsClick(Sender: TObject);
+    procedure tbtnAllRemoveClick(Sender: TObject);
+    procedure lvwBreakpointsChanging(Sender: TObject; Item: TListItem;
+      Change: TItemChange; var AllowChange: Boolean);
+    procedure FormCreate(Sender: TObject);
+    procedure tbtnAddClick(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+    WasItemChecked: Boolean;
+  end;
+
+var
+  frmBreakpoints: TfrmBreakpoints;
+
+implementation
+
+uses Main, AddBreakpoint;
+
+{$R *.dfm}
+
+procedure TfrmBreakpoints.RefreshBreakpointList;
+var
+  x, y: Integer;
+  SubItem: TListItem;
+  pLuaUnit: TLuaUnit;
+begin
+  // Begin update and claer actual list
+  lvwBreakpoints.Items.BeginUpdate();
+  lvwBreakpoints.Items.Clear();
+
+  // Add all breakpoints in the listview
+  for x := 0 to LuaOpenedUnits.Count - 1 do
+  begin
+    pLuaUnit := TLuaUnit(LuaOpenedUnits.Items[x]);
+
+    for y := 0 to pLuaUnit.pDebugInfos.lstBreakpoint.Count - 1 do
+    begin
+      SubItem := lvwBreakpoints.Items.Add;
+
+      if TBreakpoint(pLuaUnit.pDebugInfos.lstBreakpoint.Items[y]).iStatus = BKPT_ENABLED then
+      begin
+        SubItem.Checked := True;
+        WasItemChecked := True;
+        Subitem.ImageIndex := 7;
+      end
+      else
+      begin
+        SubItem.Checked := False;
+        WasItemChecked := False;
+        Subitem.ImageIndex := 8;
+      end;
+
+      SubItem.Data := pLuaUnit;
+      SubItem.Caption := pLuaUnit.sName+', line '+IntToStr(TBreakpoint(pLuaUnit.pDebugInfos.lstBreakpoint.Items[y]).iLine);
+
+      if TBreakpoint(pLuaUnit.pDebugInfos.lstBreakpoint.Items[y]).sCondition <> '' then
+        SubItem.SubItems.Add(TBreakpoint(pLuaUnit.pDebugInfos.lstBreakpoint.Items[y]).sCondition)
+      else
+        SubItem.SubItems.Add('(no condition)');
+
+      SubItem.SubItems.Add(IntToStr(TBreakpoint(pLuaUnit.pDebugInfos.lstBreakpoint.Items[y]).iHitCount));
+      SubItem.SubItems.Add(IntToStr(TBreakpoint(pLuaUnit.pDebugInfos.lstBreakpoint.Items[y]).iLine));
+    end;
+  end;
+
+  // End update
+  lvwBreakpoints.Items.EndUpdate();
+
+  // Control buttons enable status
+  if lvwBreakpoints.Items.Count = 0 then
+  begin
+    tbtnEditCondition.Enabled := False;
+    tbtnGoto.Enabled := False;
+    tbtnRemove.Enabled := False;
+    tbtnToggle.Enabled := False;
+    tbtnDisableAllBreakpoints.Enabled := False;
+    tbtnEnableAllBreakpoints.Enabled := False;
+    tbtnAllRemove.Enabled := False;
+  end;
+
+  if LuaOpenedUnits.Count = 0 then
+    tbtnAdd.Enabled := False
+  else
+    tbtnAdd.Enabled := True;
+end;
+
+procedure TfrmBreakpoints.tbtnGotoClick(Sender: TObject);
+begin
+  ModalResult := mrNone;
+
+  if Assigned(lvwBreakpoints.Selected) then
+  begin
+    ModalResult := mrOk;
+
+    if frmMain.GetAssociatedTab(TLuaUnit(lvwBreakpoints.Selected.Data)) = nil then
+    begin
+      frmMain.AddFileInTab(TLuaUnit(lvwBreakpoints.Selected.Data));
+    end
+    else
+    begin
+      frmMain.GetAssociatedTab(TLuaUnit(lvwBreakpoints.Selected.Data)).Selected := True;
+    end;
+
+    TLuaUnit(lvwBreakpoints.Selected.Data).synUnit.GotoLineAndCenter(StrToInt(lvwBreakpoints.Selected.SubItems.Strings[2]));
+  end;
+end;
+
+procedure TfrmBreakpoints.tbtnEditConditionClick(Sender: TObject);
+var
+  Answer: String;
+  ReturnMsg: String;
+  L: PLua_State;
+begin
+  if Assigned(lvwBreakpoints.Selected) then
+  begin
+    Answer := InputBox('Breakpoint Condition', 'Enter condition for selected breakpoint:', lvwBreakpoints.Selected.SubItems.Strings[0]);
+    if Answer <> lvwBreakpoints.Selected.SubItems.Strings[1] then
+    begin
+      L := lua_open;
+
+      // test the given expression
+      if luaL_loadbuffer(L, PChar('return ('+Answer+')'), Length('return ('+Answer+')'), 'Main') <> 0 then
+      begin
+        ReturnMsg := lua_tostring(L, 1);
+        ReturnMsg := Copy(ReturnMsg, Pos(':', ReturnMsg) + 1, Length(ReturnMsg) - Pos(':', ReturnMsg));
+        ReturnMsg := Copy(ReturnMsg, Pos(':', ReturnMsg) + 1, Length(ReturnMsg) - Pos(':', ReturnMsg));
+        Application.MessageBox(PChar('The expression "'+Answer+'" is not a valid expression: '#13#10#13#10#13#10+ReturnMsg), 'LuaEdit', MB_OK+MB_ICONERROR);
+      end
+      else
+      begin
+        lvwBreakpoints.Selected.SubItems.Strings[0] := Answer;
+        TLuaUnit(lvwBreakpoints.Selected.Data).pDebugInfos.GetBreakpointAtLine(StrToInt(lvwBreakpoints.Selected.SubItems.Strings[2])).sCondition := Answer;
+      end;
+
+      lua_close(L);
+    end;
+  end;
+end;
+
+procedure TfrmBreakpoints.lvwBreakpointsChange(Sender: TObject; Item: TListItem; Change: TItemChange);
+begin
+  if Assigned(Item) then
+  begin
+    tbtnEditCondition.Enabled := Assigned(lvwBreakpoints.Selected);
+    tbtnGoto.Enabled := Assigned(lvwBreakpoints.Selected);
+    tbtnRemove.Enabled := Assigned(lvwBreakpoints.Selected);
+    tbtnToggle.Enabled := Assigned(lvwBreakpoints.Selected);
+    tbtnAllRemove.Enabled := Assigned(lvwBreakpoints.Selected);
+    tbtnDisableAllBreakpoints.Enabled := Assigned(lvwBreakpoints.Selected);
+    tbtnEnableAllBreakpoints.Enabled := Assigned(lvwBreakpoints.Selected);
+
+    if WasItemChecked <> Item.Checked then
+    begin
+      if Assigned(Item.Data) then
+      begin
+        if TLuaUnit(Item.Data).pDebugInfos.GetBreakpointStatus(StrToInt(Item.SubItems.Strings[2])) = BKPT_DISABLED then
+        begin
+          TLuaUnit(Item.Data).pDebugInfos.GetBreakpointAtLine(StrToInt(Item.SubItems.Strings[2])).iStatus := BKPT_ENABLED;
+          Item.ImageIndex := 7;
+        end
+        else
+        begin
+          TLuaUnit(Item.Data).pDebugInfos.GetBreakpointAtLine(StrToInt(Item.SubItems.Strings[2])).iStatus := BKPT_DISABLED;
+          Item.ImageIndex := 8;
+        end;
+
+        if Assigned(pCurrentSynEdit) then
+          pCurrentSynEdit.Refresh;
+      end;
+    end;
+  end;
+end;
+
+procedure TfrmBreakpoints.tbtnRemoveClick(Sender: TObject);
+begin
+  if Assigned(lvwBreakpoints.Selected) then
+  begin
+    TLuaUnit(lvwBreakpoints.Selected.Data).pDebugInfos.RemoveBreakpointAtLine(StrToInt(lvwBreakpoints.Selected.SubItems.Strings[2]));
+    lvwBreakpoints.Selected.Delete;
+  end;
+
+  if Assigned(pCurrentSynEdit) then
+    pCurrentSynEdit.Refresh;
+end;
+
+procedure TfrmBreakpoints.tbtnToggleClick(Sender: TObject);
+begin
+  if Assigned(lvwBreakpoints.Selected) then
+  begin
+    if TLuaUnit(lvwBreakpoints.Selected.Data).pDebugInfos.GetBreakpointStatus(StrToInt(lvwBreakpoints.Selected.SubItems.Strings[2])) = BKPT_DISABLED then
+    begin
+      TLuaUnit(lvwBreakpoints.Selected.Data).pDebugInfos.GetBreakpointAtLine(StrToInt(lvwBreakpoints.Selected.SubItems.Strings[2])).iStatus := BKPT_ENABLED;
+      lvwBreakpoints.Selected.Checked := True;
+      lvwBreakpoints.Selected.ImageIndex := 7;
+    end
+    else
+    begin
+      TLuaUnit(lvwBreakpoints.Selected.Data).pDebugInfos.GetBreakpointAtLine(StrToInt(lvwBreakpoints.Selected.SubItems.Strings[2])).iStatus := BKPT_DISABLED;
+      lvwBreakpoints.Selected.Checked := False;
+      lvwBreakpoints.Selected.ImageIndex := 8;
+    end;
+  end;
+
+  if Assigned(pCurrentSynEdit) then
+    pCurrentSynEdit.Refresh;
+end;
+
+procedure TfrmBreakpoints.lvwBreakpointsDblClick(Sender: TObject);
+begin
+  tbtnGoto.Click;
+end;
+
+procedure TfrmBreakpoints.tbtnDisableAllBreakpointsClick(Sender: TObject);
+var
+  x: Integer;
+begin
+  for x := 0 to lvwBreakpoints.Items.Count - 1 do
+  begin
+    lvwBreakpoints.Items[x].Checked := False;
+  end;
+
+  if Assigned(pCurrentSynEdit) then
+    pCurrentSynEdit.Refresh;
+end;
+
+procedure TfrmBreakpoints.tbtnEnableAllBreakpointsClick(Sender: TObject);
+var
+  x: Integer;
+begin
+  for x := 0 to lvwBreakpoints.Items.Count - 1 do
+  begin
+    lvwBreakpoints.Items[x].Checked := True;
+  end;
+
+  if Assigned(pCurrentSynEdit) then
+    pCurrentSynEdit.Refresh;
+end;
+
+procedure TfrmBreakpoints.tbtnAllRemoveClick(Sender: TObject);
+begin
+  if Application.MessageBox('Are you sure you want to remove all breakpoints?', 'LuaEdit', MB_YESNO+MB_ICONERROR) = IDYES then
+  begin
+    while Assigned(lvwBreakpoints.Items[0]) do
+    begin
+      TLuaUnit(lvwBreakpoints.Items[0].Data).pDebugInfos.RemoveBreakpointAtLine(StrToInt(lvwBreakpoints.Items[0].SubItems.Strings[2]));
+      lvwBreakpoints.Items[0].Delete;
+    end;
+
+    if Assigned(pCurrentSynEdit) then
+      pCurrentSynEdit.Refresh;
+  end;
+end;
+
+procedure TfrmBreakpoints.lvwBreakpointsChanging(Sender: TObject; Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
+begin
+  if Assigned(Item) then
+    WasItemChecked := Item.Checked;
+end;
+
+procedure TfrmBreakpoints.FormCreate(Sender: TObject);
+begin
+  RefreshBreakpointList;
+end;
+
+procedure TfrmBreakpoints.tbtnAddClick(Sender: TObject);
+begin
+  if frmAddBreakpoint.ShowModal = mrOk then
+    RefreshBreakpointList;
+end;
+
+end.

+ 107 - 0
LuaEdit/CntString.dfm

@@ -0,0 +1,107 @@
+object frmCntString: TfrmCntString
+  Left = 487
+  Top = 383
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsSingle
+  Caption = 'Connection String'
+  ClientHeight = 161
+  ClientWidth = 443
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  Icon.Data = {
+    0000010001002020100000000000E80200001600000028000000200000004000
+    0000010004000000000080020000000000000000000000000000000000000000
+    0000000080000080000000808000800000008000800080800000C0C0C0008080
+    80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
+    8000000000000000000000800000000080000000000000000000008000000000
+    8000000000000000000000800000000080000000000000000000008800000000
+    8000000000000000000000080000000080000888888000000088070888800000
+    8000800000880000000000000088000080080000000880000788888888080000
+    80008000000080000F7777777808000080008000000080000F77777778080000
+    80008000000088000F7777777808000080008000000008800F77777778080000
+    80008000007880800F777777780800008000800000F780800F77777778080000
+    8800880000F780800F777777780800000800080000F780800FFFFFFFF7000007
+    0807088000F7808000000000000000000000008800F780800007080708000788
+    8888880800F780800000000000000F777777780800F780800000800080000F77
+    7777780800F780800000800080000F777777780800FFF0000000800080000F77
+    77777808000000000000800080000F7777777808000080000000800080000F77
+    77777808000080000000800080000F7777777808000088000000800080000FFF
+    FFFFF70000000888880800008000000000000000000000000080000080000000
+    0708000000000000000000008000000000000000000000000000000080000000
+    008000000000000000000000800000000080000000000000000000000000E7FF
+    FF9FE7FFFF9FE7FFFF9FE7FFFF8FE7FFFF0FE781FC01E700F800E67C7000E67E
+    7000E67E7000E67E3000E67C1000E6781000E6781000E2381000C0381001C018
+    180380081C0300081C4700081E6700081E6700083E67000C7E67000E7E67000E
+    7E67000E3E67001F00E7803F81E7F0FFFFE7F1FFFFE7F9FFFFE7F9FFFFEF}
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 0
+    Width = 443
+    Height = 120
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 0
+    object Label1: TLabel
+      Left = 16
+      Top = 16
+      Width = 389
+      Height = 52
+      Caption = 
+        'The following string has been copied in your clipboard. Use it t' +
+        'o launch the remote debugger on the remote computer. To do so, u' +
+        'se a command window (Start Menu/Execute --> type cmd) move into ' +
+        'the folder where you previously copied "rdbg.exe" and paste the ' +
+        'line. Press Ok whenever you are ready...'
+      WordWrap = True
+    end
+    object memoCntString: TMemo
+      Left = 16
+      Top = 88
+      Width = 409
+      Height = 21
+      Color = clBtnFace
+      ReadOnly = True
+      TabOrder = 0
+      WordWrap = False
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 120
+    Width = 443
+    Height = 41
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 1
+    object btnCancel: TButton
+      Left = 360
+      Top = 8
+      Width = 75
+      Height = 25
+      Cancel = True
+      Caption = '&Cancel'
+      ModalResult = 2
+      TabOrder = 0
+      OnClick = btnCancelClick
+    end
+    object btnOK: TButton
+      Left = 280
+      Top = 8
+      Width = 75
+      Height = 25
+      Caption = '&OK'
+      Default = True
+      ModalResult = 1
+      TabOrder = 1
+    end
+  end
+end

+ 48 - 0
LuaEdit/CntString.pas

@@ -0,0 +1,48 @@
+unit CntString;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ExtCtrls, Main, Winsock;
+
+type
+  TfrmCntString = class(TForm)
+    Panel1: TPanel;
+    Panel2: TPanel;
+    btnCancel: TButton;
+    btnOK: TButton;
+    Label1: TLabel;
+    memoCntString: TMemo;
+    procedure btnCancelClick(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmCntString: TfrmCntString;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmCntString.btnCancelClick(Sender: TObject);
+begin
+  Screen.Cursor := crHourGlass;
+  closesocket(pSock);
+  closesocket(pRSock);
+  WSACleanup;
+  TerminateThread(ThreadDebugHandle, 0);
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmCntString.FormShow(Sender: TObject);
+begin
+  Application.ProcessMessages;
+  Self.Activate;
+end;
+
+end.

+ 88 - 0
LuaEdit/Connecting.dfm

@@ -0,0 +1,88 @@
+object frmConnecting: TfrmConnecting
+  Left = 457
+  Top = 380
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsSingle
+  Caption = 'Connecting...'
+  ClientHeight = 115
+  ClientWidth = 348
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  Icon.Data = {
+    0000010001002020100000000000E80200001600000028000000200000004000
+    0000010004000000000080020000000000000000000000000000000000000000
+    0000000080000080000000808000800000008000800080800000C0C0C0008080
+    80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
+    8000000000000000000000800000000080000000000000000000008000000000
+    8000000000000000000000800000000080000000000000000000008800000000
+    8000000000000000000000080000000080000888888000000088070888800000
+    8000800000880000000000000088000080080000000880000788888888080000
+    80008000000080000F7777777808000080008000000080000F77777778080000
+    80008000000088000F7777777808000080008000000008800F77777778080000
+    80008000007880800F777777780800008000800000F780800F77777778080000
+    8800880000F780800F777777780800000800080000F780800FFFFFFFF7000007
+    0807088000F7808000000000000000000000008800F780800007080708000788
+    8888880800F780800000000000000F777777780800F780800000800080000F77
+    7777780800F780800000800080000F777777780800FFF0000000800080000F77
+    77777808000000000000800080000F7777777808000080000000800080000F77
+    77777808000080000000800080000F7777777808000088000000800080000FFF
+    FFFFF70000000888880800008000000000000000000000000080000080000000
+    0708000000000000000000008000000000000000000000000000000080000000
+    008000000000000000000000800000000080000000000000000000000000E7FF
+    FF9FE7FFFF9FE7FFFF9FE7FFFF8FE7FFFF0FE781FC01E700F800E67C7000E67E
+    7000E67E7000E67E3000E67C1000E6781000E6781000E2381000C0381001C018
+    180380081C0300081C4700081E6700081E6700083E67000C7E67000E7E67000E
+    7E67000E3E67001F00E7803F81E7F0FFFFE7F1FFFFE7F9FFFFE7F9FFFFEF}
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnShow = FormShow
+  DesignSize = (
+    348
+    115)
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Label1: TLabel
+    Left = 8
+    Top = 8
+    Width = 328
+    Height = 39
+    Caption = 
+      'Waiting for remote client to connect on LuaEdit. Press "Cancel" ' +
+      'button to cancle the operation or wait until the progress bar be' +
+      'low has reach the maximum...'
+    WordWrap = True
+  end
+  object pgbTimeOut: TProgressBar
+    Left = 8
+    Top = 54
+    Width = 331
+    Height = 17
+    Anchors = [akLeft, akRight, akBottom]
+    Max = 60
+    Smooth = True
+    TabOrder = 0
+  end
+  object btnCancel: TButton
+    Left = 264
+    Top = 81
+    Width = 75
+    Height = 25
+    Anchors = [akRight, akBottom]
+    Cancel = True
+    Caption = '&Cancel'
+    Default = True
+    ModalResult = 3
+    TabOrder = 1
+    OnClick = btnCancelClick
+  end
+  object tmrTimeOut: TTimer
+    Enabled = False
+    OnTimer = tmrTimeOutTimer
+    Left = 8
+    Top = 80
+  end
+end

+ 73 - 0
LuaEdit/Connecting.pas

@@ -0,0 +1,73 @@
+unit Connecting;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ComCtrls, Main, ExtCtrls, WinSock;
+
+type
+  TfrmConnecting = class(TForm)
+    pgbTimeOut: TProgressBar;
+    btnCancel: TButton;
+    Label1: TLabel;
+    tmrTimeOut: TTimer;
+    procedure btnCancelClick(Sender: TObject);
+    procedure tmrTimeOutTimer(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmConnecting: TfrmConnecting;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmConnecting.btnCancelClick(Sender: TObject);
+begin
+  Screen.Cursor := crHourGlass;
+  tmrTimeOut.Enabled := False;
+  closesocket(pSock);
+  closesocket(pRSock);
+  WSACleanup;
+  TerminateThread(ThreadDebugHandle, 0);
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmConnecting.tmrTimeOutTimer(Sender: TObject);
+begin
+  Application.ProcessMessages;
+  Self.Activate;
+  
+  if pgbTimeOut.Position < pgbTimeOut.Max then
+  begin
+    pgbTimeOut.StepBy(1);
+  end
+  else
+  begin
+    tmrTimeOut.Enabled := False;
+    Application.MessageBox('The connection timeout has been reached!', 'LuaEdit', MB_OK+MB_ICONERROR);
+    btnCancel.Click;
+  end;
+
+  if WaitForSingleObject(hMutex, 30) <> WAIT_TIMEOUT then
+  begin
+    // A connection has been made so we close this form and start debugging
+    ReleaseMutex(hMutex);
+    tmrTimeOut.Enabled := False;
+    Self.Close;
+  end;
+end;
+
+procedure TfrmConnecting.FormShow(Sender: TObject);
+begin
+  tmrTimeOut.Enabled := True;
+  pgbTimeOut.Position := 0;
+end;
+
+end.

+ 122 - 0
LuaEdit/Contributors.dfm

@@ -0,0 +1,122 @@
+object frmContributors: TfrmContributors
+  Left = 432
+  Top = 351
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsSingle
+  Caption = 'Contributors list'
+  ClientHeight = 193
+  ClientWidth = 466
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  DesignSize = (
+    466
+    193)
+  PixelsPerInch = 96
+  TextHeight = 13
+  object btnClose: TButton
+    Left = 384
+    Top = 162
+    Width = 75
+    Height = 25
+    Anchors = [akRight, akBottom]
+    Cancel = True
+    Caption = '&Close'
+    Default = True
+    ModalResult = 1
+    TabOrder = 0
+  end
+  object GroupBox1: TGroupBox
+    Left = 16
+    Top = 16
+    Width = 441
+    Height = 65
+    Caption = 'Jean-Fran'#231'ois Goulet'
+    TabOrder = 1
+    object Label1: TLabel
+      Left = 24
+      Top = 24
+      Width = 32
+      Height = 13
+      Caption = 'E-Mail:'
+    end
+    object Label2: TLabel
+      Left = 96
+      Top = 24
+      Width = 108
+      Height = 13
+      Cursor = crHandPoint
+      Caption = '[email protected]'
+      Font.Charset = DEFAULT_CHARSET
+      Font.Color = clBlue
+      Font.Height = -11
+      Font.Name = 'MS Sans Serif'
+      Font.Style = []
+      ParentFont = False
+      OnClick = Label2Click
+    end
+    object Label3: TLabel
+      Left = 24
+      Top = 40
+      Width = 59
+      Height = 13
+      Caption = 'Contribution:'
+    end
+    object Label4: TLabel
+      Left = 96
+      Top = 40
+      Width = 254
+      Height = 13
+      Caption = 'Created and developped LuaEdit for Lua 5.0 in Delphi'
+    end
+  end
+  object GroupBox2: TGroupBox
+    Left = 16
+    Top = 88
+    Width = 441
+    Height = 65
+    Caption = 'Shmuel Zeigerman'
+    TabOrder = 2
+    object Label5: TLabel
+      Left = 24
+      Top = 24
+      Width = 32
+      Height = 13
+      Caption = 'E-Mail:'
+    end
+    object Label6: TLabel
+      Left = 96
+      Top = 24
+      Width = 98
+      Height = 13
+      Cursor = crHandPoint
+      Caption = '[email protected]'
+      Font.Charset = DEFAULT_CHARSET
+      Font.Color = clBlue
+      Font.Height = -11
+      Font.Name = 'MS Sans Serif'
+      Font.Style = []
+      ParentFont = False
+      OnClick = Label6Click
+    end
+    object Label7: TLabel
+      Left = 24
+      Top = 40
+      Width = 59
+      Height = 13
+      Caption = 'Contribution:'
+    end
+    object Label8: TLabel
+      Left = 96
+      Top = 40
+      Width = 284
+      Height = 13
+      Caption = 'Tested LuaEdit for Lua 5.0 under several Operating Systems'
+    end
+  end
+end

+ 53 - 0
LuaEdit/Contributors.pas

@@ -0,0 +1,53 @@
+unit Contributors;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ShellAPI;
+
+type
+  TfrmContributors = class(TForm)
+    btnClose: TButton;
+    GroupBox1: TGroupBox;
+    Label1: TLabel;
+    Label2: TLabel;
+    Label3: TLabel;
+    Label4: TLabel;
+    GroupBox2: TGroupBox;
+    Label5: TLabel;
+    Label6: TLabel;
+    Label7: TLabel;
+    Label8: TLabel;
+    procedure Label2Click(Sender: TObject);
+    procedure Label6Click(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+    procedure SendEMail(EMailAddress: String);
+  end;
+
+var
+  frmContributors: TfrmContributors;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmContributors.SendEMail(EMailAddress: String);
+begin
+  ShellExecute(Self.Handle, 'open', PChar('mailto:'+EMailAddress+'?subject=About LuaEdit...'), nil, nil, SW_SHOWNORMAL);
+end;
+
+procedure TfrmContributors.Label2Click(Sender: TObject);
+begin
+  SendEMail(TLabel(Sender).Caption);
+end;
+
+procedure TfrmContributors.Label6Click(Sender: TObject);
+begin
+  SendEMail(TLabel(Sender).Caption);
+end;
+
+end.

+ 573 - 0
LuaEdit/EditorSettings.dfm

@@ -0,0 +1,573 @@
+object frmEditorSettings: TfrmEditorSettings
+  Left = 492
+  Top = 161
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsSingle
+  Caption = 'Editor Settings'
+  ClientHeight = 416
+  ClientWidth = 492
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnCreate = FormCreate
+  OnDestroy = FormDestroy
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 375
+    Width = 492
+    Height = 41
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    DesignSize = (
+      492
+      41)
+    object imgNotify: TImage
+      Left = 20
+      Top = 15
+      Width = 32
+      Height = 32
+      AutoSize = True
+      Picture.Data = {
+        055449636F6E0000010001001010000001002000680400001600000028000000
+        1000000020000000010020000000000000000000000000000000000000000000
+        000000006E442A00966E4E00673C2300461804006B3F2500451A06003C0F0000
+        461906004A1E0B2463361BB7502511295328130053281300562A1500552A1500
+        552A15006E442A00966E4E00673C2300461804006A3E240043170400380A0000
+        3D10004DCE9F6FFFAB784DFF3F160424532915004C200D00562B1600552A1500
+        552A15006E442A00966E4E00663B220043160200663920003D1000002D00003F
+        966B4BFFFFF7C4FF946341FF2F030043512613004B1F0D00552A1500552A1500
+        552A15006E432A00946C4C0062371E003C0C00215A2C14A77E553AE88C674AFF
+        CAAA87FFFFDCB3FFAF8764FF54270DFE3F1200C9461A085253281300552A1500
+        552A15006D42280090674700592B136AA7886AFFD2B699FFE7CAA8FFFDE4BFFF
+        FFE9C7FFFFF8D1FFF5D6B3FFD8B893FFAD8964FF5E2F15FF3E1100A153281300
+        552A1500693D2300885E3D74CAB59AFFEDD5B8FFFFEBCCFFF8D6B7FFC0704FFF
+        E99563FFDD8D5CFFDFA67BFFFFE7C3FFF4D6B1FFD7B694FF734729FF3C11009A
+        5428130060331929CBB8A2FFEED8C1FFFFEFD1FFFFEECFFFFFFFE2FFB48162FF
+        790000FF8F2E06FFF7E5C4FFFFEDCBFFFFE7C3FFF5D7B7FFDABD9BFF5B2D14FF
+        471B0837AD9177B3E8DBC7FFFFF0D7FFFFECD2FFFFE7CEFFFFFFEDFFCFB295FF
+        6F0000FFA45837FFFFFFF0FFFFE7C9FFFFE5C6FFFFEAC9FFFCE3C5FFAD8A6BFF
+        3E0F0092CFBFAEFFF8E7D5FFFFF4DFFFFFECD6FFFFECD6FFFFFFF3FFCDAF94FF
+        740000FFA55736FFFFFFF1FFFFE8CFFFFFE5CAFFFFEACFFFFFEBD1FFE4CAAFFF
+        4B1D07A8CFC2B7FFFDEFE0FFFFF4E3FFFFEFDEFFFFF0DCFFFFFFFFFFD6C1AAFF
+        770000FFA65836FFFFFFF8FFFFEDD5FFFFE9D0FFFFECD2FFFFF2D9FFECD7C0FF
+        491E09A9D0C7BDFFFDF5E9FFFFF8EBFFFFF2E6FFFFFDEFFFEFE6DAFF8C3D1EFF
+        650000FF8C3C23FFFFFFFEFFFFF0DDFFFFEBD6FFFFEED9FFFFFAE5FFF2DEC9FF
+        4B1F0A93D9CCBED8F7F4EFFFFFFFF9FFFFF6ECFFFFFFF9FFE6D9C9FFB39382FF
+        BAA59AFFC2AEA3FFFFFFF8FFFFF4E3FFFFEEDCFFFFFAEBFFFFFFFCFFE2CAB4FF
+        42110036E2C9B254E4E5E5FFFFFFFFFFFFFFFAFFFFFBF3FFFFFFFFFFFFFFFAFF
+        F9C8A6FFFFFEEEFFFFFFFFFFFFF5E8FFFFFAEFFFFFFFFFFFFFFFFFFF8A6750AF
+        38080000E8CBB000E2DBD3AAEDEDEFFFFFFFFFFFFFFFFFFFFFFFFFFF8E574EFF
+        5D0000FF9A4528FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCAB2A0DC33030000
+        3E0E0000E7CCB200F0D4B700E6DCD391F2F4F5FFFFFFFFFFFFFFFFFFD7CEC9FF
+        624144FFC5B5AFFFFFFFFFFFFFFFFFFFFFFFFEFFDCCCBEA4613014003B0C0000
+        41130000E7CDB300F0D5B900E7DFD700D3CAC226DBCFC395F5F2EEEFFFFFFFFF
+        FFFFFFFFFFFFFFFFFBF8F3F3BFAB9D9D7B56402EE4D6C90067371C003E100000
+        42140000FF1FFFFFFE1FFFFFFC1FFFFFE007FFFFC003FF088001FFFF0000FFFF
+        0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000159188003FFFFC007FFFF
+        E00FFFFF}
+    end
+    object lblNotify: TLabel
+      Left = 40
+      Top = 15
+      Width = 225
+      Height = 13
+      Caption = 'Some changes will require to restart your system'
+    end
+    object btnCancel: TButton
+      Left = 410
+      Top = 11
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Cancel = True
+      Caption = '&Cancel'
+      ModalResult = 2
+      TabOrder = 1
+    end
+    object btnOK: TButton
+      Left = 328
+      Top = 11
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&OK'
+      Default = True
+      ModalResult = 1
+      TabOrder = 0
+      OnClick = btnOKClick
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 0
+    Width = 492
+    Height = 375
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 1
+    object pgcDebuggerSettings: TPageControl
+      Left = 0
+      Top = 0
+      Width = 492
+      Height = 375
+      ActivePage = stabGeneral
+      Align = alClient
+      TabOrder = 0
+      object stabGeneral: TTabSheet
+        Caption = 'General'
+        object Label1: TLabel
+          Left = 16
+          Top = 291
+          Width = 53
+          Height = 13
+          Caption = 'Undo Limit:'
+        end
+        object Label2: TLabel
+          Left = 152
+          Top = 291
+          Width = 53
+          Height = 13
+          Caption = 'Tab Width:'
+        end
+        object Group1: TGroupBox
+          Left = 16
+          Top = 135
+          Width = 457
+          Height = 145
+          Caption = 'Editor Options'
+          TabOrder = 2
+          object chkAutoIndent: TCheckBox
+            Left = 16
+            Top = 32
+            Width = 97
+            Height = 17
+            Caption = 'Auto Indent'
+            TabOrder = 0
+          end
+          object chkGroupUndo: TCheckBox
+            Left = 16
+            Top = 56
+            Width = 97
+            Height = 17
+            Caption = 'Group Undo'
+            TabOrder = 1
+          end
+          object chkScrollPastEOF: TCheckBox
+            Left = 312
+            Top = 32
+            Width = 97
+            Height = 17
+            Caption = 'Scroll Past EOF'
+            TabOrder = 8
+          end
+          object chkSmartTab: TCheckBox
+            Left = 16
+            Top = 104
+            Width = 97
+            Height = 17
+            Caption = 'Use Smart Tabs'
+            TabOrder = 3
+          end
+          object chkTrailBlanks: TCheckBox
+            Left = 312
+            Top = 104
+            Width = 121
+            Height = 17
+            Caption = 'Keep Trailing Blanks'
+            TabOrder = 11
+          end
+          object chkTabIndent: TCheckBox
+            Left = 16
+            Top = 80
+            Width = 97
+            Height = 17
+            Caption = 'Use Tab Indent'
+            TabOrder = 2
+          end
+          object chkHideScrollBars: TCheckBox
+            Left = 128
+            Top = 104
+            Width = 169
+            Height = 17
+            Caption = 'Hide Scroll Bars When Useless'
+            TabOrder = 7
+          end
+          object chkEHomeKey: TCheckBox
+            Left = 128
+            Top = 56
+            Width = 145
+            Height = 17
+            Caption = 'Use Enhance Home Key'
+            TabOrder = 5
+          end
+          object chkTabsToSpaces: TCheckBox
+            Left = 128
+            Top = 80
+            Width = 135
+            Height = 17
+            Caption = 'Convert Tabs to Spaces'
+            TabOrder = 6
+          end
+          object chkScrollPastEOL: TCheckBox
+            Left = 312
+            Top = 56
+            Width = 97
+            Height = 17
+            Caption = 'Scroll Past EOL'
+            TabOrder = 9
+          end
+          object chkKeepCaretX: TCheckBox
+            Left = 312
+            Top = 80
+            Width = 129
+            Height = 17
+            Caption = 'Seek Caret X'
+            TabOrder = 10
+          end
+          object chkRightMouseMovesCursor: TCheckBox
+            Left = 128
+            Top = 32
+            Width = 145
+            Height = 17
+            Caption = 'Move Caret on Right Click'
+            TabOrder = 4
+          end
+        end
+        object txtUndoLimit: TEdit
+          Left = 16
+          Top = 307
+          Width = 121
+          Height = 21
+          MaxLength = 5
+          TabOrder = 0
+          OnKeyPress = txtUndoLimitKeyPress
+        end
+        object txtTabWidth: TEdit
+          Left = 152
+          Top = 307
+          Width = 121
+          Height = 21
+          MaxLength = 2
+          TabOrder = 1
+          OnKeyPress = txtTabWidthKeyPress
+        end
+        object GroupBox1: TGroupBox
+          Left = 16
+          Top = 16
+          Width = 457
+          Height = 105
+          Caption = 'General'
+          TabOrder = 3
+          object chkFileAssociate: TCheckBox
+            Left = 16
+            Top = 24
+            Width = 225
+            Height = 17
+            Caption = 'Associate LuaEdit with Common Lua Files'
+            TabOrder = 0
+            OnClick = chkFileAssociateClick
+          end
+          object chkSaveProjectsInc: TCheckBox
+            Left = 272
+            Top = 24
+            Width = 161
+            Height = 17
+            Caption = 'Save Projects Incrementally'
+            TabOrder = 1
+          end
+          object chkSaveUnitsInc: TCheckBox
+            Left = 272
+            Top = 48
+            Width = 161
+            Height = 17
+            Caption = 'Save Units Incrementally'
+            TabOrder = 2
+          end
+          object chkSaveBreakpoints: TCheckBox
+            Left = 16
+            Top = 48
+            Width = 217
+            Height = 17
+            Caption = 'Save Breakpoints'
+            TabOrder = 3
+          end
+          object chkShowExSaveDlg: TCheckBox
+            Left = 16
+            Top = 72
+            Width = 217
+            Height = 17
+            Caption = 'Show Extended Save Dialog on Exit'
+            TabOrder = 4
+          end
+        end
+      end
+      object stabDisplay: TTabSheet
+        Caption = 'Display'
+        ImageIndex = 1
+        object GroupBox2: TGroupBox
+          Left = 16
+          Top = 16
+          Width = 457
+          Height = 105
+          Caption = 'Gutter'
+          TabOrder = 0
+          object Label3: TLabel
+            Left = 24
+            Top = 48
+            Width = 63
+            Height = 13
+            Caption = 'Gutter Width:'
+          end
+          object Label4: TLabel
+            Left = 192
+            Top = 48
+            Width = 59
+            Height = 13
+            Caption = 'Gutter Color:'
+          end
+          object chkShowGutter: TCheckBox
+            Left = 24
+            Top = 24
+            Width = 89
+            Height = 17
+            Caption = 'Show Gutter'
+            TabOrder = 0
+            OnClick = chkShowGutterClick
+          end
+          object chkShowLineNumbers: TCheckBox
+            Left = 192
+            Top = 24
+            Width = 129
+            Height = 17
+            Caption = 'Show Line Numbers'
+            TabOrder = 1
+          end
+          object txtGutterWidth: TEdit
+            Left = 24
+            Top = 64
+            Width = 153
+            Height = 21
+            MaxLength = 2
+            TabOrder = 3
+            OnKeyPress = txtGutterWidthKeyPress
+          end
+          object cboGutterColor: TColorBox
+            Left = 192
+            Top = 64
+            Width = 241
+            Height = 22
+            Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames]
+            Font.Charset = DEFAULT_CHARSET
+            Font.Color = clWindowText
+            Font.Height = -11
+            Font.Name = 'MS Sans Serif'
+            Font.Style = []
+            ItemHeight = 16
+            ParentFont = False
+            TabOrder = 4
+          end
+          object chkLeadingZeros: TCheckBox
+            Left = 336
+            Top = 24
+            Width = 97
+            Height = 17
+            Caption = 'Leading Zeros'
+            TabOrder = 2
+          end
+        end
+        object GroupBox3: TGroupBox
+          Left = 16
+          Top = 128
+          Width = 457
+          Height = 201
+          Caption = 'Editor Font'
+          TabOrder = 1
+          object Label5: TLabel
+            Left = 24
+            Top = 32
+            Width = 24
+            Height = 13
+            Caption = 'Font:'
+          end
+          object Label6: TLabel
+            Left = 304
+            Top = 32
+            Width = 23
+            Height = 13
+            Caption = 'Size:'
+          end
+          object cboFonts: TComboBox
+            Left = 24
+            Top = 48
+            Width = 265
+            Height = 22
+            Style = csOwnerDrawVariable
+            ItemHeight = 16
+            TabOrder = 0
+            OnChange = cboFontsChange
+            OnDrawItem = cboFontsDrawItem
+            OnMeasureItem = cboFontsMeasureItem
+          end
+          object cboFontSize: TComboBox
+            Left = 304
+            Top = 48
+            Width = 129
+            Height = 22
+            Style = csOwnerDrawVariable
+            ItemHeight = 16
+            MaxLength = 2
+            TabOrder = 1
+            OnChange = cboFontSizeChange
+            OnKeyPress = cboFontSizeKeyPress
+            OnMeasureItem = cboFontSizeMeasureItem
+            Items.Strings = (
+              '8'
+              '10'
+              '11'
+              '12'
+              '14'
+              '18'
+              '24')
+          end
+          object pnlPreview: TPanel
+            Left = 24
+            Top = 80
+            Width = 409
+            Height = 105
+            BevelOuter = bvNone
+            BorderStyle = bsSingle
+            Caption = 'Sample Text'
+            TabOrder = 2
+          end
+        end
+      end
+      object stabColors: TTabSheet
+        Caption = 'Colors'
+        ImageIndex = 2
+        object Label7: TLabel
+          Left = 16
+          Top = 16
+          Width = 46
+          Height = 13
+          Caption = 'Elements:'
+        end
+        object Label8: TLabel
+          Left = 288
+          Top = 17
+          Width = 57
+          Height = 13
+          Caption = 'Foreground:'
+        end
+        object Label9: TLabel
+          Left = 288
+          Top = 64
+          Width = 61
+          Height = 13
+          Caption = 'Background:'
+        end
+        object synSample: TSynEdit
+          Left = 16
+          Top = 112
+          Width = 449
+          Height = 217
+          Font.Charset = DEFAULT_CHARSET
+          Font.Color = clWindowText
+          Font.Height = -13
+          Font.Name = 'Courier New'
+          Font.Style = []
+          TabOrder = 6
+          Gutter.Font.Charset = DEFAULT_CHARSET
+          Gutter.Font.Color = clWindowText
+          Gutter.Font.Height = -11
+          Gutter.Font.Name = 'Courier New'
+          Gutter.Font.Style = []
+          Lines.Strings = (
+            '-- This is a sample'
+            'local varString = "This is a string"'
+            'local varNumber = 1975.064328'
+            ''
+            'function Test(Param1, Param2)'
+            '    local varTemp = 0'
+            ''
+            '    while varTemp < 99 do'
+            '        varTemp = varTemp + 1'
+            '    end'
+            'end'
+            ''
+            '--[[ This is a Breakpoint line'
+            'This is a Error line'
+            'This is a Execution line]]')
+          MaxScrollWidth = 200
+          ReadOnly = True
+          WordWrapGlyph.Visible = False
+        end
+        object lstElement: TListBox
+          Left = 16
+          Top = 32
+          Width = 145
+          Height = 65
+          ItemHeight = 13
+          Sorted = True
+          TabOrder = 0
+          OnClick = lstElementClick
+        end
+        object cboForeground: TColorBox
+          Left = 288
+          Top = 33
+          Width = 177
+          Height = 22
+          Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames]
+          ItemHeight = 16
+          TabOrder = 4
+          OnChange = cboForegroundChange
+        end
+        object cboBackground: TColorBox
+          Left = 288
+          Top = 80
+          Width = 177
+          Height = 22
+          Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames]
+          ItemHeight = 16
+          TabOrder = 5
+          OnChange = cboBackgroundChange
+        end
+        object chkBold: TCheckBox
+          Left = 192
+          Top = 30
+          Width = 57
+          Height = 17
+          Caption = 'Bold'
+          TabOrder = 1
+          OnClick = chkBoldClick
+        end
+        object chkItalic: TCheckBox
+          Left = 192
+          Top = 57
+          Width = 57
+          Height = 17
+          Caption = 'Italic'
+          TabOrder = 2
+          OnClick = chkItalicClick
+        end
+        object chkUnderline: TCheckBox
+          Left = 192
+          Top = 84
+          Width = 73
+          Height = 17
+          Caption = 'Underline'
+          TabOrder = 3
+          OnClick = chkUnderlineClick
+        end
+      end
+    end
+  end
+end

+ 640 - 0
LuaEdit/EditorSettings.pas

@@ -0,0 +1,640 @@
+unit EditorSettings;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, SynEdit, ComCtrls, ExtCtrls, IniFiles, Main, LuaSyntax;
+
+const
+  UM_MEASUREFONTS = WM_USER;
+
+type
+  TfrmEditorSettings = class(TForm)
+    Panel1: TPanel;
+    Panel2: TPanel;
+    btnCancel: TButton;
+    btnOK: TButton;
+    pgcDebuggerSettings: TPageControl;
+    stabGeneral: TTabSheet;
+    Group1: TGroupBox;
+    chkAutoIndent: TCheckBox;
+    chkGroupUndo: TCheckBox;
+    chkScrollPastEOF: TCheckBox;
+    chkSmartTab: TCheckBox;
+    chkTrailBlanks: TCheckBox;
+    chkTabIndent: TCheckBox;
+    chkHideScrollBars: TCheckBox;
+    chkEHomeKey: TCheckBox;
+    Label1: TLabel;
+    txtUndoLimit: TEdit;
+    Label2: TLabel;
+    txtTabWidth: TEdit;
+    stabDisplay: TTabSheet;
+    GroupBox2: TGroupBox;
+    GroupBox3: TGroupBox;
+    chkShowGutter: TCheckBox;
+    chkShowLineNumbers: TCheckBox;
+    Label3: TLabel;
+    txtGutterWidth: TEdit;
+    cboGutterColor: TColorBox;
+    Label4: TLabel;
+    chkLeadingZeros: TCheckBox;
+    cboFonts: TComboBox;
+    Label5: TLabel;
+    Label6: TLabel;
+    cboFontSize: TComboBox;
+    pnlPreview: TPanel;
+    stabColors: TTabSheet;
+    synSample: TSynEdit;
+    lstElement: TListBox;
+    Label7: TLabel;
+    cboForeground: TColorBox;
+    Label8: TLabel;
+    Label9: TLabel;
+    cboBackground: TColorBox;
+    chkBold: TCheckBox;
+    chkItalic: TCheckBox;
+    chkUnderline: TCheckBox;
+    chkTabsToSpaces: TCheckBox;
+    chkScrollPastEOL: TCheckBox;
+    chkKeepCaretX: TCheckBox;
+    chkRightMouseMovesCursor: TCheckBox;
+    GroupBox1: TGroupBox;
+    chkFileAssociate: TCheckBox;
+    imgNotify: TImage;
+    lblNotify: TLabel;
+    chkSaveProjectsInc: TCheckBox;
+    chkSaveUnitsInc: TCheckBox;
+    chkSaveBreakpoints: TCheckBox;
+    chkShowExSaveDlg: TCheckBox;
+    procedure cboFontsMeasureItem(Control: TWinControl; Index: Integer;  var Height: Integer);
+    procedure cboFontsDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
+    procedure FormCreate(Sender: TObject);
+    procedure cboFontsChange(Sender: TObject);
+    procedure cboFontSizeKeyPress(Sender: TObject; var Key: Char);
+    procedure cboFontSizeChange(Sender: TObject);
+    procedure txtUndoLimitKeyPress(Sender: TObject; var Key: Char);
+    procedure txtTabWidthKeyPress(Sender: TObject; var Key: Char);
+    procedure txtGutterWidthKeyPress(Sender: TObject; var Key: Char);
+    procedure WriteEditorSettings;
+    procedure btnOKClick(Sender: TObject);
+    procedure chkShowGutterClick(Sender: TObject);
+    procedure lstElementClick(Sender: TObject);
+    procedure chkBoldClick(Sender: TObject);
+    procedure chkItalicClick(Sender: TObject);
+    procedure chkUnderlineClick(Sender: TObject);
+    procedure cboForegroundChange(Sender: TObject);
+    procedure cboBackgroundChange(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure FormDestroy(Sender: TObject);
+    procedure synEditSpecialLineColors(Sender: TObject; Line: Integer; var Special: Boolean; var FG, BG: TColor);
+    procedure chkFileAssociateClick(Sender: TObject);
+    procedure cboFontSizeMeasureItem(Control: TWinControl; Index: Integer;
+      var Height: Integer);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+    procedure UMMeasureFonts(var msg: TMessage); message UM_MEASUREFONTS;
+    procedure NotifyRestart(Notify: Boolean);
+  end;
+
+var
+  frmEditorSettings: TfrmEditorSettings;
+  Options: TSynEditorOptions;
+  lstEditorColorsTemp: TList;
+  pTempUnit: TLuaUnit;
+
+function SetPrivilege(sPrivilegeName : PChar; bEnabled : boolean): boolean; cdecl; external 'LuaEditSys.dll';
+function WinExit(iFlags: integer): Boolean; cdecl; external 'LuaEditSys.dll';
+
+implementation
+
+uses RegSetFileType;
+
+{$R *.dfm}
+
+procedure TfrmEditorSettings.UMMeasureFonts(var msg: TMessage);
+var
+  i: Integer;
+  MaxItemHeight: Integer;
+begin
+  // use form canvas for measurements
+  MaxItemHeight := 0;
+  Canvas.Font.Size := 10;
+  
+  for i := 0 to cboFonts.Items.Count - 1 do
+  begin
+    Canvas.Font.Name := cboFonts.Items[i];
+
+    if Canvas.TextHeight(cboFonts.Items[i]) > MaxItemHeight then
+      MaxItemHeight := Canvas.TextHeight(cboFonts.Items[i]);
+
+    cboFonts.Perform(CB_SETITEMHEIGHT, i, Canvas.TextHeight(cboFonts.Items[i]));
+  end;
+
+  for i := 0 to cboFontSize.Items.Count do
+  begin
+    cboFontSize.Perform(CB_SETITEMHEIGHT, MaxItemHeight, Canvas.TextHeight(cboFontSize.Items[i]));
+  end;
+end;
+
+procedure TfrmEditorSettings.cboFontsMeasureItem(Control: TWinControl; Index: Integer; var Height: Integer);
+begin
+  Height := (Control As TCombobox).ItemHeight+4;
+end;
+
+procedure TfrmEditorSettings.cboFontSizeMeasureItem(Control: TWinControl; Index: Integer; var Height: Integer);
+begin
+  Height := (Control As TCombobox).ItemHeight+4;
+end;
+
+procedure TfrmEditorSettings.FormCreate(Sender: TObject);
+var
+  HR: TSynLuaSyn;
+begin
+  pTempUnit := TLuaUnit.Create('');
+  pTempUnit.synUnit := synSample;
+  pTempUnit.pDebugInfos.AddBreakpointAtLine(13);
+  pTempUnit.pDebugInfos.iLineError := 14;
+  pTempUnit.pDebugInfos.iCurrentLineDebug := 15;
+  synSample.OnSpecialLineColors := synEditSpecialLineColors;
+  synSample.Refresh;
+  
+  HR := TSynLuaSyn.Create(nil);
+  synSample.Highlighter := HR;
+  lstEditorColorsTemp := TList.Create;
+  cboFonts.Items := Screen.Fonts;
+  cboFonts.itemindex := 0;
+  // Measure items after form has been shown
+  PostMessage(Self.Handle, UM_MEASUREFONTS, 0, 0);
+end;
+
+procedure TfrmEditorSettings.synEditSpecialLineColors(Sender: TObject; Line: Integer; var Special: Boolean; var FG, BG: TColor);
+begin
+  Special := False;
+
+  if pTempUnit.pDebugInfos.IsBreakPointLine(Line) then
+  begin
+    Special := True;
+    BG := StringToColor(TEditorColors(lstEditorColorsTemp.Items[9]).Background);
+    FG := StringToColor(TEditorColors(lstEditorColorsTemp.Items[9]).Foreground);
+  end;
+
+  if pTempUnit.pDebugInfos.iCurrentLineDebug = Line then
+  begin
+    Special := True;
+    BG := StringToColor(TEditorColors(lstEditorColorsTemp.Items[3]).Background);
+    FG := StringToColor(TEditorColors(lstEditorColorsTemp.Items[3]).Foreground);
+  end;
+
+  if pTempUnit.pDebugInfos.iLineError = Line then
+  begin
+    Special := True;
+    BG := StringToColor(TEditorColors(lstEditorColorsTemp.Items[2]).Background);
+    FG := StringToColor(TEditorColors(lstEditorColorsTemp.Items[2]).Foreground)
+  end;
+end;
+
+procedure TfrmEditorSettings.cboFontsDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
+var
+  cb: TCombobox;
+begin
+  cb := TCombobox(Control);
+  cb.Canvas.FillRect(rect);
+  if (index >= 0) and (index < cb.Items.Count) then
+  begin
+    if odComboBoxEdit in State then
+    begin
+      // Draw the edit portion of the control, use the controls
+      // design-time font for this since the edit control is
+      // fixed height and drawing a bunch of symbols if the selected
+      // font is Symbol etc. is not very informative for the user.
+      cb.Canvas.Font := cb.Font;
+      if odSelected in State then
+       cb.Canvas.Font.Color := clHighlightText;
+    end
+    else
+    begin
+      cb.Canvas.Font.Name := cb.Items[index];
+      cb.Canvas.Font.Size := 10;
+    end;
+    cb.Canvas.TextRect(Rect, rect.left+2, rect.top+2, cb.Items[index]);
+  end;
+end;
+
+procedure TfrmEditorSettings.cboFontsChange(Sender: TObject);
+begin
+  cboFonts.Font.Name := cboFonts.Text;
+  pnlPreview.Font.Name := cboFonts.Text;
+end;
+
+procedure TfrmEditorSettings.cboFontSizeKeyPress(Sender: TObject; var Key: Char);
+begin
+  if not (Key in ['0'..'9', #8]) then
+    Key := #0;
+end;
+
+procedure TfrmEditorSettings.cboFontSizeChange(Sender: TObject);
+begin
+  if cboFontSize.Text <> '' then
+    pnlPreview.Font.Size := StrToInt(cboFontSize.Text);
+end;
+
+procedure TfrmEditorSettings.txtUndoLimitKeyPress(Sender: TObject; var Key: Char);
+begin
+  if not (Key in ['0'..'9', #8]) then
+    Key := #0;
+end;
+
+procedure TfrmEditorSettings.txtTabWidthKeyPress(Sender: TObject; var Key: Char);
+begin
+  if not (Key in ['0'..'9', #8]) then
+    Key := #0;
+end;
+
+procedure TfrmEditorSettings.txtGutterWidthKeyPress(Sender: TObject; var Key: Char);
+begin
+  if not (Key in ['0'..'9', #8]) then
+    Key := #0;
+end;
+
+procedure TfrmEditorSettings.WriteEditorSettings;
+var
+  pIniFile: TIniFile;
+  x: Integer;
+begin
+  Screen.Cursor := crHourGlass;
+  pIniFile := TIniFile.Create(ExtractFilePath(Application.ExeName)+'\LuaEdit.ini');
+
+  //Writing general settings
+  if chkAutoIndent.Checked then
+    Options := Options + [eoAutoIndent]
+  else
+    Options := Options - [eoAutoIndent];
+
+  if chkGroupUndo.Checked then
+    Options := Options + [eoGroupUndo]
+  else
+    Options := Options - [eoGroupUndo];
+
+  if chkScrollPastEOF.Checked then
+    Options := Options + [eoScrollPastEof]
+  else
+    Options := Options - [eoScrollPastEof];
+
+  if chkHideScrollBars.Checked then
+    Options := Options + [eoHideShowScrollbars]
+  else
+    Options := Options - [eoHideShowScrollbars];
+
+  if chkTrailBlanks.Checked then
+    Options := Options + [eoTrimTrailingSpaces]
+  else
+    Options := Options - [eoTrimTrailingSpaces];
+
+  if chkTabIndent.Checked then
+    Options := Options + [eoTabIndent]
+  else
+    Options := Options - [eoTabIndent];
+
+  if chkEHomeKey.Checked then
+    Options := Options + [eoEnhanceHomeKey]
+  else
+    Options := Options - [eoEnhanceHomeKey];
+
+  if chkSmartTab.Checked then
+    Options := Options + [eoSmartTabs]
+  else
+    Options := Options - [eoSmartTabs];
+
+  if chkTabsToSpaces.Checked then
+    Options := Options + [eoTabsToSpaces]
+  else
+    Options := Options - [eoTabsToSpaces];
+
+  if chkScrollPastEOL.Checked then
+    Options := Options + [eoScrollPastEol]
+  else
+    Options := Options - [eoScrollPastEol];
+
+  if chkKeepCaretX.Checked then
+    Options := Options + [eoKeepCaretX]
+  else
+    Options := Options - [eoKeepCaretX];
+
+  if chkRightMouseMovesCursor.Checked then
+    Options := Options + [eoRightMouseMovesCursor]
+  else
+    Options := Options - [eoRightMouseMovesCursor];
+
+  pIniFile.WriteInteger('General', 'EditorOptions', Integer(Options));
+  pIniFile.WriteInteger('General', 'UndoLimit', StrToInt(txtUndoLimit.Text));
+  pIniFile.WriteInteger('General', 'TabWidth', StrToInt(txtTabWidth.Text));
+  pIniFile.WriteBool('General', 'SaveProjectsInc', chkSaveProjectsInc.Checked);
+  pIniFile.WriteBool('General', 'SaveBreakpoints', chkSaveBreakpoints.Checked);
+  pIniFile.WriteBool('General', 'SaveUnitsInc', chkSaveUnitsInc.Checked);
+  pIniFile.WriteBool('General', 'AssociateFiles', chkFileAssociate.Checked);
+  pIniFile.WriteBool('General', 'ShowExSaveDlg', chkShowExSaveDlg.Checked);
+
+  if AssociateFiles <> chkFileAssociate.Checked then
+  begin
+    if chkFileAssociate.Checked then
+    begin
+      // Register file association for .lpr files
+      RegSetAssociation('.lpr', 'LuaEdit.lpr', 'LuaEdit Project', 'LuaEdit/LuaEdit.lpr', PChar(ExtractFileDir(Application.ExeName) + '\Graphics\Project.ico'));
+      RegSetOpenWith('LuaEdit.lpr', PChar(Application.ExeName + ' %1'));
+
+      // Register file association for .lua files
+      RegSetAssociation('.lua', 'LuaEdit.lua', 'LuaEdit Unit', 'LuaEdit/LuaEdit.lua', PChar(ExtractFileDir(Application.ExeName) + '\Graphics\Unit.ico'));
+      RegSetOpenWith('LuaEdit.lua', PChar(Application.ExeName + ' %1'));
+    end
+    else
+    begin      
+      // Clear file association registration for .lpr files
+      RegClearIEOpenKey('.lpr');
+      RegClearAssociation('.lpr', 'LuaEdit.lpr');
+
+      // Clear file association registration for .lua files
+      RegClearIEOpenKey('.lua');
+      RegClearAssociation('.lua', 'LuaEdit.lua');
+    end;
+
+    if Application.MessageBox('You must restart your computer for some of the changes to take effect. Do you want to restart your computer now?', 'LuaEdit', MB_ICONQUESTION+MB_YESNO) = IDYES then
+    begin
+      if not WinExit(EWX_REBOOT) then
+      begin
+        Application.MessageBox('LuaEdit was unable to restart your computer!', 'LuaEdit', MB_OK+MB_ICONERROR);
+      end;
+    end;
+  end;
+
+  //Writing display settings
+  pIniFile.WriteBool('Display', 'ShowGutter', chkShowGutter.Checked);
+  pIniFile.WriteBool('Display', 'ShowLineNumbers', chkShowLineNumbers.Checked);
+  piniFile.WriteBool('Display', 'LeadingZeros', chkLeadingZeros.Checked);
+  pIniFile.WriteInteger('Display', 'GutterWidth', StrToInt(txtGutterWidth.Text));
+  pIniFile.WriteString('Display', 'GutterColor', ColorToString(cboGutterColor.Selected));
+  pIniFile.WriteString('Display', 'FontName', cboFonts.Text);
+  pIniFile.WriteInteger('Display', 'FontSize', StrToInt(cboFontSize.Text));
+
+  pIniFile.UpdateFile;
+  pIniFile.Free;
+  pIniFile := TIniFile.Create(ExtractFilePath(Application.ExeName)+'\LuaEdit.dat');
+
+  //Writing colors settings
+  for x := 0 to lstElement.Items.Count - 1 do
+  begin
+    pIniFile.WriteBool(lstElement.Items.Strings[x], 'IsBold', TEditorColors(lstElement.Items.Objects[x]).IsBold);
+    pIniFile.WriteBool(lstElement.Items.Strings[x], 'IsItalic', TEditorColors(lstElement.Items.Objects[x]).IsItalic);
+    pIniFile.WriteBool(lstElement.Items.Strings[x], 'IsUnderline', TEditorColors(lstElement.Items.Objects[x]).IsUnderline);
+    pIniFile.WriteString(lstElement.Items.Strings[x], 'ForegroundColor', TEditorColors(lstElement.Items.Objects[x]).Foreground);
+    pIniFile.WriteString(lstElement.Items.Strings[x], 'BackgroundColor', TEditorColors(lstElement.Items.Objects[x]).Background);
+  end;
+
+  pIniFile.UpdateFile;
+  pIniFile.Free;
+  frmMain.LoadEditorSettings;
+  for x := 0 to LuaOpenedUnits.Count - 1 do
+    frmMain.ApplyValuesToEditor(TLuaUnit(LuaOpenedUnits.Items[x]).synUnit, EditorColors);
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmEditorSettings.btnOKClick(Sender: TObject);
+begin
+  ModalResult := mrNone;
+  
+  if ((txtUndoLimit.Text = '0') or (txtUndoLimit.Text = '')) then
+  begin
+    pgcDebuggerSettings.ActivePageIndex := 0;
+    Application.MessageBox('The limit of undo must be higher than zero.', 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtUndoLimit.SetFocus;
+  end
+  else if ((txtTabWidth.Text = '0') or (txtTabWidth.Text = '')) then
+  begin
+    pgcDebuggerSettings.ActivePageIndex := 0;
+    Application.MessageBox('The tab width must be higher than zero.', 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtTabWidth.SetFocus;
+  end
+  else if ((txtGutterWidth.Text = '0') or (txtGutterWidth.Text = '')) then
+  begin
+    pgcDebuggerSettings.ActivePageIndex := 1;
+    Application.MessageBox('The gutter width must be higher than zero.', 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtGutterWidth.SetFocus;
+  end
+  else
+  begin
+    WriteEditorSettings;
+    ModalResult := mrOk;
+  end;
+end;
+
+procedure TfrmEditorSettings.chkShowGutterClick(Sender: TObject);
+begin
+  cboGutterColor.Enabled := chkShowGutter.Checked;
+  txtGutterWidth.Enabled := chkShowGutter.Checked;
+  chkShowLineNumbers.Enabled := chkShowGutter.Checked;
+  chkLeadingZeros.Enabled := chkShowGutter.Checked;
+  Label3.Enabled := chkShowGutter.Checked;
+  Label4.Enabled := chkShowGutter.Checked;
+end;
+
+procedure TfrmEditorSettings.lstElementClick(Sender: TObject);
+var
+  SelName: String;
+begin
+  chkBold.Checked := TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).IsBold;
+  chkItalic.Checked := TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).IsItalic;
+  chkUnderline.Checked := TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).IsUnderline;
+  cboForeground.Selected := StringToColor(TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).Foreground);
+  cboBackground.Selected := StringToColor(TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).Background);
+
+  SelName := lstElement.Items.Strings[lstElement.ItemIndex];
+
+  if SelName = 'Background' then
+  begin
+    chkBold.Enabled := False;
+    chkItalic.Enabled := False;
+    chkUnderline.Enabled := False;
+    cboForeground.Enabled := False;
+    Label8.Enabled := False;
+    cboBackground.Enabled := True;
+  end
+  else if ((SelName = 'Selection') or (SelName = 'Breakpoints') or (SelName = 'Error Line') or (SelName = 'Execution Line')) then
+  begin
+    chkBold.Enabled := False;
+    chkItalic.Enabled := False;
+    chkUnderline.Enabled := False;
+    Label8.Enabled := True;
+    cboForeground.Enabled := True;
+    cboBackground.Enabled := True;
+  end
+  else
+  begin
+    chkBold.Enabled := True;
+    chkItalic.Enabled := True;
+    chkUnderline.Enabled := True;
+    Label8.Enabled := True;
+    cboForeground.Enabled := True;
+    cboBackground.Enabled := True;
+  end;
+end;
+
+procedure TfrmEditorSettings.chkBoldClick(Sender: TObject);
+begin
+  TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).IsBold := chkBold.Checked;
+  lstEditorColorsTemp.Items[lstElement.ItemIndex] := TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]);
+  frmMain.ApplyValuesToEditor(synSample, lstEditorColorsTemp);
+end;
+
+procedure TfrmEditorSettings.chkItalicClick(Sender: TObject);
+begin
+  TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).IsItalic := chkItalic.Checked;
+  lstEditorColorsTemp.Items[lstElement.ItemIndex] := TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]);
+  frmMain.ApplyValuesToEditor(synSample, lstEditorColorsTemp);
+end;
+
+procedure TfrmEditorSettings.chkUnderlineClick(Sender: TObject);
+begin
+  TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).IsUnderline := chkUnderline.Checked;
+  lstEditorColorsTemp.Items[lstElement.ItemIndex] := TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]);
+  frmMain.ApplyValuesToEditor(synSample, lstEditorColorsTemp);
+end;
+
+procedure TfrmEditorSettings.cboForegroundChange(Sender: TObject);
+begin
+  TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).Foreground := ColorToString(cboForeground.Selected);
+  lstEditorColorsTemp.Items[lstElement.ItemIndex] := TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]);
+  frmMain.ApplyValuesToEditor(synSample, lstEditorColorsTemp);
+end;
+
+procedure TfrmEditorSettings.cboBackgroundChange(Sender: TObject);
+begin
+  TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]).Background := ColorToString(cboBackground.Selected);
+  lstEditorColorsTemp.Items[lstElement.ItemIndex] := TEditorColors(lstElement.Items.Objects[lstElement.ItemIndex]);
+  frmMain.ApplyValuesToEditor(synSample, lstEditorColorsTemp);
+end;
+
+procedure TfrmEditorSettings.FormShow(Sender: TObject);
+begin
+  pgcDebuggerSettings.ActivePageIndex := 0;
+  lstEditorColorsTemp.Clear;
+  lstEditorColorsTemp.Assign(Main.EditorColors);
+  Options := Main.EditorOptions;
+
+  if eoAutoIndent in Options then
+    chkAutoIndent.Checked := True
+  else
+    chkAutoIndent.Checked := False;
+
+  if eoGroupUndo in Options then
+    chkGroupUndo.Checked := True
+  else
+    chkGroupUndo.Checked := False;
+
+  if eoTabIndent in Options then
+    chkTabIndent.Checked := True
+  else
+    chkTabIndent.Checked := False;
+
+  if eoSmartTabs in Options then
+    chkSmartTab.Checked := True
+  else
+    chkSmartTab.Checked := False;
+
+  if eoRightMouseMovesCursor in Options then
+    chkRightMouseMovesCursor.Checked := True
+  else
+    chkRightMouseMovesCursor.Checked := False;
+
+  if eoEnhanceHomeKey in Options then
+    chkEHomeKey.Checked := True
+  else
+    chkEHomeKey.Checked := False;
+
+  if eoTabsToSpaces in Options then
+    chkTabsToSpaces.Checked := True
+  else
+    chkTabsToSpaces.Checked := False;
+
+  if eoHideShowScrollbars in Options then
+    chkHideScrollBars.Checked := True
+  else
+    chkHideScrollBars.Checked := False;
+
+  if eoScrollPastEof in Options then
+    chkScrollPastEOF.Checked := True
+  else
+    chkScrollPastEOF.Checked := False;
+
+  if eoScrollPastEol in Options then
+    chkScrollPastEOL.Checked := True
+  else
+    chkScrollPastEOL.Checked := False;
+
+  if eoKeepCaretX in Options then
+    chkKeepCaretX.Checked := True
+  else
+    chkKeepCaretX.Checked := False;
+
+  if eoTrimTrailingSpaces in Options then
+    chkTrailBlanks.Checked := True
+  else
+    chkTrailBlanks.Checked := False;
+
+  chkFileAssociate.Checked := AssociateFiles;
+  chkSaveProjectsInc.Checked := SaveProjectsInc;
+  chkSaveUnitsInc.Checked := SaveUnitsInc;
+
+  txtUndoLimit.Text := IntToStr(Main.UndoLimit);
+  txtTabWidth.Text := IntToStr(Main.TabWidth);
+  chkShowGutter.Checked := Main.ShowGutter;
+  chkShowLineNumbers.Checked := Main.ShowLineNumbers;
+  chkLeadingZeros.Checked := Main.LeadingZeros;
+  txtGutterWidth.Text := IntToStr(Main.GutterWidth);
+  cboGutterColor.Selected := StringToColor(Main.GutterColor);
+  cboFonts.ItemIndex := cboFonts.Items.IndexOf(Main.FontName);
+  cboFontSize.ItemIndex := cboFontSize.Items.IndexOf(IntToStr(Main.FontSize));
+
+  lstElement.Items.Clear;
+  lstElement.Items.AddObject('Background', lstEditorColorsTemp.Items[0]);
+  lstElement.Items.AddObject('Comment', lstEditorColorsTemp.Items[1]);
+  lstElement.Items.AddObject('Error Line', lstEditorColorsTemp.Items[2]);
+  lstElement.Items.AddObject('Execution Line', lstEditorColorsTemp.Items[3]);
+  lstElement.Items.AddObject('Identifier', lstEditorColorsTemp.Items[4]);
+  lstElement.Items.AddObject('Numbers', lstEditorColorsTemp.Items[5]);
+  lstElement.Items.AddObject('Reserved Words', lstEditorColorsTemp.Items[6]);
+  lstElement.Items.AddObject('Selection', lstEditorColorsTemp.Items[7]);
+  lstElement.Items.AddObject('Strings', lstEditorColorsTemp.Items[8]);
+  lstElement.Items.AddObject('Valid Breakpoint', lstEditorColorsTemp.Items[9]);
+
+  frmMain.ApplyValuesToEditor(synSample, lstEditorColorsTemp);
+  lstElement.ItemIndex := 0;
+  lstElementClick(lstElement);
+
+  // Hide notification
+  NotifyRestart(False);
+end;
+
+procedure TfrmEditorSettings.FormDestroy(Sender: TObject);
+begin
+  lstEditorColorsTemp.Free;
+  pTempUnit.Free;
+end;
+
+procedure TfrmEditorSettings.NotifyRestart(Notify: Boolean);
+begin
+  lblNotify.Visible := Notify;
+  imgNotify.Visible := Notify;
+end;
+
+procedure TfrmEditorSettings.chkFileAssociateClick(Sender: TObject);
+begin
+  if chkFileAssociate.Checked <> AssociateFiles then
+    NotifyRestart(True)
+  else
+    NotifyRestart(False);
+end;
+
+end.

+ 85 - 0
LuaEdit/ErrorLookup.dfm

@@ -0,0 +1,85 @@
+object frmErrorLookup: TfrmErrorLookup
+  Left = 471
+  Top = 363
+  Width = 318
+  Height = 221
+  Caption = 'Error Lookup'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  FormStyle = fsStayOnTop
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 119
+    Width = 310
+    Height = 68
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    DesignSize = (
+      310
+      68)
+    object txtErrorLookup: TEdit
+      Left = 8
+      Top = 10
+      Width = 295
+      Height = 21
+      Anchors = [akLeft, akTop, akRight]
+      AutoSelect = False
+      TabOrder = 0
+      OnKeyPress = txtErrorLookupKeyPress
+    end
+    object btnLookUp: TButton
+      Left = 148
+      Top = 37
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = 'Lookup'
+      Default = True
+      TabOrder = 1
+      OnClick = btnLookUpClick
+    end
+    object btnClose: TButton
+      Left = 228
+      Top = 37
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Cancel = True
+      Caption = '&Close'
+      ModalResult = 1
+      TabOrder = 2
+      OnClick = btnCloseClick
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 0
+    Width = 310
+    Height = 119
+    Align = alClient
+    BevelOuter = bvNone
+    BorderWidth = 8
+    TabOrder = 1
+    object memoErrorLookup: TMemo
+      Left = 8
+      Top = 8
+      Width = 294
+      Height = 103
+      Align = alClient
+      Color = clBtnFace
+      ReadOnly = True
+      ScrollBars = ssVertical
+      TabOrder = 0
+    end
+  end
+end

+ 67 - 0
LuaEdit/ErrorLookup.pas

@@ -0,0 +1,67 @@
+unit ErrorLookup;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ExtCtrls;
+
+type
+  TfrmErrorLookup = class(TForm)
+    Panel1: TPanel;
+    txtErrorLookup: TEdit;
+    btnLookUp: TButton;
+    btnClose: TButton;
+    Panel2: TPanel;
+    memoErrorLookup: TMemo;
+    procedure FormShow(Sender: TObject);
+    procedure btnLookUpClick(Sender: TObject);
+    procedure txtErrorLookupKeyPress(Sender: TObject; var Key: Char);
+    procedure btnCloseClick(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmErrorLookup: TfrmErrorLookup;
+
+implementation
+
+uses Math;
+
+{$R *.dfm}
+
+procedure TfrmErrorLookup.FormShow(Sender: TObject);
+begin
+  memoErrorLookup.Lines.Clear;
+  txtErrorLookup.Text := '';
+end;
+
+procedure TfrmErrorLookup.btnLookUpClick(Sender: TObject);
+begin
+  try
+    memoErrorLookup.Lines.Clear;
+    if SysErrorMessage(StrToInt(txtErrorLookup.Text)) <> '' then
+      memoErrorLookup.Text := SysErrorMessage(StrToInt(txtErrorLookup.Text))
+    else
+      Application.MessageBox('The specified message number does not represent a Windows NT message.', 'LuaEdit', MB_OK+MB_ICONERROR);
+  except
+    Application.MessageBox(PChar('The expression "'+txtErrorLookup.Text+'" is not numeric.'), 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtErrorLookup.SetFocus;
+  end;
+end;
+
+procedure TfrmErrorLookup.txtErrorLookupKeyPress(Sender: TObject; var Key: Char);
+begin
+  if not (Key in ['0'..'9', #8]) then
+    Key := #0;
+end;
+
+procedure TfrmErrorLookup.btnCloseClick(Sender: TObject);
+begin
+  Self.Close;
+end;
+
+end.

+ 87 - 0
LuaEdit/ExSaveExit.dfm

@@ -0,0 +1,87 @@
+object frmExSaveExit: TfrmExSaveExit
+  Left = 404
+  Top = 227
+  Width = 350
+  Height = 300
+  Caption = 'Save Changes?'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 227
+    Width = 342
+    Height = 39
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    DesignSize = (
+      342
+      39)
+    object Button1: TButton
+      Left = 260
+      Top = 8
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&Cancel'
+      ModalResult = 2
+      TabOrder = 0
+    end
+    object Button2: TButton
+      Left = 180
+      Top = 8
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&No'
+      ModalResult = 7
+      TabOrder = 1
+    end
+    object btnYes: TButton
+      Left = 100
+      Top = 8
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&Yes'
+      ModalResult = 6
+      TabOrder = 2
+    end
+  end
+  object Panel3: TPanel
+    Left = 0
+    Top = 0
+    Width = 342
+    Height = 41
+    Align = alTop
+    BevelOuter = bvNone
+    TabOrder = 1
+    object Label1: TLabel
+      Left = 11
+      Top = 16
+      Width = 157
+      Height = 13
+      Caption = 'Save Changes to Selected Files?'
+    end
+  end
+  object lstFiles: TJvDotNetListBox
+    Left = 0
+    Top = 41
+    Width = 342
+    Height = 186
+    Align = alClient
+    ItemHeight = 13
+    Background.FillMode = bfmTile
+    Background.Visible = False
+    MultiSelect = True
+    TabOrder = 2
+  end
+end

+ 31 - 0
LuaEdit/ExSaveExit.pas

@@ -0,0 +1,31 @@
+unit ExSaveExit;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, JvExStdCtrls, JvListBox, JvDotNetControls, ExtCtrls;
+
+type
+  TfrmExSaveExit = class(TForm)
+    Panel1: TPanel;
+    Button1: TButton;
+    Button2: TButton;
+    Panel3: TPanel;
+    Label1: TLabel;
+    btnYes: TButton;
+    lstFiles: TJvDotNetListBox;
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmExSaveExit: TfrmExSaveExit;
+
+implementation
+
+{$R *.dfm}
+
+end.

+ 28 - 0
LuaEdit/FunctionList.dfm

@@ -0,0 +1,28 @@
+object frmFunctionList: TfrmFunctionList
+  Left = 610
+  Top = 292
+  BorderStyle = bsDialog
+  Caption = 'Function List'
+  ClientHeight = 485
+  ClientWidth = 202
+  Color = clBtnFace
+  DragKind = dkDock
+  DragMode = dmAutomatic
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  PixelsPerInch = 96
+  TextHeight = 13
+  object lstFunctions: TListBox
+    Left = 0
+    Top = 0
+    Width = 202
+    Height = 485
+    Align = alClient
+    ItemHeight = 13
+    TabOrder = 0
+  end
+end

+ 35 - 0
LuaEdit/FunctionList.pas

@@ -0,0 +1,35 @@
+unit FunctionList;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls;
+
+type
+  TfrmFunctionList = class(TForm)
+    lstFunctions: TListBox;
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+    procedure RefreshList(sFileName: String);
+  end;
+
+var
+  frmFunctionList: TfrmFunctionList;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmFunctionList.RefreshList(sFileName: String);
+var
+  CTagAppPath: String;
+  CTagParams: String;
+begin
+  CTagAppPath := ExtractFilePath(Application.ExeName) + '\ctags.exe';
+  CTagParams := '--languages=+Lua --langmap=.lua';
+end;
+
+end.

+ 57 - 0
LuaEdit/GoToLine.dfm

@@ -0,0 +1,57 @@
+object frmGotoLine: TfrmGotoLine
+  Left = 249
+  Top = 113
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsSingle
+  Caption = 'Go to Line'
+  ClientHeight = 89
+  ClientWidth = 273
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poOwnerFormCenter
+  OnCreate = FormCreate
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Label1: TLabel
+    Left = 16
+    Top = 8
+    Width = 63
+    Height = 13
+    Caption = 'Line Number:'
+  end
+  object txtLineNumber: TEdit
+    Left = 16
+    Top = 24
+    Width = 249
+    Height = 21
+    MaxLength = 10
+    TabOrder = 0
+    OnKeyPress = txtLineNumberKeyPress
+  end
+  object btnOK: TButton
+    Left = 112
+    Top = 56
+    Width = 75
+    Height = 25
+    Caption = 'OK'
+    Default = True
+    ModalResult = 1
+    TabOrder = 1
+    OnClick = btnOKClick
+  end
+  object btnCancel: TButton
+    Left = 192
+    Top = 56
+    Width = 75
+    Height = 25
+    Cancel = True
+    Caption = 'Cancel'
+    ModalResult = 2
+    TabOrder = 2
+  end
+end

+ 56 - 0
LuaEdit/GoToLine.pas

@@ -0,0 +1,56 @@
+unit GoToLine;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls;
+
+type
+  TfrmGotoLine = class(TForm)
+    Label1: TLabel;
+    txtLineNumber: TEdit;
+    btnOK: TButton;
+    btnCancel: TButton;
+    procedure btnOKClick(Sender: TObject);
+    procedure txtLineNumberKeyPress(Sender: TObject; var Key: Char);
+    procedure FormCreate(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+    LineNumber: Integer;
+  end;
+
+var
+  frmGotoLine: TfrmGotoLine;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmGotoLine.btnOKClick(Sender: TObject);
+begin
+  if txtLineNumber.Text <> '' then
+  begin
+    LineNumber := StrToInt(txtLineNumber.Text);
+  end
+  else
+  begin
+    ModalResult := mrNone;
+    Application.MessageBox('Please enter a line number.', 'LuaEdit', MB_OK+MB_ICONERROR);
+  end;
+end;
+
+procedure TfrmGotoLine.txtLineNumberKeyPress(Sender: TObject; var Key: Char);
+begin
+  if ((not (Ord(Key) in [48..57])) and (not (Ord(Key) = 8))) then
+    Key := Char(0);
+end;
+
+procedure TfrmGotoLine.FormCreate(Sender: TObject);
+begin
+  txtLineNumber.Text := '';
+end;
+
+end.

BIN
LuaEdit/Graphics/DotNet_Style/AddBreakpoint.bmp


+ 108 - 0
LuaEdit/Graphics/DotNet_Style/AddBreakpoint.~dfm

@@ -0,0 +1,108 @@
+object frmAddBreakpoint: TfrmAddBreakpoint
+  Left = 374
+  Top = 249
+  BorderStyle = bsDialog
+  Caption = 'Add Breakpoint'
+  ClientHeight = 201
+  ClientWidth = 369
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 160
+    Width = 369
+    Height = 41
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    DesignSize = (
+      369
+      41)
+    object Button1: TButton
+      Left = 288
+      Top = 10
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Cancel = True
+      Caption = '&Cancel'
+      ModalResult = 2
+      TabOrder = 0
+    end
+    object Button2: TButton
+      Left = 208
+      Top = 10
+      Width = 75
+      Height = 25
+      Anchors = [akRight, akBottom]
+      Caption = '&OK'
+      Default = True
+      ModalResult = 1
+      TabOrder = 1
+      OnClick = Button2Click
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 0
+    Width = 369
+    Height = 160
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 1
+    object Label1: TLabel
+      Left = 16
+      Top = 16
+      Width = 22
+      Height = 13
+      Caption = 'Unit:'
+    end
+    object Label2: TLabel
+      Left = 16
+      Top = 64
+      Width = 47
+      Height = 13
+      Caption = 'Condition:'
+    end
+    object Label3: TLabel
+      Left = 16
+      Top = 112
+      Width = 23
+      Height = 13
+      Caption = 'Line:'
+    end
+    object cboUnits: TComboBox
+      Left = 16
+      Top = 32
+      Width = 337
+      Height = 21
+      Style = csDropDownList
+      ItemHeight = 13
+      TabOrder = 0
+    end
+    object txtCondition: TEdit
+      Left = 16
+      Top = 80
+      Width = 337
+      Height = 21
+      TabOrder = 1
+    end
+    object txtLine: TEdit
+      Left = 16
+      Top = 128
+      Width = 89
+      Height = 21
+      MaxLength = 6
+      TabOrder = 2
+      OnKeyPress = txtLineKeyPress
+    end
+  end
+end

+ 125 - 0
LuaEdit/Graphics/DotNet_Style/AddBreakpoint.~pas

@@ -0,0 +1,125 @@
+unit AddBreakpoint;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ExtCtrls, lua, lualib, lauxlib, LuaUtils;
+
+type
+  TfrmAddBreakpoint = class(TForm)
+    Panel1: TPanel;
+    Panel2: TPanel;
+    Button1: TButton;
+    Button2: TButton;
+    Label1: TLabel;
+    cboUnits: TComboBox;
+    Label2: TLabel;
+    txtCondition: TEdit;
+    Label3: TLabel;
+    txtLine: TEdit;
+    procedure txtLineKeyPress(Sender: TObject; var Key: Char);
+    procedure Button2Click(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmAddBreakpoint: TfrmAddBreakpoint;
+
+implementation
+
+uses Main, Breakpoints;
+
+{$R *.dfm}
+
+procedure TfrmAddBreakpoint.txtLineKeyPress(Sender: TObject; var Key: Char);
+begin
+  if ((not (Ord(Key) in [48..57])) and (not (Ord(Key) = 8))) then
+    Key := Char(0);
+end;
+
+procedure TfrmAddBreakpoint.Button2Click(Sender: TObject);
+var
+  ReturnMsg: String;
+  L: PLua_State;
+  pBreakpoint: TBreakpoint;
+begin
+  ModalResult := mrNone;
+
+  if TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).pDebugInfos.GetBreakpointAtLine(StrToInt(txtLine.Text)) <> nil then
+  begin
+    Application.MessageBox(PChar('There is already a breakpoint set at line number '+txtLine.Text+'!'), 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtLine.SetFocus;
+    Exit;
+  end;
+
+  if txtCondition.Text <> '' then
+  begin
+    L := lua_open;
+
+    // test the given expression
+    if luaL_loadbuffer(L, PChar('return ('+txtCondition.Text+')'), Length('return ('+txtCondition.Text+')'), 'Main') <> 0 then
+    begin
+      ReturnMsg := lua_tostring(L, 1);
+      ReturnMsg := Copy(ReturnMsg, Pos(':', ReturnMsg) + 1, Length(ReturnMsg) - Pos(':', ReturnMsg));
+      ReturnMsg := Copy(ReturnMsg, Pos(':', ReturnMsg) + 1, Length(ReturnMsg) - Pos(':', ReturnMsg));
+      Application.MessageBox(PChar('The expression "'+txtCondition.Text+'" is not a valid expression: '#13#10#13#10#13#10+ReturnMsg), 'LuaEdit', MB_OK+MB_ICONERROR);
+      txtCondition.SetFocus;
+      Exit;
+    end;
+
+    lua_close(L);
+  end;
+
+  if txtLine.Text = '' then
+  begin
+    Application.MessageBox('You must specify a line number where to insert the breakpoint!', 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtLine.SetFocus;
+    Exit;
+  end
+  else if (StrToInt(txtLine.Text) > TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).synUnit.Lines.Count) or (StrToInt(txtLine.Text) < 1) then
+  begin
+    Application.MessageBox(PChar('The line number must stands between 1 and '+IntToStr(TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).synUnit.Lines.Count)+' for the unit "'+TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).sName+'"'), 'LuaEdit', MB_OK+MB_ICONERROR);
+    txtLine.SetFocus;
+    Exit;
+  end;
+
+  if cboUnits.Text = '' then
+  begin
+    Application.MessageBox('You must select a unit where to insert the breakpoint!', 'LuaEdit', MB_OK+MB_ICONERROR);
+    cboUnits.SetFocus;
+    Exit;
+  end;
+
+  pBreakpoint := TBreakpoint.Create;
+  pBreakpoint.sCondition := txtCondition.Text;
+  pBreakpoint.iLine := StrToInt(txtLine.Text);
+  TLuaUnit(cboUnits.Items.Objects[cboUnits.ItemIndex]).pDebugInfos.lstBreakpoint.Add(pBreakpoint);
+  frmBreakpoints.RefreshBreakpointList;
+
+  if Assigned(pCurrentSynEdit) then
+    pCurrentSynEdit.Refresh;
+    
+  ModalResult := mrOk;
+end;
+
+procedure TfrmAddBreakpoint.FormShow(Sender: TObject);
+var
+  x: Integer;
+begin
+  cboUnits.Items.Clear;
+
+  for x := 0 to LuaOpenedUnits.Count - 1 do
+  begin
+    cboUnits.AddItem(TLuaUnit(LuaOpenedUnits.Items[x]).sName, LuaOpenedUnits.Items[x]);
+  end;
+
+  txtCondition.Text := '';
+  txtLine.Text := '';
+end;
+
+end.

BIN
LuaEdit/Graphics/DotNet_Style/AddFile.bmp


BIN
LuaEdit/Graphics/DotNet_Style/AddToWatch.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Break.bmp


BIN
LuaEdit/Graphics/DotNet_Style/BreakOnBreakpoint.bmp


BIN
LuaEdit/Graphics/DotNet_Style/BreakOnEmptyBreakpoint.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Breakpoint.bmp


BIN
LuaEdit/Graphics/DotNet_Style/BreakpointCondition.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Breakpoints.bmp


BIN
LuaEdit/Graphics/DotNet_Style/CONNECT2.ICO


BIN
LuaEdit/Graphics/DotNet_Style/CallStack.bmp


BIN
LuaEdit/Graphics/DotNet_Style/CheckSyntax.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Comment.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Copy.bmp


BIN
LuaEdit/Graphics/DotNet_Style/CurrentStack.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Cut.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Delete.bmp


BIN
LuaEdit/Graphics/DotNet_Style/DisableAllBreakpoints.bmp


BIN
LuaEdit/Graphics/DotNet_Style/EmptyBreakpoint.bmp


BIN
LuaEdit/Graphics/DotNet_Style/EnableAllBreakpoints.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Find.ico


BIN
LuaEdit/Graphics/DotNet_Style/FindAgain.bmp


BIN
LuaEdit/Graphics/DotNet_Style/FindInFiles.bmp


BIN
LuaEdit/Graphics/DotNet_Style/GoToLine.bmp


BIN
LuaEdit/Graphics/DotNet_Style/GoToLine.ico


BIN
LuaEdit/Graphics/DotNet_Style/Help.bmp


BIN
LuaEdit/Graphics/DotNet_Style/HelpBook.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Indent.bmp


BIN
LuaEdit/Graphics/DotNet_Style/LuaEditLogo.ico


BIN
LuaEdit/Graphics/DotNet_Style/LuaGlobals.bmp


BIN
LuaEdit/Graphics/DotNet_Style/LuaLocals.bmp


BIN
LuaEdit/Graphics/DotNet_Style/LuaOutput.bmp


BIN
LuaEdit/Graphics/DotNet_Style/LuaStack.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Messages.bmp


BIN
LuaEdit/Graphics/DotNet_Style/New.bmp


BIN
LuaEdit/Graphics/DotNet_Style/NewBreakpoint.bmp


BIN
LuaEdit/Graphics/DotNet_Style/NewProject.bmp


BIN
LuaEdit/Graphics/DotNet_Style/NewUnit.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Open.bmp


BIN
LuaEdit/Graphics/DotNet_Style/OpenProject.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Output.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Paste.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Pause.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Play.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Print.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Project.bmp


BIN
LuaEdit/Graphics/DotNet_Style/ProjectSettings.bmp


BIN
LuaEdit/Graphics/DotNet_Style/ProjectTree.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Redo.bmp


BIN
LuaEdit/Graphics/DotNet_Style/RemoveAllBreakpoints.bmp


BIN
LuaEdit/Graphics/DotNet_Style/RemoveFile.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Restart.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Rings.bmp


BIN
LuaEdit/Graphics/DotNet_Style/RunToCursor.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Save.bmp


BIN
LuaEdit/Graphics/DotNet_Style/SaveAll.bmp


BIN
LuaEdit/Graphics/DotNet_Style/SaveAs.bmp


BIN
LuaEdit/Graphics/DotNet_Style/SaveProjectAs.bmp


BIN
LuaEdit/Graphics/DotNet_Style/Search.bmp


Some files were not shown because too many files changed in this diff