home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Runimage / Delphi50 / Source / Toolsapi / TOOLSAPI.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-11  |  113.8 KB  |  2,458 lines

  1. {*******************************************************}
  2. {                                                       }
  3. {       Borland Delphi Visual Component Library         }
  4. {                                                       }
  5. {       Copyright (c) 1995,99 Inprise Corporation       }
  6. {                                                       }
  7. {*******************************************************}
  8.  
  9. unit ToolsAPI;
  10.  
  11. interface
  12.  
  13. uses Windows, SysUtils, Classes, ActiveX, TypInfo, DsgnIntf, Menus, ActnList,
  14.   Graphics, ImgList, Forms, ComCtrls;
  15.  
  16.  
  17. (*$HPPEMIT 'DEFINE_GUID(IID_IBorlandIDEServices,0x7FD1CE92,0xE053,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  18. (*$HPPEMIT 'DEFINE_GUID(IID_INTAComponent,0x34B2E2D1,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  19. (*$HPPEMIT 'DEFINE_GUID(IID_INTACustomDrawMessage,0x589BBDA2,0xF995,0x11D1,0xAB,0x27,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  20. (*$HPPEMIT 'DEFINE_GUID(IID_INTACustomMessage,0xB7523AB7,0xEB81,0x11D2,0xAC,0x7B,0x00,0xC0,0x4F,0xB1,0x73,0xDC);'*)
  21. (*$HPPEMIT 'DEFINE_GUID(IID_INTACustomMessage40,0x589BBDA1,0xF995,0x11D1,0xAB,0x27,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  22. (*$HPPEMIT 'DEFINE_GUID(IID_INTAFormEditor,0x34B2E2CF,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  23. (*$HPPEMIT 'DEFINE_GUID(IID_INTAServices,0xC17B3DF1,0xDFE5,0x11D2,0xA8,0xC7,0x00,0xC0,0x4F,0xA3,0x2F,0x53);'*)
  24. (*$HPPEMIT 'DEFINE_GUID(IID_INTAServices40,0x3C7F3267,0xF0BF,0x11D1,0xAB,0x1E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  25. (*$HPPEMIT 'DEFINE_GUID(IID_INTAToDoItem,0x094003D8,0xE7AA,0x11D2,0xAA,0x99,0x00,0xC0,0x4F,0xA3,0x5C,0xE8);'*)
  26. (*$HPPEMIT 'DEFINE_GUID(IID_INTAUnknown,0x8CC6430B,0xE721,0x11D2,0xA8,0xCC,0x00,0xC0,0x4F,0xA3,0x2F,0x53);'*)
  27. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAActionServices,0xF17A7BC9,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  28. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAAddressBreakpoint,0x09063878,0xE43A,0x11D1,0xAB,0x0F,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  29. (*$HPPEMIT 'DEFINE_GUID(IID_IOTABreakpoint,0x569EFCFB,0xC69B,0x11D2,0xAC,0x67,0x00,0xC0,0x4F,0xB1,0x73,0xDC);'*)
  30. (*$HPPEMIT 'DEFINE_GUID(IID_IOTABreakpoint40,0x34B2E2D4,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  31. (*$HPPEMIT 'DEFINE_GUID(IID_IOTABreakpointNotifier,0x34B2E2D5,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  32. (*$HPPEMIT 'DEFINE_GUID(IID_IOTABufferOptions,0x8C748540,0xC6C1,0x11D2,0x81,0x39,0x00,0x60,0x97,0x92,0xF1,0x34);'*)
  33. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAComponent,0x34B2E2D0,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  34. (*$HPPEMIT 'DEFINE_GUID(IID_IOTACreator,0x6EDB9B9E,0xF57A,0x11D1,0xAB,0x23,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  35. (*$HPPEMIT 'DEFINE_GUID(IID_IOTADebuggerNotifier,0x34B2E2D8,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  36. (*$HPPEMIT 'DEFINE_GUID(IID_IOTADebuggerServices,0x0E3B9D7A,0xE119,0x11D1,0xAB,0x0C,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  37. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditActions,0xECB23623,0xE2D8,0x11D2,0xAB,0xE5,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  38. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditBlock,0x9C510463,0xC7BC,0x11D2,0x9A,0xEB,0x00,0xA0,0x24,0x57,0x62,0x1F);'*)
  39. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditBuffer,0x9C510460,0xC7BC,0x11D2,0x9A,0xEB,0x00,0xA0,0x24,0x57,0x62,0x1F);'*)
  40. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditBufferIterator,0x8ECB33AA,0xD0BD,0x11D2,0xAB,0xD6,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  41. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditLineNotifier,0xD9D48F50,0xE6CC,0x11D2,0xAB,0xE8,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  42. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditLineTracker,0xD9D48F4F,0xE6CC,0x11D2,0xAB,0xE8,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  43. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditOptions,0x487BEA91,0xDBC0,0x11D2,0xAB,0xDE,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  44. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditor,0xF17A7BD0,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  45. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditorNotifier,0x0E3B9D7B,0xE119,0x11D1,0xAB,0x0C,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  46. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditorServices,0xC2812BA7,0xC48D,0x11D2,0x9A,0xE8,0x00,0xA0,0x24,0x57,0x62,0x1F);'*)
  47. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditPosition,0x9C510464,0xC7BC,0x11D2,0x9A,0xEB,0x00,0xA0,0x24,0x57,0x62,0x1F);'*)
  48. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditReader,0x26EB0E4F,0xF97B,0x11D1,0xAB,0x27,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  49. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditView,0x9C510462,0xC7BC,0x11D2,0x9A,0xEB,0x00,0xA0,0x24,0x57,0x62,0x1F);'*)
  50. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditView40,0x0E3B9D78,0xE119,0x11D1,0xAB,0x0C,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  51. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEditWriter,0x26EB0E50,0xF97B,0x11D1,0xAB,0x27,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  52. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAEnvironmentOptions,0x9C0E91FB,0xFA5A,0x11D1,0xAB,0x28,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  53. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAFile,0x6E2AD9B0,0xF7F0,0x11D1,0xAB,0x26,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  54. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAFileSystem,0xA9D1389D,0xF4B0,0x11D1,0xAB,0x22,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  55. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAFormEditor,0xF17A7BD2,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  56. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAFormNotifier,0x0E3B9D7C,0xE119,0x11D1,0xAB,0x0C,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  57. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAFormWizard,0x36C8BF35,0xEFFE,0x11D1,0xAB,0x1D,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  58. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAIDENotifier,0xE052204F,0xECE9,0x11D1,0xAB,0x19,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  59. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAIDENotifier50,0xAC7D29F1,0xD9A9,0x11D2,0xA8,0xC1,0x00,0xC0,0x4F,0xA3,0x2F,0x53);'*)
  60. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAKeyBindingServices,0xF8CAF8D8,0xD263,0x11D2,0xAB,0xD8,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  61. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAKeyboardBinding,0xF8CAF8D7,0xD263,0x11D2,0xAB,0xD8,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  62. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAKeyboardServices,0xF8CAF8D5,0xD263,0x11D2,0xAB,0xD8,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  63. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAKeyboardDiagnostics,0xAEFC65F1,0x2504,0x11D3,0xAC,0x25,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  64. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAKeyContext,0x3E7790CB,0xD2BB,0x11D2,0xAB,0xD8,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  65. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAMenuWizard,0xB75C0CE2,0xEEA6,0x11D1,0x95,0x04,0x00,0x60,0x8C,0xCB,0xF1,0x53);'*)
  66. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAMessageServices,0x3263774B,0xE959,0x11D2,0xAC,0x7B,0x00,0xC0,0x4F,0xB1,0x73,0xDC);'*)
  67. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAMessageServices40,0x26EB0E4E,0xF97B,0x11D1,0xAB,0x27,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  68. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAModule,0xF17A7BCC,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  69. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAModuleCreator,0x6EDB9B9A,0xF57A,0x11D1,0xAB,0x23,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  70. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAModuleInfo,0xF17A7BD6,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  71. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAModuleNotifier,0xF17A7BCE,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  72. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAModuleServices,0xF17A7BCD,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  73. (*$HPPEMIT 'DEFINE_GUID(IID_IOTANotifier,0xF17A7BCF,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  74. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAOptions,0x9C0E91FC,0xFA5A,0x11D1,0xAB,0x28,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  75. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAPackageServices,0x26EB0E4D,0xF97B,0x11D1,0xAB,0x27,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  76. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProcess,0x34B2E2D2,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  77. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProcessModNotifier,0x0906387A,0xE43A,0x11D1,0xAB,0x0F,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  78. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProcessModule,0x09063879,0xE43A,0x11D1,0xAB,0x0F,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  79. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProcessNotifier,0x34B2E2D6,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  80. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProject,0xF17A7BCA,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  81. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectBuilder,0x08A5B1F5,0xFCDA,0x11D2,0xAC,0x82,0x00,0xC0,0x4F,0xB1,0x73,0xDC);'*)
  82. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectBuilder40,0xF17A7BD5,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  83. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectCreator,0x6EDB9B9D,0xF57A,0x11D1,0xAB,0x23,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  84. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectGroup,0xF17A7BCB,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  85. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectGroupCreator,0x6EDB9B9F,0xF57A,0x11D1,0xAB,0x23,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  86. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectOptions,0xF899EBC6,0xE6E2,0x11D2,0xAA,0x90,0x00,0xC0,0x4F,0xA3,0x70,0xE9);'*)
  87. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectOptions40,0xF17A7BD4,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  88. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectResource,0x26EB0E52,0xF97B,0x11D1,0xAB,0x27,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  89. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAProjectWizard,0x36C8BF36,0xEFFE,0x11D1,0xAB,0x1D,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  90. (*$HPPEMIT 'DEFINE_GUID(IID_IOTARecord,0xF8CAF8D6,0xD263,0x11D2,0xAB,0xD8,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  91. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAReplaceOptions,0xD1766F8C,0xD915,0x11D2,0xA8,0xC1,0x00,0xC0,0x4F,0xA3,0x2F,0x53);'*)
  92. (*$HPPEMIT 'DEFINE_GUID(IID_IOTARepositoryWizard,0xB75C0CE1,0xEEA6,0x11D1,0x95,0x04,0x00,0x60,0x8C,0xCB,0xF1,0x53);'*)
  93. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAResourceEntry,0x26EB0E51,0xF97B,0x11D1,0xAB,0x27,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  94. (*$HPPEMIT 'DEFINE_GUID(IID_IOTASearchOptions,0xD1766F8B,0xD915,0x11D2,0xA8,0xC1,0x00,0xC0,0x4F,0xA3,0x2F,0x53);'*)
  95. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAServices,0x7FD1CE91,0xE053,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  96. (*$HPPEMIT 'DEFINE_GUID(IID_IOTASourceBreakpoint,0x09063877,0xE43A,0x11D1,0xAB,0x0F,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  97. (*$HPPEMIT 'DEFINE_GUID(IID_IOTASourceEditor,0xF17A7BD1,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  98. (*$HPPEMIT 'DEFINE_GUID(IID_IOTASpeedSetting,0xB5CDCE07,0xE093,0x11D2,0xAB,0xE2,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  99. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAThread,0x34B2E2D3,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  100. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAThreadNotifier,0x34B2E2D7,0xE36F,0x11D1,0xAB,0x0E,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  101. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAToDoManager,0x3D4A0565,0xEB77,0x11D2,0xAA,0x9A,0x00,0xC0,0x4F,0xA3,0x5C,0xE8);'*)
  102. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAToDoServices,0xF8FC00EF,0xE61A,0x11D2,0xAA,0x99,0x00,0xC0,0x4F,0xA3,0x5C,0xE8);'*)
  103. (*$HPPEMIT 'DEFINE_GUID(IID_IOTATypeLibEditor,0xF17A7BD3,0xE07D,0x11D1,0xAB,0x0B,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  104. (*$HPPEMIT 'DEFINE_GUID(IID_IOTATypeLibModule,0x0BBAEEA0,0xEF74,0x11D1,0xAB,0x1C,0x00,0xC0,0x4F,0xB1,0x6F,0xB3);'*)
  105. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAWizard,0xB75C0CE0,0xEEA6,0x11D1,0x95,0x04,0x00,0x60,0x8C,0xCB,0xF1,0x53);'*)
  106. (*$HPPEMIT 'DEFINE_GUID(IID_IOTAWizardServices,0xB75C0CE3,0xEEA6,0x11D1,0x95,0x04,0x00,0x60,0x8C,0xCB,0xF1,0x53);'*)
  107.  
  108. { OTA Prefix - Open Tools API
  109.   Accessing these interfaces only requires that the user use the Borlndmm.dll via
  110.   sharemem. }
  111. { NTA Prefix - Native Tools API
  112.   Access these interfaces requires that the user compile requiring vclxx.bpl
  113.   since actual objects are passed among the interfaces. }
  114.  
  115. const
  116.   utForm          = 0;
  117.   utDataModule    = 1;
  118.   utProjUnit      = 2;
  119.   utUnit          = 3;
  120.   utRc            = 4;
  121.   utAsm           = 5;
  122.   utDef           = 6;
  123.   utObj           = 7;
  124.   utRes           = 8;
  125.   utLib           = 9;
  126.   utTypeLib       = 10;
  127.   utPackageImport = 11;
  128.   utFormResource  = 12;
  129.   utNoMake        = 13;
  130.  
  131.   atWhiteSpace     = 0;
  132.   atComment        = 1;
  133.   atReservedWord   = 2;
  134.   atIdentifier     = 3;
  135.   atSymbol         = 4;
  136.   atString         = 5;
  137.   atNumber         = 6;
  138.   atFloat          = 7; // not used in Pascal tokenizer
  139.   atOctal          = 8; // not used in Pascal tokenizer
  140.   atHex            = 9; // not used in Pascal tokenizer
  141.   atCharacter      = 10; // not used in Pascal tokenizer
  142.   atPreproc        = 11; // not used in Pascal tokenizer
  143.   atIllegal        = 12; // not used in Pascal tokenizer
  144.   atAssembler      = 13;
  145.   SyntaxOff        = 14;
  146.  
  147.   MarkedBlock      = 15;
  148.   SearchMatch      = 16;
  149.  
  150.   lfCurrentEIP          = $0001;
  151.   lfBreakpointEnabled   = $0002;
  152.   lfBreakpointDisabled  = $0004;
  153.   lfBreakpointInvalid   = $0008;
  154.   lfErrorLine           = $0010;
  155.   lfBreakpointVerified  = $0020;
  156.   lfBackgroundBkpt      = $0040; // Breakpoint only valid in a non-active process
  157.   lfBackgroupEIP        = $0080; // Execution point only valid in a non-active process
  158.  
  159.   // The following string constants are the internal names of editor macro
  160.   // "scripts" that get executed in response to certain menu commands.  This
  161.   // allows a menu command to execute the exact same internal "macro script"
  162.   // as the direct key binding.
  163.  
  164.   mcGetFindString = 'GetFindString';
  165.   mcReplace = 'Replace';
  166.   mcRepeatSearch = 'RepeatSearch';
  167.   mcIncrementalSearch = 'IncrementalSearch';
  168.   mcGotoLine = 'GotoLine';
  169.   mcClipCut = 'ClipCut';
  170.   mcClipCopy = 'ClipCopy';
  171.   mcClipPaste = 'ClipPaste';
  172.   mcClipClear = 'ClipClear';
  173.   mcHelpKeywordSearch = 'HelpKeywordSearch';
  174.   mcOpenFileAtCursor = 'OpenFileAtCursor';
  175.   mcToggleBreakpoint = 'ToggleBreakpoint';
  176.   mcRunToHere = 'RunToHere';
  177.   mcUndo = 'Undo';
  178.   mcRedo = 'Redo';
  179.   mcModify = 'Modify';
  180.   mcAddWatchAtCursor = 'AddWatchAtCursor';
  181.   mcInspectAtCursor = 'InspectAtCursor';
  182.   mcSetMark0 = 'SetMark0';
  183.   mcSetMark1 = 'SetMark1';
  184.   mcSetMark2 = 'SetMark2';
  185.   mcSetMark3 = 'SetMark3';
  186.   mcSetMark4 = 'SetMark4';
  187.   mcSetMark5 = 'SetMark5';
  188.   mcSetMark6 = 'SetMark6';
  189.   mcSetMark7 = 'SetMark7';
  190.   mcSetMark8 = 'SetMark8';
  191.   mcSetMark9 = 'SetMark9';
  192.   mcMoveToMark0 = 'MoveToMark0';
  193.   mcMoveToMark1 = 'MoveToMark1';
  194.   mcMoveToMark2 = 'MoveToMark2';
  195.   mcMoveToMark3 = 'MoveToMark3';
  196.   mcMoveToMark4 = 'MoveToMark4';
  197.   mcMoveToMark5 = 'MoveToMark5';
  198.   mcMoveToMark6 = 'MoveToMark6';
  199.   mcMoveToMark7 = 'MoveToMark7';
  200.   mcMoveToMark8 = 'MoveToMark8';
  201.   mcMoveToMark9 = 'MoveToMark9';
  202.  
  203.   // the following constant defines the name of the IDE's editor keymapping
  204.   // table.  This keyboard is *always* defined and should not be popped
  205.   // from the stack.
  206.  
  207.   sEditor = 'editor';
  208.  
  209.   WizardEntryPoint = 'INITWIZARD0001';
  210.   isWizards = 'Wizards';
  211.  
  212.   { IDE's Toolbar names }
  213.   sCustomToolBar = 'CustomToolBar';
  214.   sStandardToolBar = 'StandardToolBar';
  215.   sDebugToolBar = 'DebugToolBar';
  216.   sViewToolBar = 'ViewToolBar';
  217.   sDesktopToolBar = 'DesktopToolBar';
  218.  
  219.   { Default IDE application/project types }
  220.   sApplication = 'Application';
  221.   sLibrary = 'Library';
  222.   sConsole = 'Console';
  223.   sPackage = 'Package';
  224.  
  225.   { Default IDE Module/Unit types }
  226.   sUnit = 'Unit'; // Raw no form designer unit/C++ module and skeleton code
  227.   sForm = 'Form'; // Unit/C++ module with a form designer
  228.   sText = 'Text'; // Raw single file module with no skeleton code
  229.  
  230.   { TMoveCursorMasks }
  231.   { The move cursor mask can be built from one of the following
  232.     mmSkipWord       - Skip to the next alphanumeric character
  233.     mmSkipNonWord    - Skip to the next non-alphanumeric character
  234.     mmSkipWhite      - Skip to the next whitespace character (space, tab, newline)
  235.     mmSkipNonWhite   - Skip to the next non-whitespace character
  236.     mmSkipSpecial    - Skip to the next non-alphanumeric and non-whitespace character
  237.     mmSkipNonSpecial - Skip to the next alphanumeric or whitespace character
  238.  
  239.     The following can be combined with any of the above
  240.     mmSkipLeft       - Move to the left or toward the beginning of the file
  241.     mmSkipRight      - Move to the right or toward the end of the file
  242.  
  243.     The following can be combined with any of the above
  244.     mmSkipStream     - Ignore line ends when skipping.  When used with
  245.                        mmSkipWhite, and the cursor is at the beginning or end
  246.                        of a line, the cursor will continue to move until it
  247.                        reaches a non-white character, non-EOL character, BOF or
  248.                        EOF }
  249.   mmSkipWord       = $00;
  250.   mmSkipNonWord    = $01;
  251.   mmSkipWhite      = $02;
  252.   mmSkipNonWhite   = $03;
  253.   mmSkipSpecial    = $04;
  254.   mmSkipNonSpecial = $05;
  255.   mmSkipLeft       = $00;
  256.   mmSkipRight      = $10;
  257.   mmSkipStream     = $20;
  258.  
  259.   { TCodeCompleteStyle }
  260.   { The code completion syle can be built from one the following
  261.     csCodeList     - Invoke the IDE's CodeInsite Code completion function
  262.     csParamList    - Invoke the IDE's CodeInsite Code parameters function
  263.  
  264.     One of the above can be combined with the following
  265.     csManual       - This will cause the operation to be invoked immediately,
  266.                      otherwise the IDE will use the delay timer set through the
  267.                      Code Insight option before invoking the operation.
  268.   }
  269.  
  270.   csCodelist       = $01;
  271.   csParamList      = $02;
  272.   csManual         = $80;
  273.  
  274.   { TKeyBindingFlags }
  275.   { When assign a keybinding you may pass a combination of the following flags.
  276.       NOTE: This *only* affects the terminal key (the last in a multi-key
  277.             sequence).
  278.     kfImplicitShift    - if the keycode is alpha, assign both the upper and
  279.                          lower case versions.
  280.     kfImplicitModifier - <Ctrl+k><Ctrl+b> = <Ctrl+K><b>
  281.     kfImplicitKeypad   - When an assignment is made to a sequence with a
  282.                          numeric keypad (Keypad) equivalent, such as PageUp,
  283.                          a second assignment is implicitly made for the
  284.                          equivalent
  285.   }
  286.   kfImplicitShift = $01;
  287.   kfImplicitModifier = $02;
  288.   kfImplicitKeypad = $04;
  289.  
  290.   { TRipFlags }
  291.   { When calling RipText use these flags to control the most common character
  292.     sets to include is the text ripped from the editor.
  293.  
  294.     rfBackward               - Rip the text backward or toward the beginning of the file
  295.     rfInvertLegalChars       - Include in ripped text characters that are *not* in the set
  296.     rfIncludeUpperAlphaChars - Automatically include all the upper case alpha characters
  297.     rfIncludeLowerAlphaChars - Automatically include all the lower case alpha characters
  298.     rfIncludeAlphaChars      - Automatically include all the upper and lower case alpha characters
  299.     rfIncludeNumericChars    - Automatically include all the numeric characters
  300.     rfIncludeSpecialChars    - Automatically include all the special characters such as "()[]..."
  301.   }
  302.  
  303.   rfBackward               = $0100;
  304.   rfInvertLegalChars       = $1000;
  305.   rfIncludeUpperAlphaChars = $0001;
  306.   rfIncludeLowerAlphaChars = $0002;
  307.   rfIncludeAlphaChars      = $0003;
  308.   rfIncludeNumericChars    = $0004;
  309.   rfIncludeSpecialChars    = $0008;
  310.  
  311. type
  312.   {
  313.     cmOTAMake - Normal make
  314.     cmOTABuild - Builds all modules that have source.
  315.     cmOTACheck - Normal make without final link
  316.     cmOTAMakeUnit - Valid only on an IOTAModule and in C++Builder
  317.   }
  318.  
  319.   TOTACompileMode = (cmOTAMake, cmOTABuild, cmOTACheck, cmOTAMakeUnit);
  320.  
  321.   TOTAModuleType = type Integer;
  322.   TOTAHandle = Pointer;
  323.  
  324.   TOTAToDoPriority = 0..5;
  325.  
  326.   { Editor position expressed as column/line after tabs are expanded to spaces
  327.     and include the "virtual" editor space (columns beyond the end of lines) }
  328.   TOTAEditPos = packed record
  329.     Col: SmallInt; { Col is one-based }
  330.     Line: Longint; { Line is one-based }
  331.   end;
  332.  
  333.   { Editor position expressed as character index/line before tabs are expanded
  334.     and does not include the indecies beyond the end of a line }
  335.   TOTACharPos = packed record
  336.     CharIndex: SmallInt; { CharIndex is zero-based }
  337.     Line: Longint; { Line is one-based }
  338.   end;
  339.  
  340.   { Available option name expressed as a name and a type }
  341.   TOTAOptionName = record
  342.     Name: string;
  343.     Kind: TTypeKind;
  344.   end;
  345.  
  346.   { Dynamic array of option names }
  347.   TOTAOptionNameArray = array of TOTAOptionName;
  348.  
  349.   IOTAProject = interface;
  350.   IOTAModule = interface;
  351.   IOTANotifier = interface;
  352.   IOTAEditView = interface;
  353.   IOTAEditBuffer = interface;
  354.   IOTAFormEditor = interface;
  355.   IOTAComponent = interface;
  356.   IBorlandIDEServices = interface;
  357.   IOTAEditOptions = interface;
  358.   IOTAEditorServices = interface;
  359.   IOTAKeyboardServices = interface;
  360.   IOTAKeyContext = interface;
  361.   IOTAEditBlock = interface;
  362.  
  363.   { TBindingType - Indicates to the IDE how to manage this keybinding interface
  364.      btComplete  - This keybinding defines a complete keybinding for the editor.
  365.                    It is mutually exclusive of *all* other btComplete bindings.
  366.                    All pre-defined internal keymaps are btComplete.
  367.      btPartial   - This binding only implements a partial binding.  Many of
  368.                    these may be registered and enabled as the user selects.  The
  369.                    order of registration is determined by the user through the
  370.                    IDE in the Tools|Editor Options dialog, Key Mappings page.
  371.   }
  372.   TBindingType = (btComplete, btPartial);
  373.  
  374.   { TKeyBindingResult }
  375.   { krUnhandled - Return this if the key is not to be handled by this proc.
  376.                   Will execute the next handler assigned to this key.  This will
  377.                   also allow any menu shortcuts to execute if no other handers
  378.                   handle the key.
  379.     krHandled   - This proc handled the key and no further processing is
  380.                   required.  No menu shortcuts will be processed
  381.     krNextProc  - This proc handled the key but execute the next handler if one
  382.                   exists. No menu shortcuts will be processed }
  383.   TKeyBindingResult = (krUnhandled, krHandled, krNextProc);
  384.  
  385.   { Keybinding proc }
  386.   TKeyBindingProc = procedure (const Context: IOTAKeyContext; KeyCode: TShortcut;
  387.     var BindingResult: TKeyBindingResult) of object;
  388.  
  389.   TMoveCursorMasks = Byte;
  390.  
  391.   { TSearchDirection }
  392.   TSearchDirection = (sdForward, sdBackward);
  393.  
  394.   IOTANotifier = interface(IUnknown)
  395.     ['{F17A7BCF-E07D-11D1-AB0B-00C04FB16FB3}']
  396.     { This procedure is called immediately after the item is successfully saved.
  397.       This is not called for IOTAWizards }
  398.     procedure AfterSave;
  399.     { This function is called immediately before the item is saved. This is not
  400.       called for IOTAWizard }
  401.     procedure BeforeSave;
  402.     { The associated item is being destroyed so all references should be dropped.
  403.       Exceptions are ignored. }
  404.     procedure Destroyed;
  405.     { This associated item was modified in some way. This is not called for
  406.       IOTAWizards }
  407.     procedure Modified;
  408.   end;
  409.  
  410.   IOTAEditorNotifier = interface(IOTANotifier)
  411.     ['{0E3B9D7B-E119-11D1-AB0C-00C04FB16FB3}']
  412.     { Called when a new edit view is created(opInsert) or destroyed(opRemove) }
  413.     procedure ViewNotification(const View: IOTAEditView; Operation: TOperation);
  414.     { Called when a view is activated }
  415.     procedure ViewActivated(const View: IOTAEditView);
  416.   end;
  417.  
  418.   IOTAFormNotifier = interface(IOTANotifier)
  419.     ['{0E3B9D7C-E119-11D1-AB0C-00C04FB16FB3}']
  420.     { Called when the given form is activated }
  421.     procedure FormActivated;
  422.     { This is called immediately prior to the form being streamed out.  This
  423.       may be called without first getting a BeforeSave as in the case of
  424.       the project being compiled. }
  425.     procedure FormSaving;
  426.     { Called when a component on this form was renamed }
  427.     procedure ComponentRenamed(ComponentHandle: TOTAHandle;
  428.       const OldName, NewName: string);
  429.   end;
  430.  
  431.   IOTAEditor = interface(IUnknown)
  432.     ['{F17A7BD0-E07D-11D1-AB0B-00C04FB16FB3}']
  433.     { Call this to register an IOTANotifier. The result is the index to be
  434.       used when calling RemoveNotifier. If <0 then an error occured. }
  435.     function AddNotifier(const ANotifier: IOTANotifier): Integer;
  436.     { Returns the actual filename of this module editor. Rename through
  437.       IOTAModule}
  438.     function GetFileName: string;
  439.     { Returns the editor specific modified status }
  440.     function GetModified: Boolean;
  441.     { Returns the associated IOTAModule }
  442.     function GetModule: IOTAModule;
  443.     { Mark this editor modified.  The associated module will also be modified }
  444.     function MarkModified: Boolean;
  445.     { Call with the index obtained from AddNotifier }
  446.     procedure RemoveNotifier(Index: Integer);
  447.     { Show this editor.  If no views are active, at least one will be created }
  448.     procedure Show;
  449.  
  450.     property FileName: string read GetFileName;
  451.     property Modified: Boolean read GetModified;
  452.     property Module: IOTAModule read GetModule;
  453.   end;
  454.  
  455.   { Use the IOTAEditReader class to gain read access to an editor buffer:
  456.  
  457.     NOTES:
  458.       The buffer is accessed as a linear "file" with line breaks included.
  459.       This reader interface could be accessed through a custom read-only
  460.       TStream descendant.
  461.  
  462.     WARNING!!!
  463.      o A IOTAEditReader should never be active at the same time as an IOTAEditWriter.
  464.   }
  465.  
  466.   IOTAEditReader = interface(IUnknown)
  467.     ['{26EB0E4F-F97B-11D1-AB27-00C04FB16FB3}']
  468.     function GetText(Position: Longint; Buffer: PChar; Count: Longint): Longint;
  469.   end;
  470.  
  471.   { Use the IOTAEditWriter class to gain write access to an editor buffer:
  472.  
  473.     NOTES:
  474.      o As with the reader, the buffer is accessed as a linear "file" with
  475.        line breaks included.  The writer uses a "copy in place" metaphor for
  476.        modifying the editor buffer.  In other words, the writer can be thought
  477.        of as simply copying from one buffer to another.  All positions (Pos)
  478.        passed to the function are positions relative to the orginal file.  Due
  479.        to the "copy" metaphor of the writer it does not support moving backward
  480.        in the editor buffer. It is recomended that all modifications that must
  481.        be performed should be done from the start to the finish.
  482.      o After the TIEditWriter is freed(released), the undo-buffer of the editor
  483.        is flushed unless CreateUndoableWriter was called to obtain the
  484.        TIEditWriter.
  485.  
  486.     WARNING!!!
  487.      o A IOTAEditWriter should never be active at the same time as an IOTAEditReader.
  488.   }
  489.  
  490.   IOTAEditWriter = interface(IUnknown)
  491.     ['{26EB0E50-F97B-11D1-AB27-00C04FB16FB3}']
  492.     procedure CopyTo(Pos: Longint);
  493.     procedure DeleteTo(Pos: Longint);
  494.     procedure Insert(Text: PChar);
  495.     function Position: Longint;
  496.     function GetCurrentPos: TOTACharPos;
  497.  
  498.     property CurrentPos: TOTACharPos read GetCurrentPos;
  499.   end;
  500.  
  501.   TOTASyntaxHighlighter = (shNone, shQuery, shPascal, shC, shSQL, shIDL);
  502.   TOTABlockType = (btInclusive, btLine, btColumn, btNonInclusive, btUnknown);
  503.  
  504.   IOTAEditView40 = interface(IUnknown)
  505.     ['{0E3B9D78-E119-11D1-AB0C-00C04FB16FB3}']
  506.     { Return the Current cursor position }
  507.     function GetCursorPos: TOTAEditPos;
  508.     { Set the current Cursor position }
  509.     procedure SetCursorPos(const Value: TOTAEditPos);
  510.     { Return the Current top visible position }
  511.     function GetTopPos: TOTAEditPos;
  512.     { Set the current top visible position }
  513.     procedure SetTopPos(const Value: TOTAEditPos);
  514.     { Get size of the visible portion of the view in character cells }
  515.     function GetViewSize: TSize;
  516.     { Converts a linear buffer offset position to a CharPos }
  517.     function PosToCharPos(Pos: Longint): TOTACharPos;
  518.     { Convert a CharPos to a linear buffer offset }
  519.     function CharPosToPos(CharPos: TOTACharPos): Longint;
  520.     { Convert between a EdPos and a CharPos }
  521.     procedure ConvertPos(EdPosToCharPos: Boolean; var EditPos: TOTAEditPos;
  522.       var CharPos: TOTACharPos);
  523.     { Return the token attributes at the given EdPos. If IncludeMargin is true,
  524.       the attribute at the right margin line is the margin line attribute, else
  525.       it returns the actual char attribute }
  526.     procedure GetAttributeAtPos(const EdPos: TOTAEditPos; IncludeMargin: Boolean;
  527.       var Element, LineFlag: Integer);
  528.     { Returns true if this interface instance is connected to the same
  529.       underlying view as the indicated instance.  You must use this method
  530.       in order to test for equality between views since several interface
  531.       instances may share a single view.  You should also not hold onto
  532.       these view interfaces for any length of time, unless a notifier is
  533.       registered with the IOTASourceEditor so you can determine when the
  534.       underlying implementation is vanishing. }
  535.     function SameView(EditView: IOTAEditView): Boolean;
  536.  
  537.     property CursorPos: TOTAEditPos read GetCursorPos write SetCursorPos;
  538.     property TopPos: TOTAEditPos read GetTopPos write SetTopPos;
  539.     property ViewSize: TSize read GetViewSize;
  540.   end;
  541.  
  542.   IOTASearchOptions = interface(IUnknown)
  543.     ['{D1766F8B-D915-11D2-A8C1-00C04FA32F53}']
  544.     function GetCaseSensitive: Boolean;
  545.     function GetDirection: TSearchDirection;
  546.     function GetFromCursor: Boolean;
  547.     function GetRegularExpression: Boolean;
  548.     function GetSearchText: string;
  549.     function GetWholeFile: Boolean;
  550.     function GetWordBoundary: Boolean;
  551.     procedure SetCaseSensitive(Value: Boolean);
  552.     procedure SetDirection(Value: TSearchDirection);
  553.     procedure SetFromCursor(Value: Boolean);
  554.     procedure SetRegularExpression(Value: Boolean);
  555.     procedure SetSearchText(const Value: string);
  556.     procedure SetWholeFile(Value: Boolean);
  557.     procedure SetWordBoundary(Value: Boolean);
  558.  
  559.     property CaseSensitive: Boolean read GetCaseSensitive write SetCaseSensitive;
  560.     property Direction: TSearchDirection read GetDirection write SetDirection;
  561.     property FromCursor: Boolean read GetFromCursor write SetFromCursor;
  562.     property RegularExpression: Boolean read GetRegularExpression write SetRegularExpression;
  563.     property SearchText: string read GetSearchText write SetSearchText;
  564.     property WholeFile: Boolean read GetWholeFile write SetWholeFile;
  565.     property WordBoundary: Boolean read GetWordBoundary write SetWordBoundary;
  566.   end;
  567.  
  568.   IOTAReplaceOptions = interface(IOTASearchOptions)
  569.     ['{D1766F8C-D915-11D2-A8C1-00C04FA32F53}']
  570.     function GetPromptOnReplace: Boolean;
  571.     function GetReplaceAll: Boolean;
  572.     function GetReplaceText: string;
  573.     procedure SetPromptOnReplace(Value: Boolean);
  574.     procedure SetReplaceAll(Value: Boolean);
  575.     procedure SetReplaceText(const Value: string);
  576.  
  577.     property PromptOnReplace: Boolean read GetPromptOnReplace write SetPromptOnReplace;
  578.     property ReplaceAll: Boolean read GetReplaceAll write SetReplaceAll;
  579.     property ReplaceText: string read GetReplaceText write SetReplaceText;
  580.   end;
  581.  
  582.   IOTAEditPosition = interface(IUnknown)
  583.     ['{9C510464-C7BC-11D2-9AEB-00A02457621F}']
  584.     procedure Align(Magnitude: Integer);
  585.     function BackspaceDelete(HowMany: Integer): Boolean;
  586.     function Delete(HowMany: Integer): Boolean;
  587.     function DistanceToTab(Direction: TSearchDirection): Integer;
  588.     function GetCharacter: Char;
  589.     function GetColumn: Integer;
  590.     function GetIsSpecialCharacter: Boolean;
  591.     function GetIsWhitespace: Boolean;
  592.     function GetIsWordCharacter: Boolean;
  593.     function GetLastRow: Integer;
  594.     function GetReplaceOptions: IOTAReplaceOptions;
  595.     function GetRow: Integer;
  596.     function GetSearchErrorString(ErrorCode: Integer): string;
  597.     function GetSearchOptions: IOTASearchOptions;
  598.     function GotoLine(LineNumber: Integer): Boolean;
  599.     procedure InsertBlock(const Block: IOTAEditBlock);
  600.     procedure InsertCharacter(Character: Char);
  601.     procedure InsertFile(const FileName: string);
  602.     procedure InsertText(const Text: string);
  603.     function Move(Row, Col: Integer): Boolean;
  604.     function MoveBOL: Boolean;
  605.     function MoveCursor(MoveMask: TMoveCursorMasks): Boolean;
  606.     function MoveEOF: Boolean;
  607.     function MoveEOL: Boolean;
  608.     function MoveReal(Row, Col: Integer): Boolean;
  609.     function MoveRelative(Row, Col: Integer): Boolean;
  610.     procedure Paste;
  611.     function Read(NumberOfCharacters: Integer): string;
  612.     function RepeatLastSearchOrReplace: Boolean;
  613.     function Replace(const Pattern, ReplaceText: string; CaseSensitive,
  614.       RegularExpression, WholeFile: Boolean; Direction: TSearchDirection;
  615.       var ErrorCode: Integer): Integer; overload;
  616.      
  617.     function Replace: Integer; overload;
  618.      
  619.     function ReplaceAgain: Integer;
  620.     procedure Restore;
  621.     function RipText(const ValidChars: TSysCharSet; RipFlags: Integer): string; overload;
  622.      
  623.     function RipText(const ValidChars: string; RipFlags: Integer): string; overload;
  624.      
  625.     procedure Save;
  626.     function Search(const Pattern: string; CaseSensitive, RegularExpression,
  627.       WholeFile: Boolean; Direction: TSearchDirection;
  628.       var ErrorCode: Integer): Boolean; overload;
  629.      
  630.     function Search: Boolean; overload;
  631.      
  632.     function SearchAgain: Boolean;
  633.     procedure Tab(Magnitude: Integer);
  634.  
  635.     property Character: Char read GetCharacter;
  636.     property Column: Integer read GetColumn;
  637.     property IsSpecialCharacter: Boolean read GetIsSpecialCharacter;
  638.     property IsWhiteSpace: Boolean read GetIsWhiteSpace;
  639.     property IsWordCharacter: Boolean read GetIsWordCharacter;
  640.     property LastRow: Integer read GetLastRow;
  641.     property ReplaceOptions: IOTAReplaceOptions read GetReplaceOptions;
  642.     property Row: Integer read GetRow;
  643.     property SearchOptions: IOTASearchOptions read GetSearchOptions;
  644.   end;
  645.  
  646.   IOTAEditBlock = interface(IUnknown)
  647.     ['{9C510463-C7BC-11D2-9AEB-00A02457621F}']
  648.     procedure BeginBlock;
  649.     procedure Copy(Append: Boolean);
  650.     procedure Cut(Append: Boolean);
  651.     function Delete: Boolean;
  652.     procedure EndBlock;
  653.     function Extend(NewRow, NewCol: Integer): Boolean;
  654.     function ExtendPageUp: Boolean;
  655.     function ExtendPageDown: Boolean;
  656.     function ExtendReal(NewRow, NewCol: Integer): Boolean;
  657.     function ExtendRelative(DeltaRow, DeltaCol: Integer): Boolean;
  658.     function GetEndingColumn: Integer;
  659.     function GetEndingRow: Integer;
  660.     function GetIsValid: Boolean;
  661.     function GetSize: Integer;
  662.     function GetStartingColumn: Integer;
  663.     function GetStartingRow: Integer;
  664.     function GetStyle: TOTABlockType;
  665.     function GetText: string;
  666.     function GetVisible: Boolean;
  667.     procedure Indent(Magnitude: Integer);
  668.     procedure LowerCase;
  669.     function Print: Boolean;
  670.     procedure Reset;
  671.     procedure Restore;
  672.     procedure Save;
  673.     function SaveToFile(const FileName: string): Boolean;
  674.     procedure SetStyle(Value: TOTABlockType);
  675.     procedure SetVisible(Value: Boolean);
  676.     procedure ToggleCase;
  677.     procedure UpperCase;
  678.  
  679.     property EndingColumn: Integer read GetEndingColumn;
  680.     property EndingRow: Integer read GetEndingRow;
  681.     property IsValid: Boolean read GetIsValid;
  682.     property Size: Integer read GetSize;
  683.     property StartingColumn: Integer read GetStartingColumn;
  684.     property StartingRow: Integer read GetStartingRow;
  685.     property Style: TOTABlockType read GetStyle write SetStyle;
  686.     property Text: string read GetText;
  687.     property Visible: Boolean read GetVisible write SetVisible;
  688.   end;
  689.  
  690.   INTAEditWindow = interface(IUnknown)
  691.     ['{8CC6430B-E721-11D2-A8CC-00C04FA32F53}']
  692.     function GetForm: TCustomForm;
  693.     function GetStatusBar: TStatusBar;
  694.  
  695.     property Form: TCustomForm read GetForm;
  696.     property StatusBar: TStatusBar read GetStatusBar;
  697.   end;
  698.  
  699.   IOTAEditView = interface(IOTAEditView40)
  700.     ['{9C510462-C7BC-11D2-9AEB-00A02457621F}']
  701.     function BookmarkGoto(BookmarkID: Integer): Boolean;
  702.     function BookmarkRecord(BookmarkID: Integer): Boolean;
  703.     function BookmarkToggle(BookmarkID: Integer): Boolean;
  704.     procedure Center(Row, Col: Integer);
  705.     function GetBlock: IOTAEditBlock;
  706.     function GetBookmarkPos(BookmarkID: Integer): TOTACharPos;
  707.     function GetBottomRow: Integer;
  708.     function GetBuffer: IOTAEditBuffer;
  709.     function GetEditWindow: INTAEditWindow;
  710.     function GetLastEditColumn: Integer;
  711.     function GetLastEditRow: Integer;
  712.     function GetLeftColumn: Integer;
  713.     function GetPosition: IOTAEditPosition;
  714.     function GetRightColumn: Integer;
  715.     function GetTopRow: Integer;
  716.     procedure MoveCursorToView;
  717.     procedure MoveViewToCursor;
  718.     procedure PageDown;
  719.     procedure PageUp;
  720.     procedure Paint;
  721.     function Scroll(DeltaRow: Integer; DeltaCol: Integer): Integer;
  722.     procedure SetTopLeft(TopRow, LeftCol: Integer);
  723.     procedure SetTempMsg(const Msg: string);
  724.  
  725.     property Block: IOTAEditBlock read GetBlock;
  726.     property BottomRow: Integer read GetBottomRow;
  727.     property BookmarkPos[BookMarkID: Integer]: TOTACharPos read GetBookmarkPos;
  728.     property Buffer: IOTAEditBuffer read GetBuffer;
  729.     property LastEditColumn: Integer read GetLastEditColumn;
  730.     property LastEditRow: Integer read GetLastEditRow;
  731.     property LeftColumn: Integer read GetLeftColumn;
  732.     property Position: IOTAEditPosition read GetPosition;
  733.     property RightColumn: Integer read GetRightColumn;
  734.     property TopRow: Integer read GetTopRow;
  735.   end;
  736.  
  737.   TClassNavigateStyle = Byte;
  738.   TCodeCompleteStyle = Byte;
  739.  
  740.   IOTAEditActions = interface(IUnknown)
  741.     ['{ECB23623-E2D8-11D2-ABE5-00C04FB16FB3}']
  742.     procedure AddWatch;
  743.     procedure AddWatchAtCursor;
  744.     procedure BrowseSymbolAtCursor;
  745.     procedure ClassComplete;
  746.     procedure ClassNavigate(Reserved: TClassNavigateStyle);
  747.     procedure ClosePage;
  748.     procedure CodeTemplate;
  749.     procedure CodeCompletion(Style: TCodeCompleteStyle);
  750.     procedure EvaluateModify;
  751.     procedure HelpKeyword;
  752.     procedure IncrementalSearch;
  753.     procedure InsertCompilerOptions;
  754.     procedure InsertNewGUID;
  755.     procedure InspectAtCursor;
  756.     procedure CompileProject;
  757.     procedure NextError;
  758.     procedure NextPage;
  759.     procedure OpenFile;
  760.     procedure OpenFileAtCursor;
  761.     procedure PriorError;
  762.     procedure PriorPage;
  763.     procedure ProgramReset;
  764.     procedure RunProgram;
  765.     procedure RunToCursor;
  766.     procedure SaveAll;
  767.     procedure Save;
  768.     procedure SaveAs;
  769.     procedure StepOver;
  770.     procedure SwapSourceFormView;
  771.     procedure SwapCPPHeader;
  772.     procedure ToggleFormUnit;
  773.     procedure TraceInto;
  774.     procedure TraceToSource;
  775.     procedure ViewExplorer;
  776.     procedure ViewForms;
  777.     procedure ViewObjectInspector;
  778.     procedure ViewUnits;
  779.     procedure WindowList;
  780.     procedure ZoomWindow;
  781.   end;
  782.  
  783.   IOTASourceEditor = interface(IOTAEditor)
  784.     ['{F17A7BD1-E07D-11D1-AB0B-00C04FB16FB3}']
  785.     { Create and return an IOTAEditReader }
  786.     function CreateReader: IOTAEditReader;
  787.     { Create and return an IOTAEditWriter. Changes are not undoable }
  788.     function CreateWriter: IOTAEditWriter;
  789.     { Create and return an IOTAEditWriter. Changes are undoable }
  790.     function CreateUndoableWriter: IOTAEditWriter;
  791.     { Return the number of active views on this editor }
  792.     function GetEditViewCount: Integer;
  793.     { Return the Indexed view }
  794.     function GetEditView(Index: Integer): IOTAEditView;
  795.     { Returns the total number of lines in this source editor }
  796.     function GetLinesInBuffer: Longint;
  797.     { Change the syntax highlighter for this buffer or if shQuery is set,
  798.       simply return the currently set highlighter }
  799.     function SetSyntaxHighlighter(SyntaxHighlighter: TOTASyntaxHighlighter): TOTASyntaxHighlighter;
  800.     { These functions will affect all views on this buffer. }
  801.     function GetBlockAfter: TOTACharPos;
  802.     function GetBlockStart: TOTACharPos;
  803.     function GetBlockType: TOTABlockType;
  804.     function GetBlockVisible: Boolean;
  805.     procedure SetBlockAfter(const Value: TOTACharPos);
  806.     procedure SetBlockStart(const Value: TOTACharPos);
  807.     procedure SetBlockType(Value: TOTABlockType);
  808.     procedure SetBlockVisible(Value: Boolean);
  809.  
  810.     property BlockStart: TOTACharPos read GetBlockStart write SetBlockStart;
  811.     property BlockAfter: TOTACharPos read GetBlockAfter write SetBlockAfter;
  812.     property BlockType: TOTABlockType read GetBlockType write SetBlockType;
  813.     property BlockVisible: Boolean read GetBlockVisible write SetBlockVisible;
  814.     property EditViewCount: Integer read GetEditViewCount;
  815.     property EditViews[Index: Integer]: IOTAEditView read GetEditView;
  816.   end;
  817.  
  818.   { IOTAResourceEntry is a raw interface to a resource entry in the project's
  819.     resource file (<projectname>.RES).
  820.  
  821.     This interface is very raw.  No implication on what is contained within
  822.     a particular entry is made.  Is if up to the add-in developer to interpret
  823.     the data accessed through this interface.  NOTE: The 'MAINICON' entry and
  824.     related entries should not be modified as these are maintained by Delphi/
  825.     C++Builder. }
  826.  
  827.   TOTAResHeaderValue = (hvFlags, hvLanguage, hvDataVersion, hvVersion,
  828.     hvCharacteristics);
  829.  
  830.   IOTAResourceEntry = interface(IUnknown)
  831.     ['{26EB0E51-F97B-11D1-AB27-00C04FB16FB3}']
  832.     { Gets the resource type of this entry.  Follows Windows standard of
  833.       specifying a type by name or value.  If the high-word is 0, then the
  834.       low-word is the resource type value, otherwise it is a pointer to a null
  835.       terminated ANSI (byte per char) string. Most predefined types are by
  836.       value. }
  837.     function GetResourceType: PChar;
  838.     { Gets the resource name of this entry.  Follows Windows standard of
  839.       specifying a type by name or value. If the high-word is 0, then the
  840.       low-word is the resource type value, otherwise it is a pointer to a null
  841.       terminated ANSI (byte per char) string. }
  842.     function GetResourceName: PChar;
  843.     { Changes the Type and name of this resource entry }
  844.     function Change(NewType, NewName: PChar): Boolean;
  845.     { Gets and sets various resource header values.  Pass in one of the \
  846.       TResHeaderValues enums to indicate which value to get/set.  Although
  847.       some values are 16bits (Word) these functions operation only on
  848.       32bits (Integer). }
  849.     function GetHeaderValue(HeaderValue: TOTAResHeaderValue;
  850.       var Value: Integer): Boolean;
  851.     { See GetHeaderValue }
  852.     function SetHeaderValue(HeaderValue: TOTAResHeaderValue;
  853.       Value: Integer): Boolean;
  854.     { Returns a raw pointer to the actual resource data buffer. }
  855.     function GetData: Pointer;
  856.     { Returns the current size of the data buffer. }
  857.     function GetDataSize: Integer;
  858.     { Resizes the current data buffer.  If the size is smaller than the
  859.       current size, the data is simply truncated without regard to its
  860.       current contents. }
  861.     procedure SetDataSize(NewSize: Integer);
  862.     { Returns a unique handle value identifying the resource entry. }
  863.     function GetEntryHandle: TOTAHandle;
  864.  
  865.     property DataSize: Integer read GetDataSize write SetDataSize;
  866.   end;
  867.  
  868.   { The IOTAProjectResource is an interface on the project's resource file
  869.     (<projectname>.RES). }
  870.  
  871.   IOTAProjectResource = interface(IOTAEditor)
  872.     ['{26EB0E52-F97B-11D1-AB27-00C04FB16FB3}']
  873.     { Returns the number of Resource entries. }
  874.     function GetEntryCount: Integer;
  875.     { Given an index, returns a IOTAResourceEntry of the index'th entry. }
  876.     function GetEntry(Index: Integer): IOTAResourceEntry;
  877.     { Given an entry handle, return the IOTAResourceEntry }
  878.     function GetEntryFromHandle(EntryHandle: TOTAHandle): IOTAResourceEntry;
  879.     { Given a Resource type and name, return a IOTAResourceEntry or nil
  880.       if not found. }
  881.     function FindEntry(ResType, Name: PChar): IOTAResourceEntry;
  882.     { Given an entry handle, delete the given resource entry. }
  883.     procedure DeleteEntry(EntryHandle: TOTAHandle);
  884.     { Creates a new resource entry of the given type and name and returns a
  885.       IOTAResourceEntry.  Returns nil if the entry already exists or any other
  886.       error occurs. }
  887.     function CreateEntry(ResType, Name: PChar; Flags, LanguageId: Word;
  888.       DataVersion, Version, Characteristics: Integer): IOTAResourceEntry;
  889.   end;
  890.  
  891.   TOTAGetChildCallback = procedure (Param: Pointer; Component: IOTAComponent;
  892.     var Result: Boolean) of object;
  893.  
  894.   { INTAComponent - This is the native component interface }
  895.  
  896.   INTAComponent = interface(IUnknown)
  897.     ['{34B2E2D1-E36F-11D1-AB0E-00C04FB16FB3}']
  898.     { Returns the actual TComponent/TPersistent }
  899.     function GetPersistent: TPersistent;
  900.     { Returns the TComponent if this interface is a TComponent else nil }
  901.     function GetComponent: TComponent;
  902.   end;
  903.  
  904.   { The IOTAComponent is the base interface for a component living
  905.     on a form/data module.  Never hold this interface for very long, since
  906.     the component may be deleted at any time. }
  907.  
  908.   IOTAComponent = interface(IUnknown)
  909.     ['{34B2E2D0-E36F-11D1-AB0E-00C04FB16FB3}']
  910.     { Returns a string representing the type of the component. }
  911.     function GetComponentType: string;
  912.     { Returns a unique Handle to the TComponent/TPersistent }
  913.     function GetComponentHandle: TOTAHandle;
  914.     { Returns the interface corresponding to the parent control if a TControl,
  915.       otherwise returns the owner of the control.  If a TPersistent or the
  916.       root object then it returns nil. }
  917.     function GetParent: IOTAComponent;
  918.     { Returns True if component is a TControl descendant }
  919.     function IsTControl: Boolean;
  920.     { Returns the number of published properties on this component. }
  921.     function GetPropCount: Integer;
  922.     { Given the index, returns the property name. }
  923.     function GetPropName(Index: Integer): string;
  924.     { Given the index, returns the property type. }
  925.     function GetPropType(Index: Integer): TTypeKind;
  926.     { Given the name, returns the property type. }
  927.     function GetPropTypeByName(const Name: string): TTypeKind;
  928.     { Given the index or name, returns the property value. The untyped var
  929.       must be large enough to hold the returned value.  If the property is
  930.       a descendant of TPersistent, the return value is a IOTAComponent. For
  931.       properties of any other object type, the return value is nil. }
  932.     function GetPropValue(Index: Integer; var Value): Boolean;
  933.     function GetPropValueByName(const Name: string; var Value): Boolean;
  934.     { Given the index or name, sets the property value. }
  935.     function SetProp(Index: Integer; const Value): Boolean;
  936.     function SetPropByName(const Name: string; const Value): Boolean;
  937.     { Enumerate the child controls just like TComponent.GetChildren }
  938.     function GetChildren(Param: Pointer; Proc: TOTAGetChildCallback): Boolean;
  939.     { Returns the number of child controls (if a TWinControl descendant, else
  940.       returns 0). }
  941.     function GetControlCount: Integer;
  942.     { Given the index, returns an interface to the child control. }
  943.     function GetControl(Index: Integer): IOTAComponent;
  944.     { Returns the number of child components (if a TComponent descendant,
  945.       else returns 0). }
  946.     function GetComponentCount: Integer;
  947.     { Given the index, returns an interface to the child component. }
  948.     function GetComponent(Index: Integer): IOTAComponent;
  949.     { Selects the component and updates the Object Inspector. If AddToSelection
  950.       if true, then the current selection is not cleared, and the components are
  951.       multi-selected }
  952.     function Select(AddToSelection: Boolean): Boolean;
  953.     { Same as Select except it brings the form to front with the component
  954.       selected.  If this interface is a Form/Data Module, then Focus only
  955.       brings the form to front. See Select for description of AddToSelection}
  956.     function Focus(AddToSelection: Boolean): Boolean;
  957.     { Deletes the component from the form.  Following this call, this interface
  958.       will now be invalid and must be release. }
  959.     function Delete: Boolean;
  960.     { Returns the IPersistent interface }
  961.     function GetIPersistent: IPersistent;
  962.     { Returns the IComponent interface if instance is a TComponent else nil }
  963.     function GetIComponent: IComponent;
  964.   end;
  965.  
  966.   INTAFormEditor = interface(IUnknown)
  967.     ['{34B2E2CF-E36F-11D1-AB0E-00C04FB16FB3}']
  968.     { Return the instance of the TFormDesigner on this editor }
  969.     function GetFormDesigner: IFormDesigner;
  970.     procedure GetFormResource(Stream: TStream);
  971.  
  972.     property FormDesigner: IFormDesigner read GetFormDesigner;
  973.   end;
  974.  
  975.   IOTAFormEditor = interface(IOTAEditor)
  976.     ['{F17A7BD2-E07D-11D1-AB0B-00C04FB16FB3}']
  977.     { Return the form editor root component }
  978.     function GetRootComponent: IOTAComponent;
  979.     function FindComponent(const Name: string): IOTAComponent;
  980.     function GetComponentFromHandle(ComponentHandle: TOTAHandle): IOTAComponent;
  981.     function GetSelCount: Integer;
  982.     function GetSelComponent(Index: Integer): IOTAComponent;
  983.     function GetCreateParent: IOTAComponent;
  984.     function CreateComponent(const Container: IOTAComponent;
  985.       const TypeName: string; X, Y, W, H: Integer): IOTAComponent;
  986.     procedure GetFormResource(const Stream: IStream);
  987.   end;
  988.  
  989.   IOTATypeLibEditor = interface(IOTAEditor)
  990.     ['{F17A7BD3-E07D-11D1-AB0B-00C04FB16FB3}']
  991.   end;
  992.  
  993.   { Interface implemented by a client to receive notifications
  994.     on a specific module }
  995.   IOTAModuleNotifier = interface(IOTANotifier)
  996.     ['{F17A7BCE-E07D-11D1-AB0B-00C04FB16FB3}']
  997.     { CheckOverwrite is called during a SaveAs operation to determine if any
  998.       files associated with this module will overwrite any other files.
  999.       Return True to allow the overwrite or no overwrite will occur }
  1000.     function CheckOverwrite: Boolean;
  1001.     { User has renamed the module }
  1002.     procedure ModuleRenamed(const NewName: string);
  1003.   end;
  1004.  
  1005.   IOTAModuleInfo = interface(IUnknown)
  1006.     ['{F17A7BD6-E07D-11D1-AB0B-00C04FB16FB3}']
  1007.     { Returns the type of this module }
  1008.     function GetModuleType: TOTAModuleType;
  1009.     { Returns the Module Name }
  1010.     function GetName: string;
  1011.     { Returns the Module File name }
  1012.     function GetFileName: string;
  1013.     { Returns the Form Name }
  1014.     function GetFormName: string;
  1015.     { Returns the Design class }
  1016.     function GetDesignClass: string;
  1017.     { Fills the TStrings class with the CoClasses }
  1018.     procedure GetCoClasses(CoClasses: TStrings);
  1019.     { Opens and returns the IOTAModule associated with this IOTAModuleInfo }
  1020.     function OpenModule: IOTAModule;
  1021.  
  1022.     property ModuleType: TOTAModuleType read GetModuleType;
  1023.     property Name: string read GetName;
  1024.     property FileName: string read GetFileName;
  1025.     property FormName: string read GetFormName;
  1026.     property DesignClass: string read GetDesignClass;
  1027.   end;
  1028.  
  1029.   IOTAModule40 = interface(IUnknown)
  1030.     ['{F17A7BCC-E07D-11D1-AB0B-00C04FB16FB3}']
  1031.     { Call this to register an IOTANotifier. The result is the index to be
  1032.       used when calling RemoveNotifier. If <0 then an error occured. }
  1033.     function AddNotifier(const ANotifier: IOTAModuleNotifier): Integer;
  1034.     { This invokes the Add To Interface dialog in Delphi }
  1035.     procedure AddToInterface;
  1036.     { Attempt to close this module. True was successful and all references to
  1037.       this module must be released. False if this module was not closed. }
  1038.     function Close: Boolean;
  1039.     { Return the filename associated with this module.  This is only the base
  1040.       name used by the IDE.  Header source and forms are obtained other ways.}
  1041.     function GetFileName: string;
  1042.     { Return the currently assigned file system }
  1043.     function GetFileSystem: string;
  1044.     { Returns the number of associated files (eg. Unit1.Pas and Unit1.dfm) }
  1045.     function GetModuleFileCount: Integer;
  1046.     { Returns the associated file editor.  Use QueryInterface to determine if
  1047.       this is an IOTASourceEditor or IOTAFormEditor }
  1048.     function GetModuleFileEditor(Index: Integer): IOTAEditor;
  1049.     { Return the number of open projects than own this module }
  1050.     function GetOwnerCount: Integer;
  1051.     { Return the Indexed Project that owns this module }
  1052.     function GetOwner(Index: Integer): IOTAProject;
  1053.     { Returns True if this modules has CoClasses.  Can be used to determine if
  1054.       AddToInterface can be called }
  1055.     function HasCoClasses: Boolean;
  1056.     { Call with the index obtained from AddNotifier }
  1057.     procedure RemoveNotifier(Index: Integer);
  1058.     { Save the module. ChangeName invokes the SaveAs logic.  ForceSave will not
  1059.       ask to save if the module is modified. Returns False if canceled
  1060.       or an error }
  1061.     function Save(ChangeName, ForceSave: Boolean): Boolean;
  1062.     { Sets the module filename.  Header source and forms will use the base
  1063.       filename. }
  1064.     procedure SetFileName(const AFileName: string);
  1065.     { Sets the associated file system }
  1066.     procedure SetFileSystem(const AFileSystem: string);
  1067.  
  1068.     property OwnerCount: Integer read GetOwnerCount;
  1069.     property Owners[Index: Integer]: IOTAProject read GetOwner;
  1070.     property FileName: string read GetFileName write SetFileName;
  1071.     property FileSystem: string read GetFileSystem write SetFileSystem;
  1072.   end;
  1073.  
  1074.   IOTAModule = interface(IOTAModule40)
  1075.     ['{15D3FB81-EF27-488E-B2B4-26B59CA89D9D}']
  1076.     { CloseModule allows an add-in to force a module closed regardless of
  1077.       whether or not it is modified.  If ForceClosed is False, then calling
  1078.       this method has the same behaviour as Close as implemented in
  1079.       IOTAModule40 }
  1080.     function CloseModule(ForceClosed: Boolean): Boolean;
  1081.   end;
  1082.  
  1083.   IOTATypeLibModule = interface(IOTAModule)
  1084.     ['{0BBAEEA0-EF74-11D1-AB1C-00C04FB16FB3}']
  1085.   end;
  1086.  
  1087.   IOTAOptions = interface(IUnknown)
  1088.     ['{9C0E91FC-FA5A-11D1-AB28-00C04FB16FB3}']
  1089.     { Opens the options dialog }
  1090.     procedure EditOptions;
  1091.     { Get the value of the named option. }
  1092.     function GetOptionValue(const ValueName: string): Variant;
  1093.     { Set the value of the named option. }
  1094.     procedure SetOptionValue(const ValueName: string; const Value: Variant);
  1095.     { Get the list of available options for this option structure }
  1096.     function GetOptionNames: TOTAOptionNameArray;
  1097.  
  1098.     property Values[const ValueName: string]: Variant read GetOptionValue write SetOptionValue;
  1099.   end;
  1100.  
  1101.   IOTAProjectOptions40 = interface(IOTAOptions)
  1102.     ['{F17A7BD4-E07D-11D1-AB0B-00C04FB16FB3}']
  1103.   end;
  1104.  
  1105.   IOTAProjectOptions = interface(IOTAProjectOptions40)
  1106.     ['{F899EBC6-E6E2-11D2-AA90-00C04FA370E9}']
  1107.     {Set the modified state of the project options}
  1108.     procedure SetModifiedState(State: Boolean);
  1109.     {Get the modified state of the project options}
  1110.     function GetModifiedState: Boolean;
  1111.  
  1112.     property ModifiedState: Boolean read GetModifiedState write SetModifiedState;
  1113.   end;
  1114.  
  1115.   IOTAProjectBuilder40 = interface(IUnknown)
  1116.    ['{F17A7BD5-E07D-11D1-AB0B-00C04FB16FB3}']
  1117.    { True if the project is out of date and needs to be built }
  1118.    function GetShouldBuild: Boolean;
  1119.    { True if successfully built.  If Wait then the compile progress dialog
  1120.      waits for the user press OK.  If False, it does not wait if successful. }
  1121.    function BuildProject(CompileMode: TOTACompileMode; Wait: Boolean): Boolean;
  1122.  
  1123.    property ShouldBuild: Boolean read GetShouldBuild;
  1124.   end;
  1125.  
  1126.   IOTAProjectBuilder = interface(IOTAProjectBuilder40)
  1127.    ['{08A5B1F5-FCDA-11D2-AC82-00C04FB173DC}']
  1128.    { True if successfully built.  If Wait then the compile progress dialog
  1129.      waits for the user press OK.  If False, it does not wait if successful. }
  1130.    function BuildProject(CompileMode: TOTACompileMode; Wait, ClearMessages: Boolean): Boolean; overload;
  1131.   end;
  1132.  
  1133.   IOTAProject40 = interface(IOTAModule)
  1134.     ['{F17A7BCA-E07D-11D1-AB0B-00C04FB16FB3}']
  1135.     { Return the number of owned modules }
  1136.     function GetModuleCount: Integer;
  1137.     { Return the Indexed owned Module Info }
  1138.     function GetModule(Index: Integer): IOTAModuleInfo;
  1139.     { Return the Project options }
  1140.     function GetProjectOptions: IOTAProjectOptions;
  1141.     { Return the Project Builder }
  1142.     function GetProjectBuilder: IOTAProjectBuilder;
  1143.  
  1144.     property ProjectOptions: IOTAProjectOptions read GetProjectOptions;
  1145.     property ProjectBuilder: IOTAProjectBuilder read GetProjectBuilder;
  1146.   end;
  1147.  
  1148.   IOTAProject = interface(IOTAProject40)
  1149.     ['{06C88136-F367-4D47-B8B4-CCACB3D7439A}']
  1150.     { Call this function to add an arbitrary file to the project.  NOTE: some
  1151.       files have special meaning to different projects.  For example: adding
  1152.       VCL50.DCP will cause a new entry in a package project's "requires" list
  1153.       while it will be a raw file to any other project type.  Set IsUnitOrForm
  1154.       to true for files that are considered items that the project would
  1155.       process directly or indirectly (ie. .pas, .cpp, .rc, etc..) or can be
  1156.       opened in the code editor. For all others, including binary files
  1157.       (.res, .bpi, .dcp, etc..) set this to False. }
  1158.     procedure AddFile(const AFileName: string; IsUnitOrForm: Boolean);
  1159.     { Call this function to remove an arbitrary file from the project.  This
  1160.       must be a fully qualified filename.  See GetModule() above for info on
  1161.       obtaining this information from a Form name or unit name }
  1162.     procedure RemoveFile(const AFileName: string);
  1163.   end;  
  1164.  
  1165.   IOTAProjectGroup = interface(IOTAModule)
  1166.     ['{F17A7BCB-E07D-11D1-AB0B-00C04FB16FB3}']
  1167.     { Invoke the Add New Project Dialog }
  1168.     procedure AddNewProject;
  1169.     { Invoke the Open New Project Dialog }
  1170.     procedure AddExistingProject;
  1171.     { Return the currently active project }
  1172.     function GetActiveProject: IOTAProject;
  1173.     { Number of Projects in this project group }
  1174.     function GetProjectCount: Integer;
  1175.     { Return the Project interface }
  1176.     function GetProject(Index: Integer): IOTAProject;
  1177.     { Remove the given project from the project group }
  1178.     procedure RemoveProject(const AProject: IOTAProject);
  1179.     { Set the active project }
  1180.     procedure SetActiveProject(const AProject: IOTAProject);
  1181.  
  1182.     property ActiveProject: IOTAProject read GetActiveProject write SetActiveProject;
  1183.     property ProjectCount: Integer read GetProjectCount;
  1184.     property Projects[Index: Integer]: IOTAProject read GetProject;
  1185.   end;
  1186.  
  1187.   IOTAActionServices = interface(IUnknown)
  1188.     ['{F17A7BC9-E07D-11D1-AB0B-00C04FB16FB3}']
  1189.     { Action interfaces }
  1190.     function CloseFile(const FileName: string): Boolean;
  1191.     function OpenFile(const FileName: string): Boolean;
  1192.     function OpenProject(const ProjName: string; NewProjGroup: Boolean): Boolean;
  1193.     function ReloadFile(const FileName: string): Boolean;
  1194.     function SaveFile(const FileName: string): Boolean;
  1195.   end;
  1196.  
  1197.   IOTAFileSystem = interface(IUnknown)
  1198.     ['{A9D1389D-F4B0-11D1-AB22-00C04FB16FB3}']
  1199.     function GetFileStream(const FileName: string; Mode: Integer): IStream;
  1200.     function FileAge(const FileName: string): Longint;
  1201.     function RenameFile(const OldName, NewName: string): Boolean;
  1202.     function IsReadonly(const FileName: string): Boolean;
  1203.     function IsFileBased: Boolean;
  1204.     function DeleteFile(const FileName: string): Boolean;
  1205.     function FileExists(const FileName: string): Boolean;
  1206.     function GetTempFileName(const FileName: string): string;
  1207.     function GetBackupFileName(const FileName: string): string;
  1208.     function GetIDString: string;
  1209.   end;
  1210.  
  1211.   IOTAFile = interface(IUnknown)
  1212.     ['{6E2AD9B0-F7F0-11D1-AB26-00C04FB16FB3}']
  1213.     { Return the actual source code }
  1214.     function GetSource: string;
  1215.     { Return the age of the file. -1 if new }
  1216.     function GetAge: TDateTime;
  1217.  
  1218.     property Source: string read GetSource;
  1219.     property Age: TDateTime read GetAge;
  1220.   end;
  1221.  
  1222.   IOTACreator = interface(IUnknown)
  1223.     ['{6EDB9B9E-F57A-11D1-AB23-00C04FB16FB3}']
  1224.     { Return a string representing the default creator type in which to augment.
  1225.       See the definitions of sApplication, sConsole, sLibrary and
  1226.       sPackage, etc.. above.  Return an empty string indicating that this
  1227.       creator will provide *all* information }
  1228.     function GetCreatorType: string;
  1229.     { Return False if this is a new module }
  1230.     function GetExisting: Boolean;
  1231.     { Return the File system IDString that this module uses for reading/writing }
  1232.     function GetFileSystem: string;
  1233.     { Return the Owning module, if one exists (for a project module, this would
  1234.       be a project; for a project this is a project group) }
  1235.     function GetOwner: IOTAModule;
  1236.     { Return true, if this item is to be marked as un-named.  This will force the
  1237.       save as dialog to appear the first time the user saves. }
  1238.     function GetUnnamed: Boolean;
  1239.  
  1240.     property CreatorType: string read GetCreatorType;
  1241.     property Existing: Boolean read GetExisting;
  1242.     property FileSystem: string read GetFileSystem;
  1243.     property Owner: IOTAModule read GetOwner;
  1244.     property Unnamed: Boolean read GetUnnamed;
  1245.   end;
  1246.  
  1247.   IOTAModuleCreator = interface(IOTACreator)
  1248.     ['{6EDB9B9A-F57A-11D1-AB23-00C04FB16FB3}']
  1249.     { Return the Ancestor form name }
  1250.     function GetAncestorName: string;
  1251.     { Return the implementation filename, or blank to have the IDE create a new
  1252.       unique one. (C++ .cpp file or Delphi unit) }
  1253.     function GetImplFileName: string;
  1254.     { Return the interface filename, or blank to have the IDE create a new
  1255.       unique one.  (C++ header) }
  1256.     function GetIntfFileName: string;
  1257.     { Return the form name }
  1258.     function GetFormName: string;
  1259.     { Return True to Make this module the main form of the given Owner/Project }
  1260.     function GetMainForm: Boolean;
  1261.     { Return True to show the form }
  1262.     function GetShowForm: Boolean;
  1263.     { Return True to show the source }
  1264.     function GetShowSource: Boolean;
  1265.     { Create and return the Form resource for this new module if applicable }
  1266.     function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
  1267.     { Create and return the Implementation source for this module. (C++ .cpp
  1268.       file or Delphi unit) }
  1269.     function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
  1270.     { Create and return the Interface (C++ header) source for this module }
  1271.     function NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
  1272.     { Called when the new form/datamodule/custom module is created }
  1273.     procedure FormCreated(const FormEditor: IOTAFormEditor);
  1274.  
  1275.     property AncestorName: string read GetAncestorName;
  1276.     property FormName: string read GetFormName;
  1277.     property ImplFileName: string read GetImplFileName;
  1278.     property IntfFileName: string read GetIntfFileName;
  1279.     property MainForm: Boolean read GetMainForm;
  1280.     property ShowForm: Boolean read GetShowForm;
  1281.     property ShowSource: Boolean read GetShowSource;
  1282.   end;
  1283.  
  1284.   IOTAProjectCreator = interface(IOTACreator)
  1285.     ['{6EDB9B9D-F57A-11D1-AB23-00C04FB16FB3}']
  1286.     { Return the project filename }
  1287.     function GetFileName: string;
  1288.     { Return the option file name (C++ .bpr, .bpk, etc...) }
  1289.     function GetOptionFileName: string;
  1290.     { Return True to show the source }
  1291.     function GetShowSource: Boolean;
  1292.     { Called to create a new default module for this project }
  1293.     procedure NewDefaultModule;
  1294.     { Create and return the project option source. (C++) }
  1295.     function NewOptionSource(const ProjectName: string): IOTAFile;
  1296.     { Called to indicate when to create/modify the project resource file }
  1297.     procedure NewProjectResource(const Project: IOTAProject);
  1298.     { Create and return the Project source file }
  1299.     function NewProjectSource(const ProjectName: string): IOTAFile;
  1300.  
  1301.     property FileName: string read GetFileName;
  1302.     property OptionFileName: string read GetOptionFileName;
  1303.     property ShowSource: Boolean read GetShowSource;
  1304.   end;
  1305.  
  1306.   IOTAProjectCreator50 = interface(IOTAProjectCreator)
  1307.     ['{64312F82-62F3-48E9-BAF6-B03DF450312A}']
  1308.     { Called to create a new default module(s) for the given project.  This
  1309.       interface method is the prefered mechanism }
  1310.     procedure NewDefaultProjectModule(const Project: IOTAProject);
  1311.   end;
  1312.  
  1313.   IOTAProjectGroupCreator = interface(IOTACreator)
  1314.     ['{6EDB9B9F-F57A-11D1-AB23-00C04FB16FB3}']
  1315.     { Return the project group file name }
  1316.     function GetFileName: string;
  1317.     { Return True to show the source }
  1318.     function GetShowSource: Boolean;
  1319.     { Create and return the project group source }
  1320.     function NewProjectGroupSource(const ProjectGroupName: string): IOTAFile;
  1321.  
  1322.     property FileName: string read GetFileName;
  1323.     property ShowSource: Boolean read GetShowSource;
  1324.   end;
  1325.  
  1326.   IOTAModuleServices = interface(IUnknown)
  1327.     ['{F17A7BCD-E07D-11D1-AB0B-00C04FB16FB3}']
  1328.     { Registers a new file system }
  1329.     function AddFileSystem(FileSystem: IOTAFileSystem): Integer;
  1330.     { Close all open modules including the Project Group }
  1331.     function CloseAll: Boolean;
  1332.     { Given the Creator, create a new module of the implied type }
  1333.     function CreateModule(const Creator: IOTACreator): IOTAModule;
  1334.     { Return the currently active module }
  1335.     function CurrentModule: IOTAModule;
  1336.     { Lookup the given file system }
  1337.     function FindFileSystem(const Name: string): IOTAFileSystem;
  1338.     { Lookup the given module by form name }
  1339.     function FindFormModule(const FormName: string): IOTAModule;
  1340.     { Lookup the given module by file name }
  1341.     function FindModule(const FileName: string): IOTAModule;
  1342.     { Return the number of currently open modules }
  1343.     function GetModuleCount: Integer;
  1344.     { Return an interface on the module at index }
  1345.     function GetModule(Index: Integer): IOTAModule;
  1346.     { Given the Prefix, create a new unique Module name and class name }
  1347.     procedure GetNewModuleAndClassName(const Prefix: string; var UnitIdent,
  1348.       ClassName, FileName: string);
  1349.     { Open the File|New dialog }
  1350.     function NewModule: Boolean;
  1351.     { Remove's the index'd file system from the installed file system list }
  1352.     procedure RemoveFileSystem(Index: Integer);
  1353.     { Save all modules. Same as File|Save All }
  1354.     function SaveAll: Boolean;
  1355.  
  1356.     property ModuleCount: Integer read GetModuleCount;
  1357.     property Modules[Index: Integer]: IOTAModule read GetModule;
  1358.   end;
  1359.  
  1360.   IOTAProcess = interface;
  1361.   IOTAThread = interface;
  1362.  
  1363.   TOTATriggerResult = (trStop, trContinue, trDefault);
  1364.   TOTAAccessType = (atRead, atWrite, atExecute);
  1365.   TOTARunMode = (ormRun, ormRunToEntry, ormRunToMain, ormRunToCursor,
  1366.     ormStmtStepInto, ormStmtStepOver, ormInstStepInto, ormInstStepOver,
  1367.     ormStmtStepToSource, ormReserved1, rmReserved2, rmReserved3);
  1368.  
  1369.   IOTABreakpointNotifier = interface(IOTANotifier)
  1370.     ['{34B2E2D5-E36F-11D1-AB0E-00C04FB16FB3}']
  1371.     { Called when IDE attempts to edit this breakpoint. Return False to allow
  1372.       the default edit dialogs to function. AllowKeyChanges is True if all
  1373.       Breakpoint parameters are allowed to be changed, False if only certain
  1374.       items should be allowed to change. For example; when the user selects
  1375.       "Breakpoint properties..." from the right-click menu in the editor, the
  1376.       filename and line number fields are read-only.  AllowKeyChanges will be
  1377.       False in this case. }
  1378.     function Edit(AllowKeyChanges: Boolean): Boolean;
  1379.     { Called when this breakpoint is triggered. Return trStop to stop,
  1380.       trContinue to continue or trDefault to do the default processing. }
  1381.     function Trigger: TOTATriggerResult;
  1382.     { Called when the breakpoint is verified }
  1383.     procedure Verified(Enabled, Valid: Boolean);
  1384.   end;
  1385.  
  1386.   IOTABreakpoint40 = interface(IUnknown)
  1387.     ['{34B2E2D4-E36F-11D1-AB0E-00C04FB16FB3}']
  1388.     { Add a callback notifier.  Returns the index of this notifier in the
  1389.       breakpoint's list of notifiers.  Retain this value to be used when
  1390.       calling RemoveNotifier }
  1391.     function AddNotifier(const Notifier: IOTABreakpointNotifier): Integer;
  1392.     { Call this to destroy the object }
  1393.     procedure Destruct;
  1394.     { Processes default Trigger actions. Returns True to indicate stop.
  1395.       This should only be called within the IOTABreakpointNotifier.Trigger
  1396.       callback. }
  1397.     function DefaultTrigger: Boolean;
  1398.     { Decrement the CurPassCount if > 0.  Return True if it goes to 0 or is 0 }
  1399.     function DecPassCount: Boolean;
  1400.     { Invokes the normal edit processing }
  1401.     procedure Edit(AllowKeyChanges: Boolean);
  1402.     { Evaluates the expression associated with this breakpoint }
  1403.     function EvaluateExpression: Boolean;
  1404.     { Returns the Enabled status of this BP. }
  1405.     function GetEnabled: Boolean;
  1406.     { Retrieves the Expression associated }
  1407.     function GetExpression: string;
  1408.     { Return the Source file name in-which this Breakpoint is set }
  1409.     function GetFileName: string;
  1410.     { Return the line number on which this breakpoint is set }
  1411.     function GetLineNumber: Integer;
  1412.     { Retrieves the current Pass Count if PassCount is set }
  1413.     function GetCurPassCount: Integer;
  1414.     { Retrieves the associated Pass count }
  1415.     function GetPassCount: Integer;
  1416.     { Removes the index'th notifier from the breakpoint's list }
  1417.     procedure RemoveNotifier(Index: Integer);
  1418.     { Resets the CurPassCount back to PassCount }
  1419.     procedure ResetPassCount;
  1420.     { Sets the filename }
  1421.     procedure SetFileName(const Value: string);
  1422.     { Sets the Line Number }
  1423.     procedure SetLineNumber(Value: Integer);
  1424.     { Sets the Enabled status of this breakpoint }
  1425.     procedure SetEnabled(Value: Boolean);
  1426.     { Sets the Expression associated with this breakpoint }
  1427.     procedure SetExpression(const Value: string);
  1428.     { Sets the Pass count associated with this breakpoint. Calling this will
  1429.       clear the CurPassCount. }
  1430.     procedure SetPassCount(Value: Integer);
  1431.     { Returns whether this Breakpoint is valid in the currently selected
  1432.       process }
  1433.     function ValidInCurrentProcess: Boolean;
  1434.     { Returns wheter this brekapoint is valid in the given process }
  1435.     function ValidInProcess(Process: IOTAProcess): Boolean;
  1436.  
  1437.     property CurPassCount: Integer read GetCurPassCount;
  1438.     property Enabled: Boolean read GetEnabled write SetEnabled;
  1439.     property Expression: string read GetExpression write SetExpression;
  1440.     property FileName: string read GetFileName write SetFileName;
  1441.     property LineNumber: Integer read GetLineNumber write SetLineNumber;
  1442.     property PassCount: Integer read GetPassCount write SetPassCount;
  1443.   end;
  1444.  
  1445.   IOTABreakpoint = interface(IOTABreakpoint40)
  1446.     ['{569EFCFB-C69B-11D2-AC67-00C04FB173DC}']
  1447.     { Retrieves the Group Name }
  1448.     function GetGroupName: string;
  1449.     { Retrieves the Actions }
  1450.     function GetDoBreak: Boolean;
  1451.     { Retrieves the Message to Log }
  1452.     function GetLogMessage: string;
  1453.     { Retrieves the Expression to Evaluate }
  1454.     function GetEvalExpression: string;
  1455.     { Retrieves the LogResult flag }
  1456.     function GetLogResult: Boolean;
  1457.     { Retrieves the Group to Enable }
  1458.     function GetEnableGroup: string;
  1459.     { Retrieves the Group to Disable }
  1460.     function GetDisableGroup: string;
  1461.     { Sets the Group Name }
  1462.     procedure SetGroupName(const Value: string);
  1463.     { Sets the Actions }
  1464.     procedure SetDoBreak(const Value: Boolean);
  1465.     { Sets the Message to Log }
  1466.     procedure SetLogMessage(const Value: string);
  1467.     { Sets the Expression to Evaluate }
  1468.     procedure SetEvalExpression(const Value: string);
  1469.     { Sets the LogResult flag }
  1470.     procedure SetLogResult(const Value: Boolean);
  1471.     { Sets the Group to Enable }
  1472.     procedure SetEnableGroup(const Value: string);
  1473.     { Sets the Group to Disable }
  1474.     procedure SetDisableGroup(const Value: string);
  1475.     property GroupName: string read GetGroupName write SetGroupName;
  1476.     property DoBreak: Boolean read GetDoBreak write SetDoBreak;
  1477.     property LogMessage: string read GetLogMessage write SetLogMessage;
  1478.     property EvalExpression: string read GetEvalExpression write SetEvalExpression;
  1479.     property LogResult: Boolean read GetLogResult write SetLogResult;
  1480.     property EnableGroup: string read GetEnableGroup write SetEnableGroup;
  1481.     property DisableGroup: string read GetDisableGroup write SetDisableGroup;
  1482.   end;
  1483.  
  1484.   IOTASourceBreakpoint = interface(IOTABreakpoint)
  1485.     ['{09063877-E43A-11D1-AB0F-00C04FB16FB3}']
  1486.   end;
  1487.  
  1488.   IOTAAddressBreakpoint = interface(IOTABreakpoint)
  1489.     ['{09063878-E43A-11D1-AB0F-00C04FB16FB3}']
  1490.     { Returns the start address of this breakpoint in the current process,
  1491.       0 if not valid in the current process }
  1492.     function Address: LongWord;
  1493.     { Returns the start address of this breakpoint in the given process,
  1494.       0 if not valid in the given process }
  1495.     function AddressInProcess(Process: IOTAProcess): LongWord;
  1496.     { Returns the Access type Write or Execute }
  1497.     function GetAccessType: TOTAAccessType;
  1498.     { Returns the Data Expression if this is a DW Breakpoint, empty string if
  1499.       not }
  1500.     function GetDataExpr: string;
  1501.     { Returns the Size of the line if this address breakpoint was mapped to
  1502.       a source line }
  1503.     function GetLineSize: Integer;
  1504.     { Returns the Offset in the line if this address breakpoint was mapped to
  1505.       a source line }
  1506.     function GetLineOffset: Integer;
  1507.     { Returns the Process Module this BP will stop on the entry of if a Module
  1508.       LoadBP.  If this is a Data Watch BP, this is the Exe module name that
  1509.       this breakpoint is valid for. }
  1510.     function GetModuleName: string;
  1511.  
  1512.     property AccessType: TOTAAccessType read GetAccessType;
  1513.     property DataExpr: string read GetDataExpr;
  1514.     property ModuleName: string read GetModuleName;
  1515.     property LineSize: Integer read GetLineSize;
  1516.     property LineOffset: Integer read GetLineOffset;
  1517.   end;
  1518.  
  1519.   TOTANotifyReason = (nrOther, nrRunning, nrStopped, nrException, nrFault);
  1520.  
  1521.   IOTAThreadNotifier = interface(IOTANotifier)
  1522.     ['{34B2E2D7-E36F-11D1-AB0E-00C04FB16FB3}']
  1523.     { This is called when the process state changes for this thread }
  1524.     procedure ThreadNotify(Reason: TOTANotifyReason);
  1525.     { This is called when an evaluate that returned erDeferred completes.
  1526.       ReturnCode <> 0 if error }
  1527.     procedure EvaluteComplete(const ExprStr, ResultStr: string; CanModify: Boolean;
  1528.       ResultAddress, ResultSize: LongWord; ReturnCode: Integer);
  1529.     { This is called when a modify that returned erDeferred completes.
  1530.       ReturnCode <> 0 if error }
  1531.     procedure ModifyComplete(const ExprStr, ResultStr: string; ReturnCode: Integer);
  1532.   end;
  1533.  
  1534.   TOTAEvaluateResult = (erOK, erError, erDeferred);
  1535.   TOTAThreadState = (tsStopped, tsRunnable, tsBlocked, tsNone);
  1536.  
  1537.   IOTAThread = interface(IUnknown)
  1538.     ['{34B2E2D3-E36F-11D1-AB0E-00C04FB16FB3}']
  1539.     { Add an IOTAThreadNotifiter }
  1540.     function AddNotifier(const Notifier: IOTAThreadNotifier): Integer;
  1541.     { Evaluate the given expression.
  1542.       CanModify -        will be set to true if the expression can be modified.
  1543.       AllowSideEffects - indicates whether the evaluator is allowed to perform
  1544.                          any function calls in the running process in order to
  1545.                          complete the evaluation. This includes property access
  1546.                          methods.
  1547.       FormatSpecifiers - String indicating format overides. See IDE help for
  1548.                          definition
  1549.       ResultAddr       - Will be set if the expression evaluates to an address
  1550.                          within the process
  1551.       ResultSize       - Size of the expression. (ie. SizeOf(<sometype>)
  1552.  
  1553.       Function result will be erDeferred if the evaluator had to make a
  1554.       function call in the running process in order to finish the evaluation.
  1555.       The results are undefined in this case.  See the EvaluateComplete method
  1556.       on the IOTAThreadNotifier.  If the result is erError, the ResultStr may
  1557.       contain an error message. }
  1558.     function Evaluate(const ExprStr: string; ResultStr: PChar; ResultStrSize: LongWord;
  1559.       out CanModify: Boolean; AllowSideEffects: Boolean; FormatSpecifiers: PChar;
  1560.       out ResultAddr: LongWord; out ResultSize, ResultVal: LongWord): TOTAEvaluateResult;
  1561.     { Modify the last evaluated expression.
  1562.       ResultStr and ResultVal will be set the to the evaluated ValueStr values.
  1563.       Like Evalute, the result could be erDeferred. See the ModifyComplete
  1564.       method on the IOTAThreadNotifier.  If the result is erError then ResultStr
  1565.       may contain an error message. }
  1566.     function Modify(const ValueStr: string; ResultStr: PChar; ResultSize: LongWord;
  1567.       out ResultVal: Integer): TOTAEvaluateResult;
  1568.     { Return the number of Items on the call stack }
  1569.     function GetCallCount: Integer;
  1570.     { Return the evaluator generated string for the given stack index }
  1571.     function GetCallHeader(Index: Integer): string;
  1572.     { Return the source file name and line number of the given stack index }
  1573.     procedure GetCallPos(Index: Integer; out FileName: string; out LineNum: Integer);
  1574.     { If the process is stopped, return which file the process is stopped on in
  1575.       this thread.  The return string will be blank if no debug info is found at
  1576.       this location }
  1577.     function GetCurrentFile: string;
  1578.     { If the process is stopped, return the line number in the above file at
  1579.       which this process is stopped }
  1580.     function GetCurrentLine: LongWord;
  1581.     { Return the Current Thread context }
  1582.     function GetContext: TContext;
  1583.     { Return the OS Thread Handle }
  1584.     function GetHandle: THandle;
  1585.     { Return the OS Thread ID }
  1586.     function GetOSThreadID: LongWord;
  1587.     { Return the current thread State }
  1588.     function GetState: TOTAThreadState;
  1589.     { Remove the Index'd notifier }
  1590.     procedure RemoveNotifier(Index: Integer);
  1591.  
  1592.     property CallCount: Integer read GetCallCount;
  1593.     property CallHeaders[Index: Integer]: string read GetCallHeader;
  1594.     property CurrentFile: string read GetCurrentFile;
  1595.     property CurrentLine: LongWord read GetCurrentLine;
  1596.     property Context: TContext read GetContext;
  1597.     property Handle: THandle read GetHandle;
  1598.     property State: TOTAThreadState read GetState;
  1599.   end;
  1600.  
  1601.   IOTAProcessModNotifier = interface(IOTANotifier)
  1602.     ['{0906387A-E43A-11D1-AB0F-00C04FB16FB3}']
  1603.     { Modified is called as evaluator symbols for this module are loaded }
  1604.   end;
  1605.  
  1606.   IOTAProcessModule = interface(IUnknown)
  1607.     ['{09063879-E43A-11D1-AB0F-00C04FB16FB3}']
  1608.     { Adds an IOTAProcessModNotifier }
  1609.     function AddNotifier(const Notifier: IOTAProcessModNotifier): Integer;
  1610.     { Returns the number of Compilation Units that comprise this Process Module }
  1611.     function GetCompUnitCount: Integer;
  1612.     { Returns the index'd Compilation Unit Name }
  1613.     function GetCompUnit(Index: Integer): string;
  1614.     { Returns the number of files used to create the index'd compilation unit }
  1615.     function GetCompUnitFileCount(Index: Integer): Integer;
  1616.     { Returns the index'd filename of the index'd compilation unit }
  1617.     function GetCompUnitFileName(CompIndex, FileIndex: Integer): string;
  1618.     { Returns the address of the first code instruction for this module }
  1619.     function GetEntryPoint: LongWord;
  1620.     { Returns the Base Load address of the module }
  1621.     function GetBaseAddress: LongWord;
  1622.     { Returns the number of associated source files in this process module }
  1623.     function GetFileCount: Integer;
  1624.     { Return the index'd file }
  1625.     function GetFileName(Index: Integer): string;
  1626.     { Returns the number of entry points (procedure/functions/exports) in this
  1627.       Process Module }
  1628.     function GetModuleEntryPointCount: Integer;
  1629.     { Returns the index'd module entry point name }
  1630.     function GetModuleEntryPoint(Index: Integer): string;
  1631.     { Returns the index'd module entry point address }
  1632.     function GetModuleEntryPointAddress(Index: Integer): LongWord;
  1633.     { FileName of the Exe/Dll/Bpl, etc.. }
  1634.     function GetModuleFileName: string;
  1635.     { ModuleName of the Exe/Dll/Bpl, etc }
  1636.     function GetModuleName: string;
  1637.     { Removed the index's IOTAProcessModNotifier }
  1638.     procedure RemoveNotifier(Index: Integer);
  1639.  
  1640.     property CompUnitCount: Integer read GetCompUnitCount;
  1641.     property CompUnit[Index: Integer]: string read GetCompUnit;
  1642.     property CompUnitFileCount[Index: Integer]: Integer read GetCompUnitFileCount;
  1643.     property CompUnitFileName[CompIndex, FileIndex: Integer]: string read GetCompUnitFileName;
  1644.     property FileCount: Integer read GetFileCount;
  1645.     property FileNames[Index: Integer]: string read GetFileName;
  1646.     property ModuleEntryPointCount: Integer read GetModuleEntryPointCount;
  1647.     property ModuleEntryPoint[Index: Integer]: string read GetModuleEntryPoint;
  1648.     property ModuleEntryPointAddress[Index: Integer]: LongWord read GetModuleEntryPointAddress;
  1649.   end;
  1650.  
  1651.   IOTAProcessNotifier = interface(IOTANotifier)
  1652.     ['{34B2E2D6-E36F-11D1-AB0E-00C04FB16FB3}']
  1653.     { Called when a Thread is created }
  1654.     procedure ThreadCreated(Thread: IOTAThread);
  1655.     { Called when a Thread is Destroyed }
  1656.     procedure ThreadDestroyed(Thread: IOTAThread);
  1657.     { Called when a Process module is added }
  1658.     procedure ProcessModuleCreated(ProcessModule: IOTAProcessModule);
  1659.     { Called when a Process module is deleted }
  1660.     procedure ProcessModuleDestroyed(ProcessModule: IOTAProcessModule);
  1661.   end;
  1662.  
  1663.   IOTAProcess = interface(IUnknown)
  1664.     ['{34B2E2D2-E36F-11D1-AB0E-00C04FB16FB3}']
  1665.     { Adds an IOTAProcessNotifier }
  1666.     function AddNotifier(const Notifier: IOTAProcessNotifier): Integer;
  1667.     { Return the currently active thread }
  1668.     function GetCurrentThread: IOTAThread;
  1669.     { Return the number of Thread in this process }
  1670.     function GetThreadCount: Integer;
  1671.     { Return the index'd Thread }
  1672.     function GetThread(Index: Integer): IOTAThread;
  1673.     { Get the OS process ID }
  1674.     function GetProcessId: LongWord;
  1675.     { Stop/Pause the process }
  1676.     procedure Pause;
  1677.     { Read the process memory at the given addres }
  1678.     function ReadProcessMemory(Address: LongWord; Count: Integer; var Buffer): Integer;
  1679.     { Removed the index's IOTAProcessNotifier }
  1680.     procedure RemoveNotifier(Index: Integer);
  1681.     { Run the process give the run mode }
  1682.     procedure Run(RunMode: TOTARunMode);
  1683.     { Set a new current thread }
  1684.     procedure SetCurrentThread(Value: IOTAThread);
  1685.     { Reset/Terminate the process }
  1686.     procedure Terminate;
  1687.     { Write to the process memory at the given address }
  1688.     function WriteProcessMemory(Address: LongWord; Count: Integer; var Buffer): Integer;
  1689.  
  1690.     property CurrentThread: IOTAThread read GetCurrentThread write SetCurrentThread;
  1691.     property ProcessId: LongWord read GetProcessId;
  1692.     property ThreadCount: Integer read GetThreadCount;
  1693.     property Threads[Index: Integer]: IOTAThread read GetThread;
  1694.   end;
  1695.  
  1696.   IOTADebuggerNotifier = interface(IOTANotifier)
  1697.     ['{34B2E2D8-E36F-11D1-AB0E-00C04FB16FB3}']
  1698.     { Called when a process is created }
  1699.     procedure ProcessCreated(Process: IOTAProcess);
  1700.     { Called when a process is Destroyed }
  1701.     procedure ProcessDestroyed(Process: IOTAProcess);
  1702.     { Called when a Breakpoint is Added }
  1703.     procedure BreakpointAdded(Breakpoint: IOTABreakpoint);
  1704.     { Called when a breakpoint is Deleted }
  1705.     procedure BreakpointDeleted(Breakpoint: IOTABreakpoint);
  1706.   end;
  1707.  
  1708.   TEnumerateProcessesCallback = procedure (Pid: LongWord; const ProcessName: string; Param: Pointer);
  1709.  
  1710.   IOTADebuggerServices = interface(IUnknown)
  1711.     ['{0E3B9D7A-E119-11D1-AB0C-00C04FB16FB3}']
  1712.     { Adds an IOTADebuggerNotifier }
  1713.     function AddNotifier(const Notifier: IOTADebuggerNotifier): Integer;
  1714.     { Attaches to an existing process }
  1715.     procedure AttachProcess(Pid: Integer; const RemoteHost: string = '');
  1716.     { Creates a new process }
  1717.     procedure CreateProcess(const ExeName, Args: string; const RemoteHost: string = '');
  1718.     { Enumerates all the current running processes on the local machine or remote
  1719.       machine }
  1720.     procedure EnumerateRunningProcesses(Callback: TEnumerateProcessesCallback;
  1721.       Param: Pointer; const HostName: string = '');
  1722.     { Returns the count of address breakpoints }
  1723.     function GetAddressBkptCount: Integer;
  1724.     { Returns the index'd Address Breakpoint }
  1725.     function GetAddressBkpt(Index: Integer): IOTAAddressBreakpoint;
  1726.     { Returns the currently active process. This is set whenever a debug
  1727.       event occurs }
  1728.     function GetCurrentProcess: IOTAProcess;
  1729.     { Returns the number of active processes }
  1730.     function GetProcessCount: Integer;
  1731.     { Returns the Index'd process }
  1732.     function GetProcess(Index: Integer): IOTAProcess;
  1733.     { Returns the count of source breakpoints }
  1734.     function GetSourceBkptCount: Integer;
  1735.     { Returns the index'd source Breakpoint }
  1736.     function GetSourceBkpt(Index: Integer): IOTASourceBreakpoint;
  1737.     { Log event string to Event log window if present. }
  1738.     procedure LogString(const LogStr: string);
  1739.     { Creates a new Address breakpoint, will create a source BP if the
  1740.       address given is on a line boundary }
  1741.     function NewAddressBreakpoint(Address, Length: LongWord; AccessType: TOTAAccessType;
  1742.       AProcess: IOTAProcess = nil): IOTABreakpoint;
  1743.     { Creates a new Module load Breakpoint }
  1744.     function NewModuleBreakpoint(const ModuleName: string;
  1745.       AProcess: IOTAProcess): IOTABreakpoint;
  1746.     { Creates a new Source Breakpoint }
  1747.     function NewSourceBreakpoint(const FileName: string; LineNumber: Integer;
  1748.       AProcess: IOTAProcess): IOTABreakpoint;
  1749.     { Removed the index's IOTADebuggerNotifier }
  1750.     procedure RemoveNotifier(Index: Integer);
  1751.     { Sets the current process }
  1752.     procedure SetCurrentProcess(Process: IOTAProcess);
  1753.  
  1754.     property AddressBkptCount: Integer read GetAddressBkptCount;
  1755.     property AddressBkpts[Index: Integer]: IOTAAddressBreakpoint read GetAddressBkpt;
  1756.     property CurrentProcess: IOTAProcess read GetCurrentProcess write SetCurrentProcess;
  1757.     property ProcessCount: Integer read GetProcessCount;
  1758.     property Processes[Index: Integer]: IOTAProcess read GetProcess;
  1759.     property SourceBkptCount: Integer read GetSourceBkptCount;
  1760.     property SourceBkpts[Index: Integer]: IOTASourceBreakpoint read GetSourceBkpt;
  1761.   end;
  1762.  
  1763.   TOTAFileNotification = (ofnFileOpening, ofnFileOpened, ofnFileClosing,
  1764.     ofnDefaultDesktopLoad, ofnDefaultDesktopSave, ofnProjectDesktopLoad,
  1765.     ofnProjectDesktopSave, ofnPackageInstalled, ofnPackageUninstalled);
  1766.  
  1767.   IOTAIDENotifier = interface(IOTANotifier)
  1768.     ['{E052204F-ECE9-11D1-AB19-00C04FB16FB3}']
  1769.     { This procedure is called for many various file operations within the
  1770.       IDE }
  1771.     procedure FileNotification(NotifyCode: TOTAFileNotification;
  1772.       const FileName: string; var Cancel: Boolean);
  1773.     { This function is called immediatately before the compiler is invoked.
  1774.       Set Cancel to True to cancel the compile }
  1775.     procedure BeforeCompile(const Project: IOTAProject; var Cancel: Boolean); overload;
  1776.     { This procedure is called immediately following a compile.  Succeeded
  1777.       will be true if the compile was successful }
  1778.     procedure AfterCompile(Succeeded: Boolean); overload;
  1779.   end;
  1780.  
  1781.   IOTAIDENotifier50 = interface(IOTAIDENotifier)
  1782.     ['{AC7D29F1-D9A9-11D2-A8C1-00C04FA32F53}']
  1783.     { Same as BeforeCompile on IOTAIDENotifier except indicates if the compiler
  1784.       was invoked due to a CodeInsight compile }
  1785.     procedure BeforeCompile(const Project: IOTAProject; IsCodeInsight: Boolean;
  1786.       var Cancel: Boolean); overload;
  1787.     { Same as AfterCompile on IOTAIDENotifier except indicates if the compiler
  1788.       was invoked due to a CodeInsight compile }
  1789.     procedure AfterCompile(Succeeded: Boolean; IsCodeInsight: Boolean); overload;
  1790.      
  1791.   end;
  1792.  
  1793.   TWizardState = set of (wsEnabled, wsChecked);
  1794.  
  1795.   IOTAWizard = interface(IOTANotifier)
  1796.     ['{B75C0CE0-EEA6-11D1-9504-00608CCBF153}']
  1797.     { Expert UI strings }
  1798.     function GetIDString: string;
  1799.     function GetName: string;
  1800.     function GetState: TWizardState;
  1801.  
  1802.     { Launch the AddIn }
  1803.     procedure Execute;
  1804.   end;
  1805.  
  1806.   IOTARepositoryWizard = interface(IOTAWizard)
  1807.     ['{B75C0CE1-EEA6-11D1-9504-00608CCBF153}']
  1808.     function GetAuthor: string;
  1809.     function GetComment: string;
  1810.     function GetPage: string;
  1811.     function GetGlyph: HICON;
  1812.   end;
  1813.  
  1814.   IOTAFormWizard = interface(IOTARepositoryWizard)
  1815.     ['{36C8BF35-EFFE-11D1-AB1D-00C04FB16FB3}']
  1816.   end;
  1817.  
  1818.   IOTAProjectWizard = interface(IOTARepositoryWizard)
  1819.     ['{36C8BF36-EFFE-11D1-AB1D-00C04FB16FB3}']
  1820.   end;
  1821.  
  1822.   IOTAMenuWizard = interface(IOTAWizard)
  1823.     ['{B75C0CE2-EEA6-11D1-9504-00608CCBF153}']
  1824.     function GetMenuText: string;
  1825.   end;
  1826.  
  1827.   TWizardRegisterProc = function(const Wizard: IOTAWizard): Boolean;
  1828.   TWizardTerminateProc = procedure;
  1829.   TWizardInitProc = function(const BorlandIDEServices: IBorlandIDEServices;
  1830.     RegisterProc: TWizardRegisterProc;
  1831.     var Terminate: TWizardTerminateProc): Boolean stdcall;
  1832.  
  1833.   IOTAWizardServices = interface(IUnknown)
  1834.     ['{B75C0CE3-EEA6-11D1-9504-00608CCBF153}']
  1835.     { Call this to register an IOTAWizard interface }
  1836.     function AddWizard(const AWizard: IOTAWizard): Integer;
  1837.     { Remove the index'd Wizard }
  1838.     procedure RemoveWizard(Index: Integer);
  1839.   end;
  1840.  
  1841.   IOTAPackageServices = interface(IUnknown)
  1842.     ['{26EB0E4D-F97B-11D1-AB27-00C04FB16FB3}']
  1843.     { Returns the number of loaded packages }
  1844.     function GetPackageCount: Integer;
  1845.     { Returns the named of the loaded package }
  1846.     function GetPackageName(Index: Integer): string;
  1847.     { Returns the number of components registered by this package index }
  1848.     function GetComponentCount(PkgIndex: Integer): Integer;
  1849.     { Returns the component name of the package index }
  1850.     function GetComponentName(PkgIndex, CompIndex: Integer): string;
  1851.  
  1852.     property PackageCount: Integer read GetPackageCount;
  1853.     property PackageNames[Index: Integer]: string read GetPackageName;
  1854.     property ComponentCount[PkgIndex: Integer]: Integer read GetComponentCount;
  1855.     property ComponentNames[PkgIndex, CompIndex: Integer]: string read GetComponentName;
  1856.   end;
  1857.  
  1858.   IOTACustomMessage = interface(IUnknown)
  1859.     ['{589BBDA1-F995-11D1-AB27-00C04FB16FB3}']
  1860.     { Returns the Line number of the above file if the above file is given }
  1861.     function GetColumnNumber: Integer;
  1862.     { Returns a Fully qualified filename if this message line can navigate to a
  1863.       file line }
  1864.     function GetFileName: string;
  1865.     { Returns the Line number of the above file if the above file is given }
  1866.     function GetLineNumber: Integer;
  1867.     { Returns the Raw line text }
  1868.     function GetLineText: string;
  1869.     { F1 pressed on this line }
  1870.     procedure ShowHelp;
  1871.  
  1872.     property ColumnNumber: Integer read GetColumnNumber;
  1873.     property FileName: string read GetFilename;
  1874.     property LineNumber: Integer read GetLineNumber;
  1875.     property LineText: string read GetLineText;
  1876.   end;
  1877.  
  1878.   IOTACustomMessage50 = interface(IOTACustomMessage)
  1879.     ['{B7523AB7-EB81-11D2-AC7B-00C04FB173DC}']
  1880.     { Returns the number of child messages the current message has }
  1881.     function GetChildCount: Integer;
  1882.     { Returns the child message referred to by the Index paramater }
  1883.     function GetChild(Index: Integer): IOTACustomMessage50;
  1884.  
  1885.     property ChildCount: Integer read GetChildCount;
  1886.     property Child[Index: Integer]: IOTACustomMessage50 read GetChild;
  1887.   end;
  1888.  
  1889.   INTACustomDrawMessage = interface(IOTACustomMessage)
  1890.     ['{589BBDA2-F995-11D1-AB27-00C04FB16FB3}']
  1891.     procedure Draw(Canvas: TCanvas; const Rect: TRect; Wrap: Boolean);
  1892.     function CalcRect(Canvas: TCanvas; MaxWidth: Integer; Wrap: Boolean): TRect;
  1893.   end;
  1894.  
  1895.   IOTAMessageServices40 = interface(IUnknown)
  1896.     ['{26EB0E4E-F97B-11D1-AB27-00C04FB16FB3}']
  1897.     { This method allows the external tool to handle all painting of the
  1898.       message in a fashion similar to the "Find in files" messages.  If the
  1899.       INTACustomDrawMessage is implemented then all painting is deferred to that
  1900.       interface, otherwise the painting is handled internally }
  1901.     procedure AddCustomMessage(const CustomMsg: IOTACustomMessage);
  1902.     { This method adds a simple title message that simply displays in the
  1903.       message view with no other behavior }
  1904.     procedure AddTitleMessage(const MessageStr: string);
  1905.     { This method adds a line to the message buffer that behaves similar to the
  1906.       compiler error message lines.  It allows all the painting and other
  1907.       processing to be handled by the IDE.
  1908.       PrefixStr is usually a short string that indicates from which tool this
  1909.       message originates, for ex. 'Grep tool', which would display as
  1910.       '[Grep tool]' }
  1911.     procedure AddToolMessage(const FileName, MessageStr, PrefixStr: string;
  1912.       LineNumber, ColumnNumber: Integer);
  1913.     { Clears all messages from the message buffer }
  1914.     procedure ClearAllMessages;
  1915.     { Clears all "compiler/linker" messages }
  1916.     procedure ClearCompilerMessages;
  1917.     { Clears all "Find in files" messages }
  1918.     procedure ClearSearchMessages;
  1919.     { Clears all the externally defined messages }
  1920.     procedure ClearToolMessages;
  1921.   end;
  1922.  
  1923.   IOTAMessageServices = interface(IOTAMessageServices40)
  1924.     ['{3263774B-E959-11D2-AC7B-00C04FB173DC}']
  1925.     { See IOTAMessageServices40 for base description.  This method adds an out
  1926.       parameter (LineRef) which returns an opaque pointer to the Line object
  1927.       created, as well as a Parent.  If Parent is not nil, this method creates a
  1928.       new message which is a child message to an existing message (referred to
  1929.       by Parent).  A previously returned LineRef pointer should be passed as the
  1930.       Parent parameter to create a child message of the Parent. }
  1931.     procedure AddToolMessage(const FileName, MessageStr, PrefixStr: string;
  1932.       LineNumber, ColumnNumber: Integer; Parent: Pointer; out LineRef: Pointer); overload;
  1933.   end;
  1934.  
  1935.  
  1936.   IOTAEnvironmentOptions = interface(IOTAOptions)
  1937.     ['{9C0E91FB-FA5A-11D1-AB28-00C04FB16FB3}']
  1938.   end;
  1939.  
  1940.   INTAServices40 = interface(IUnknown)
  1941.     ['{3C7F3267-F0BF-11D1-AB1E-00C04FB16FB3}']
  1942.     { Adds an image to the IDE's main image list.  Use the return value as an
  1943.       image index for an action item added to the IDE's main action list. This
  1944.       method is deprecated in favor of the new AddMasked method on the
  1945.       INTAServices interface defined below }
  1946.     function AddMasked(Image: TBitmap; MaskColor: TColor): Integer; overload;
  1947.     { Returns the IDE's Main ActionList component }
  1948.     function GetActionList: TCustomActionList;
  1949.     { Returns the IDE's Main ImageList component }
  1950.     function GetImageList: TCustomImageList;
  1951.     { Returns the IDE's Main Menu component }
  1952.     function GetMainMenu: TMainMenu;
  1953.     { Returns the named Toolbar }
  1954.     function GetToolBar(const ToolBarName: string): TToolBar;
  1955.  
  1956.     property ActionList: TCustomActionList read GetActionList;
  1957.     property ImageList: TCustomImageList read GetImageList;
  1958.     property MainMenu: TMainMenu read GetMainMenu;
  1959.     property ToolBar[const ToolBarName: string]: TToolBar read GetToolBar;
  1960.   end;
  1961.  
  1962.   INTAServices = interface(INTAServices40)
  1963.     ['{C17B3DF1-DFE5-11D2-A8C7-00C04FA32F53}']
  1964.     { Adds an image to the IDE's main image list.  Use the return value as an
  1965.       image index for an action item added to the IDE's main action list.  Ident
  1966.       is used to identify dynamically added images that may already exist in the
  1967.       imagelist. Since images cannot be safely deleted without causing incorrect
  1968.       glyphs to be used for all subsequent images, this allows an add-in to be
  1969.       unloaded then reloaded in the same IDE session and still acquire the same
  1970.       image index }
  1971.     function AddMasked(Image: TBitmap; MaskColor: TColor; const Ident: string): Integer; overload;
  1972.      
  1973.   end;
  1974.  
  1975.   IOTAServices = interface(IUnknown)
  1976.     ['{7FD1CE91-E053-11D1-AB0B-00C04FB16FB3}']
  1977.     { General IDE event notifications }
  1978.     function AddNotifier(const Notifier: IOTAIDENotifier): Integer;
  1979.     { Remove the index'd notifier }
  1980.     procedure RemoveNotifier(Index: Integer);
  1981.     { Configuration Access }
  1982.     function GetBaseRegistryKey: string;
  1983.     { Returns the product Identifier, 'C++ Builder' or 'Delphi' }
  1984.     function GetProductIdentifier: string;
  1985.     { Main appliction handle }
  1986.     function GetParentHandle: HWND;
  1987.     { Return an interface to the IDE environment options }
  1988.     function GetEnvironmentOptions: IOTAEnvironmentOptions;
  1989.   end;
  1990.  
  1991.   IOTABufferOptions = interface(IUnknown)
  1992.     ['{8C748540-C6C1-11D2-8139-00609792F134}']
  1993.     function GetAutoIndent: Boolean;
  1994.     function GetBackspaceUnindents: Boolean;
  1995.     function GetCreateBackupFile: Boolean;
  1996.     function GetCursorThroughTabs: Boolean;
  1997.     function GetInsertMode: Boolean;
  1998.     function GetGroupUndo: Boolean;
  1999.     function GetKeepTrailingBlanks: Boolean;
  2000.     function GetLeftGutterWidth: Integer;
  2001.     function GetRightMargin: Integer;
  2002.     function GetOverwriteBlocks: Boolean;
  2003.     function GetPersistentBlocks: Boolean;
  2004.     function GetPreserveLineEnds: Boolean;
  2005.     function GetSmartTab: Boolean;
  2006.     function GetSyntaxHighlight: Boolean;
  2007.     function GetTabStops: string;
  2008.     function GetUndoAfterSave: Boolean;
  2009.     function GetUndoLimit: Integer;
  2010.     function GetUseTabCharacter: Boolean;
  2011.     procedure SetAutoIndent(Value: Boolean);
  2012.     procedure SetBackspaceUnindents(Value: Boolean);
  2013.     procedure SetCreateBackupFile(Value: Boolean);
  2014.     procedure SetCursorThroughTabs(Value: Boolean);
  2015.     procedure SetInsertMode(Value: Boolean);
  2016.     procedure SetGroupUndo(Value: Boolean);
  2017.     procedure SetKeepTrailingBlanks(Value: Boolean);
  2018.     procedure SetLeftGutterWidth(Value: Integer);
  2019.     procedure SetRightMargin(Value: Integer);
  2020.     procedure SetOverwriteBlocks(Value: Boolean);
  2021.     procedure SetPersistentBlocks(Value: Boolean);
  2022.     procedure SetPreserveLineEnds(Value: Boolean);
  2023.     procedure SetSmartTab(Value: Boolean);
  2024.     procedure SetSyntaxHighlight(Value: Boolean);
  2025.     procedure SetTabStops(const Value: string);
  2026.     procedure SetUndoAfterSave(Value: Boolean);
  2027.     procedure SetUndoLimit(Value: Integer);
  2028.     procedure SetUseTabCharacter(Value: Boolean);
  2029.  
  2030.     property AutoIndent: Boolean read GetAutoIndent write SetAutoIndent;
  2031.     property BackspaceUnindents: Boolean read GetBackspaceUnindents write SetBackspaceUnindents;
  2032.     property CreateBackupFile: Boolean read GetCreateBackupFile write SetCreateBackupFile;
  2033.     property CursorThroughTabs: Boolean read GetCursorThroughTabs write SetCursorThroughTabs;
  2034.     property InsertMode: Boolean read GetInsertMode write SetInsertMode;
  2035.     property GroupUndo: Boolean read GetGroupUndo write SetGroupUndo;
  2036.     property KeepTrailingBlanks: Boolean read GetKeepTrailingBlanks write SetKeepTrailingBlanks;
  2037.     property LeftGutterWidth: Integer read GetLeftGutterWidth write SetLeftGutterWidth;
  2038.     property RightMargin: Integer read GetRightMargin write SetRightMargin;
  2039.     property OverwriteBlocks: Boolean read GetOverwriteBlocks write SetOverwriteBlocks;
  2040.     property PersistentBlocks: Boolean read GetPersistentBlocks write SetPersistentBlocks;
  2041.     property PreserveLineEnds: Boolean read GetPreserveLineEnds write SetPreserveLineEnds;
  2042.     property SmartTab: Boolean read GetSmartTab write SetSmartTab;
  2043.     property SyntaxHighlight: Boolean read GetSyntaxHighlight write SetSyntaxHighlight;
  2044.     property TabStops: string read GetTabStops write SetTabStops;
  2045.     property UndoAfterSave: Boolean read GetUndoAfterSave write SetUndoAfterSave;
  2046.     property UndoLimit: Integer read GetUndoLimit write SetUndoLimit;
  2047.     property UseTabCharacter: Boolean read GetuseTabCharacter write SetUseTabCharacter;
  2048.   end;
  2049.  
  2050.   IOTAEditLineNotifier = interface(IOTANotifier)
  2051.     ['{D9D48F50-E6CC-11D2-ABE8-00C04FB16FB3}']
  2052.     procedure LineChanged(OldLine, NewLine: Integer; Data: Integer);
  2053.   end;
  2054.  
  2055.   IOTAEditLineTracker = interface(IUnknown)
  2056.     ['{D9D48F4F-E6CC-11D2-ABE8-00C04FB16FB3}']
  2057.     function AddNotifier(const Notifier: IOTAEditLineNotifier): Integer;
  2058.      
  2059.     procedure AddLine(Line: Integer; Data: Integer);
  2060.     procedure Delete(Index: Integer);
  2061.     function GetCount: Integer;
  2062.     function GetData(Index: Integer): Integer;
  2063.     function GetEditBuffer: IOTAEditBuffer;
  2064.     function GetLineNum(Index: Integer): Integer;
  2065.     function IndexOfLine(Line: Integer): Integer;
  2066.     function IndexOfData(Data: Integer): Integer;
  2067.     procedure RemoveNotifier(Index: Integer);
  2068.     procedure SetData(Index: Integer; Value: Integer);
  2069.     procedure SetLineNum(Index: Integer; Value: Integer);
  2070.  
  2071.     property Count: Integer read GetCount;
  2072.     property Data[Index: Integer]: Integer read GetData write SetData;
  2073.     property LineNum[Index: Integer]: Integer read GetLineNum write SetLineNum;
  2074.   end;
  2075.  
  2076.   IOTAEditBuffer = interface(IOTASourceEditor)
  2077.     ['{9C510460-C7BC-11D2-9AEB-00A02457621F}']
  2078.     procedure ClearUndo;
  2079.     function GetBufferOptions: IOTABufferOptions;
  2080.     function GetCurrentDate: TDateTime;
  2081.     function GetEditBlock: IOTAEditBlock;
  2082.     function GetEditLineTracker: IOTAEditLineTracker;
  2083.     function GetEditPosition: IOTAEditPosition;
  2084.     function GetInitialDate: TDateTime;
  2085.     function GetIsModified: Boolean;
  2086.     function GetIsReadOnly: Boolean;
  2087.     function GetTopView: IOTAEditView;
  2088.     function Print: Boolean;
  2089.     function Redo: Boolean;
  2090.     procedure SetIsReadOnly(Value: Boolean);
  2091.     function Undo: Boolean;
  2092.  
  2093.     property BufferOptions: IOTABufferOptions read GetBufferOptions;
  2094.     property EditBlock: IOTAEditBlock read GetEditBlock;
  2095.     property EditPosition: IOTAEditPosition read GetEditPosition;
  2096.     property IsModified: Boolean read GetIsModified;
  2097.     property IsReadOnly: Boolean read GetIsReadOnly write SetIsReadOnly;
  2098.     property TopView: IOTAEditView read GetTopView;
  2099.   end;
  2100.  
  2101.   IOTAEditBufferIterator = interface(IUnknown)
  2102.     ['{8ECB33AA-D0BD-11D2-ABD6-00C04FB16FB3}']
  2103.     function GetCount: Integer;
  2104.     function GetEditBuffer(Index: Integer): IOTAEditBuffer;
  2105.  
  2106.     property Count: Integer read GetCount;
  2107.     property EditBuffers[Index: Integer]: IOTAEditBuffer read GetEditBuffer;
  2108.   end;
  2109.  
  2110.   PKeyBindingRec = ^TKeyBindingRec;
  2111.   TKeyBindingRec = record
  2112.     KeyCode: TShortCut;
  2113.     KeyProc: TKeyBindingProc;
  2114.     Context: Pointer;
  2115.     Next: Integer;
  2116.     Reserved: Integer;
  2117.   end;
  2118.  
  2119.   IOTAKeyContext = interface(IUnknown)
  2120.     ['{3E7790CB-D2BB-11D2-ABD8-00C04FB16FB3}']
  2121.     function GetContext: Pointer;
  2122.     function GetEditBuffer: IOTAEditBuffer;
  2123.     function GetKeyboardServices: IOTAKeyboardServices;
  2124.     function GetKeyBindingRec(out BindingRec: TKeyBindingRec): Boolean;
  2125.  
  2126.     property Context: Pointer read GetContext;
  2127.     property EditBuffer: IOTAEditBuffer read GetEditBuffer;
  2128.     property KeyboardServices: IOTAKeyboardServices read GetKeyboardServices;
  2129.   end;
  2130.  
  2131.   IOTARecord = interface(IUnknown)
  2132.     ['{F8CAF8D6-D263-11D2-ABD8-00C04FB16FB3}']
  2133.     procedure Append(const Keys: array of TShortCut); overload;
  2134.     procedure Append(const CmdName: string; IsKeys: Boolean = True); overload;
  2135.     procedure Append(const ARecord: IOTARecord); overload;
  2136.     procedure Clear;
  2137.     function GetIsPaused: Boolean;
  2138.     function GetIsPlaying: Boolean;
  2139.     function GetIsRecording: Boolean;
  2140.     function GetName: string;
  2141.     procedure ReadFromStream(const Stream: IStream);
  2142.     procedure SetName(const Value: string);
  2143.     procedure WriteToStream(const Stream: IStream);
  2144.  
  2145.     property IsPaused: Boolean read GetIsPaused;
  2146.     property IsPlaying: Boolean read GetIsPlaying;
  2147.     property IsRecording: Boolean read GetIsRecording;
  2148.     property Name: string read GetName write SetName;
  2149.   end;
  2150.  
  2151.   TKeyBindingFlags = Integer;
  2152.  
  2153.   IOTAKeyBindingServices = interface(IUnknown)
  2154.     ['{F8CAF8D8-D263-11D2-ABD8-00C04FB16FB3}']
  2155.     function AddKeyBinding(const Keys: array of TShortCut; KeyProc: TKeyBindingProc;
  2156.       Context: Pointer; Flags: TKeyBindingFlags = kfImplicitShift or
  2157.       kfImplicitModifier or kfImplicitKeypad; const Keyboard: string = '';
  2158.       const HotKey: string = ''): Boolean;
  2159.     function AddMenuCommand(const Command: string; KeyProc: TKeyBindingProc;
  2160.       Context: Pointer): Boolean;
  2161.     procedure SetDefaultKeyProc(KeyProc: TKeyBindingProc; Context: Pointer;
  2162.       const Keyboard: string = '');
  2163.   end;
  2164.  
  2165.   IOTAKeyboardBinding = interface(IOTANotifier)
  2166.     ['{F8CAF8D7-D263-11D2-ABD8-00C04FB16FB3}']
  2167.     function GetBindingType: TBindingType;
  2168.     function GetDisplayName: string;
  2169.     function GetName: string;
  2170.     procedure BindKeyboard(const BindingServices: IOTAKeyBindingServices);
  2171.  
  2172.     property BindingType: TBindingType read GetBindingType;
  2173.     property DisplayName: string read GetDisplayName;
  2174.     property Name: string read GetName;
  2175.   end;
  2176.  
  2177.   IOTAKeyboardServices = interface(IUnknown)
  2178.     ['{F8CAF8D5-D263-11D2-ABD8-00C04FB16FB3}']
  2179.     function AddKeyboardBinding(const KeyBinding: IOTAKeyboardBinding): Integer;
  2180.     function GetCurrentPlayback: IOTARecord;
  2181.     function GetCurrentRecord: IOTARecord;
  2182.     function GetEditorServices: IOTAEditorServices;
  2183.     function GetKeysProcessed: LongWord;
  2184.     function NewRecordObject(out ARecord: IOTARecord): Boolean;
  2185.     procedure PausePlayback;
  2186.     procedure PauseRecord;
  2187.     procedure PopKeyboard(const Keyboard: string);
  2188.     function PushKeyboard(const Keyboard: string): string;
  2189.     procedure RestartKeyboardServices;
  2190.     procedure ResumePlayback;
  2191.     procedure ResumeRecord;
  2192.     procedure RemoveKeyboardBinding(Index: Integer);
  2193.     procedure SetPlaybackObject(const ARecord: IOTARecord);
  2194.     procedure SetRecordObject(const ARecord: IOTARecord);
  2195.     function LookupKeyBinding(const Keys: array of TShortCut;
  2196.       out BindingRec: TKeyBindingRec; const KeyBoard: string = ''): Boolean;
  2197.     function GetNextBindingRec(var BindingRec: TKeyBindingRec): Boolean;
  2198.     function CallKeyBindingProc(const BindingRec: TKeyBindingRec): TKeyBindingResult;
  2199.  
  2200.     property CurrentPlayback: IOTARecord read GetCurrentPlayback;
  2201.     property CurrentRecord: IOTARecord read GetCurrentRecord;
  2202.     property EditorServices: IOTAEditorServices read GetEditorServices;
  2203.     property KeysProcessed: LongWord read GetKeysProcessed;
  2204.   end;
  2205.  
  2206.   IOTAKeyboardDiagnostics = interface(IUnknown)
  2207.     ['{AEFC65F1-2504-11D3-AC25-00C04FB16FB3}']
  2208.     function GetKeyTracing: Boolean;
  2209.     procedure SetKeyTracing(Value: Boolean);
  2210.  
  2211.     property KeyTracing: Boolean read GetKeyTracing write SetKeyTracing;
  2212.   end;
  2213.  
  2214.   IOTASpeedSetting = interface(IOTANotifier)
  2215.     ['{B5CDCE07-E093-11D2-ABE2-00C04FB16FB3}']
  2216.     function GetDisplayName: string;
  2217.     function GetName: string;
  2218.     procedure ExecuteSetting(const EditOptions: IOTAEditOptions);
  2219.  
  2220.     property DisplayName: string read GetDisplayName;
  2221.     property Name: string read GetName;
  2222.   end;
  2223.  
  2224.   IOTAEditOptions = interface(IUnknown)
  2225.     ['{487BEA91-DBC0-11D2-ABDE-00C04FB16FB3}']
  2226.     function AddSpeedSetting(const SpeedSetting: IOTASpeedSetting): Integer;
  2227.  
  2228.     procedure BeginUpdate;
  2229.     procedure EndUpdate;
  2230.     function GetBlockIndent: Integer;
  2231.     function GetBufferOptions: IOTABufferOptions;
  2232.     function GetFontName: string;
  2233.     function GetFontSize: Integer;
  2234.     function GetForceCutCopyEnabled: Boolean;
  2235.     function GetSpeedSettingCount: Integer;
  2236.     function GetSpeedSetting(Index: Integer): IOTASpeedSetting;
  2237.     function GetSyntaxHighlightTypes(Index: TOTASyntaxHighlighter): string;
  2238.      
  2239.     function GetUseBriefCursorShapes: Boolean;
  2240.     function GetUseBriefRegularExpressions: Boolean;
  2241.     procedure RemoveSpeedSetting(Index: Integer);
  2242.     procedure SetBlockIndent(Value: Integer);
  2243.     procedure SetFontName(const Value: string);
  2244.     procedure SetFontSize(Value: Integer);
  2245.     procedure SetForceCutCopyEnabled(Value: Boolean);
  2246.     procedure SetSpeedSetting(const Name: string);
  2247.     procedure SetSyntaxHighlightTypes(Index: TOTASyntaxHighlighter; const Value: string);
  2248.      
  2249.     procedure SetUseBriefCursorShapes(Value: Boolean);
  2250.     procedure SetUseBriefRegularExpressions(Value: Boolean);
  2251.  
  2252.     property BlockIndent: Integer read GetBlockIndent write SetBlockIndent;
  2253.     property BufferOptions: IOTABufferOptions read GetBufferOptions;
  2254.     property FontName: string read GetFontName write SetFontName;
  2255.     property FontSize: Integer read GetFontSize write SetFontSize;
  2256.     property ForceCutCopyEnabled: Boolean read GetForceCutCopyEnabled
  2257.       write SetForceCutCopyEnabled;
  2258.     property SpeedSettingCount: Integer read GetSpeedSettingCount;
  2259.     property SpeedSettings[Index: Integer]: IOTASpeedSetting read GetSpeedSetting;
  2260.     property SyntaxHighlightTypes[Index: TOTASyntaxHighlighter]: string
  2261.       read GetSyntaxHighlightTypes write SetSyntaxHighlightTypes;
  2262.     property UseBriefCursorShapes: Boolean read GetUseBriefCursorShapes
  2263.       write SetUseBriefCursorShapes;
  2264.     property UseBriefRegularExpressions: Boolean read GetUseBriefRegularExpressions
  2265.       write SetUseBriefRegularExpressions;
  2266.   end;
  2267.  
  2268.   IOTAEditorServices = interface(IUnknown)
  2269.     ['{C2812BA7-C48D-11D2-9AE8-00A02457621F}']
  2270.     function GetEditOptions: IOTAEditOptions;
  2271.     function GetEditBufferIterator(out Iterator: IOTAEditBufferIterator): Boolean;
  2272.     function GetKeyboardServices: IOTAKeyboardServices;
  2273.     function GetTopBuffer: IOTAEditBuffer;
  2274.     function GetTopView: IOTAEditView;
  2275.  
  2276.     property EditOptions: IOTAEditOptions read GetEditOptions;
  2277.     property KeyboardServices: IOTAKeyboardServices read GetKeyboardServices;
  2278.     property TopBuffer: IOTAEditBuffer read GetTopBuffer;
  2279.     property TopView: IOTAEditView read GetTopView;
  2280.   end;
  2281.  
  2282.   INTAToDoItem = interface(IUnknown)
  2283.   ['{094003D8-E7AA-11D2-AA99-00C04FA35CE8}']
  2284.     { Implement this interface on items returned by a registered IOTAToDoManager.
  2285.       This interface is also returned by IOTAToDoServices.GetItem to allow read
  2286.       access to the IDE's To-Do List. }
  2287.  
  2288.     { CanDelete returns true to enable "Delete" on the To-Do List's local menu when this item
  2289.       is selected. }
  2290.     function  CanDelete: Boolean;
  2291.     { CanEdit returns true to enable "Edit" on the To-Do List's local menu when this item
  2292.       is selected. }
  2293.     function  CanEdit: Boolean;
  2294.     { CanShow returns true to enable "Open" on the To-Do List's local menu when this item
  2295.       is selected. }
  2296.     function  CanShow: Boolean;
  2297.     { Delete is called when the item has been selected for deletion by the user. }
  2298.     procedure Delete;
  2299.     { DrawImage draws an image representing the item in the To-Do List window. }
  2300.     procedure DrawImage(const Canvas: TCanvas; const Rect: TRect);
  2301.     { DoubleClicked indicates the user has double-clicked the item in the To-Do List window. }
  2302.     procedure DoubleClicked;
  2303.     procedure Edit;
  2304.     function  GetText: string;
  2305.     function  GetPriority: TOTAToDoPriority;
  2306.     function  GetCategory: string;
  2307.     function  GetChecked: Boolean;
  2308.     { GetModuleName returns the string shown in the "Module" column of the To-Do List
  2309.       window. }
  2310.     function  GetModuleName: string;
  2311.     { GetKind returns a unique string indicating the origin of the item. It is also used
  2312.       as the caption for submenu items of the "Filter" local menu. }
  2313.     function  GetKind: string;
  2314.     function  GetData: Integer;
  2315.     function  GetOwner: string;
  2316.     { IsValid indicates when the item has been completely defined (when processing
  2317.       items in a separate thread). }
  2318.     function  IsValid: Boolean;
  2319.     procedure SetChecked(const Value: Boolean);
  2320.     { Show is called to make the item's source visible; i.e., for an item culled
  2321.       from source code, Show opens the source file in the editor. }
  2322.     procedure Show;
  2323.  
  2324.     property  Checked: Boolean read GetChecked write SetChecked;
  2325.  end;
  2326.  
  2327.   IOTAToDoManager = interface(IUnknown)
  2328.   ['{3D4A0565-EB77-11D2-AA9A-00C04FA35CE8}']
  2329.     { Implement IOTAToDoManager on a TInterfacedObject; register with IOTAToDoServices
  2330.       to add To-Do items to the list. The Manager is basically just a list of
  2331.       INTAToDoItem interfaces; INTAToDoItem methods will be called when the To-Do List
  2332.       needs to display information, paint the item's representation in the list,
  2333.       inquire about status of an item. Not all INTAToDoItems may be added to the IDE's
  2334.       list; if the user has requested not to see items with a given attribute
  2335.       (i.e., Checked or of a certain type), they will not be added to the displayed
  2336.       To-Do list. }
  2337.  
  2338.     { The Name property is used to uniquely identify To-Do Item managers. }
  2339.     function  GetName: string;
  2340.     procedure SetName(const AName: string);
  2341.     function  GetItem(Index: Integer): INTAToDoItem;
  2342.     function  GetItemCount: Integer;
  2343.     { ProjectChanged is called when the active project has been changed. }
  2344.     procedure ProjectChanged;
  2345.     property  Name: string read GetName write SetName;
  2346.     property  ItemCount: Integer read GetItemCount;
  2347.     property  Items[Index: Integer]: INTAToDoItem read GetItem;
  2348.   end;
  2349.  
  2350.   IOTAToDoServices = interface(IUnknown)
  2351.     ['{F8FC00EF-E61A-11D2-AA99-00C04FA35CE8}']
  2352.     function  AddManager(AManager: IOTAToDoManager): Integer;
  2353.     function  AddNotifier(const ANotifier: IOTANotifier): Integer;
  2354.     { GetItem returns an item in the To-Do list, including those belonging to add-in
  2355.       managers. }
  2356.     function  GetItem(Index: Integer): INTAToDoItem;
  2357.     { Returns the total number of visible To-Do items in the To-Do List, including
  2358.       those belonging to add-in managers. }
  2359.     function  GetItemCount: Integer;
  2360.     procedure RemoveManager(Index: Integer);
  2361.     procedure RemoveNotifier(Index: Integer);
  2362.     { UpdateList causes the To-Do List to collate all items provided by its managers.
  2363.       Note that it will force the To-Do List to call every registered manager to
  2364.       query the state of all its items. }
  2365.     procedure UpdateList;
  2366.     property ItemCount: Integer read GetItemCount;
  2367.     property Items[Index: Integer]: INTAToDoItem read GetItem;
  2368.   end;
  2369.  
  2370.  
  2371.   IBorlandIDEServices = interface(IUnknown)
  2372.     ['{7FD1CE92-E053-11D1-AB0B-00C04FB16FB3}']
  2373.   end;
  2374.  
  2375.   { This class serves as a stubbed implementation of the IOTANotifer interface.
  2376.     simply statically override the methods you intend to implement and redeclare
  2377.     IOTANotifier or descendent.  The most common overrides would probably be,
  2378.     Destroyed and Modified.  Some Subsystems do *not* call all methods since in
  2379.     some cases there is not such operation. This object does not exist for
  2380.     C++Builder since these interfaces are used directly as pure virtual COM-style
  2381.     classes. }
  2382.  
  2383.   TNotifierObject = class(TInterfacedObject)
  2384.   public
  2385.     procedure AfterSave;
  2386.     procedure BeforeSave;
  2387.     procedure Destroyed;
  2388.     procedure Modified;
  2389.   end;
  2390.   {$NODEFINE TNotifierObject}
  2391.  
  2392. var
  2393.  (* The BorlandIDEServices global variable is initialized by the Delphi or
  2394.     C++Builder IDE.  From this interface all of the IxxxxServices interfaces
  2395.     may be queried for.  For example, in order to obtain the IOTAModuleServices
  2396.     interface, simply call the QueryInterface method with the interface
  2397.     identifier or the GUID for the IOTAModuleServices interface.  In Delphi, you
  2398.     could also use the "as" operator, however not all versions of the IDEs will
  2399.     support all the "services" interfaces.  IOTATodoServices is only supported
  2400.     in the Professional and Enterprise versions of the products.
  2401.  
  2402.     In Delphi;
  2403.       var
  2404.         ModuleServices: IOTAModuleServices;
  2405.  
  2406.       ...
  2407.  
  2408.       if BorlandIDEServices.QueryInterface(IOTAModuleServices, ModuleServices) = S_OK then
  2409.       begin
  2410.         ...
  2411.       end;
  2412.  
  2413.     or in C++BUilder;
  2414.  
  2415.       IOTAModuleServices *ModuleServices;
  2416.       if (BorlandIDEServices->QueryInterface(__uuidof(IOTAModuleServices), &ModuleServices) == S_OK)
  2417.       {
  2418.         ...
  2419.       }
  2420.   *)
  2421.   BorlandIDEServices: IBorlandIDEServices;
  2422.   LibraryWizardProc: TWizardRegisterProc = nil;
  2423.  
  2424. procedure RegisterPackageWizard(const Wizard: IOTAWizard);
  2425.  
  2426. implementation
  2427.  
  2428.  
  2429. procedure RegisterPackageWizard(const Wizard: IOTAWizard);
  2430. begin
  2431.   if Assigned(LibraryWizardProc) then
  2432.     LibraryWizardProc(Wizard);
  2433. end;
  2434.  
  2435. { TNotifierObject }
  2436.  
  2437. procedure TNotifierObject.AfterSave;
  2438. begin
  2439.   // do nothing stub implementation
  2440. end;
  2441.  
  2442. procedure TNotifierObject.BeforeSave;
  2443. begin
  2444.   // do nothing stub implementation
  2445. end;
  2446.  
  2447. procedure TNotifierObject.Destroyed;
  2448. begin
  2449.   // do nothing stub implementation
  2450. end;
  2451.  
  2452. procedure TNotifierObject.Modified;
  2453. begin
  2454.   // do nothing stub implementation
  2455. end;
  2456.  
  2457. end.
  2458.