home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / progs / CB / DATA.Z / TOOLINTF.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-06  |  9.6 KB  |  206 lines

  1. //----------------------------------------------------------------------------
  2. // ToolIntf.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
  3. // From: ToolIntf.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef ToolIntfHPP
  6. #define ToolIntfHPP
  7. //----------------------------------------------------------------------------
  8. #ifndef FileIntfHPP
  9. #include <FileIntf.hpp>
  10. #endif
  11.  
  12. #ifndef EditIntfHPP
  13. #include <EditIntf.hpp>
  14. #endif
  15.  
  16. #ifndef VirtIntfHPP
  17. #include <VirtIntf.hpp>
  18. #endif
  19.  
  20. #ifndef ClassesHPP
  21. #include <Classes.hpp>
  22. #endif
  23.  
  24. #ifndef WindowsHPP
  25. #include <Windows.hpp>
  26. #endif
  27.  
  28. #ifndef SystemHPP
  29. #include <System.hpp>
  30. #endif
  31.  
  32. namespace Toolintf
  33. {
  34. //-- type declarations -------------------------------------------------------
  35. enum TIMenuFlag { mfInvalid, mfEnabled, mfVisible, mfChecked, mfBreak, mfBarBreak, mfRadioItem };
  36.  
  37. typedef Set<TIMenuFlag, mfInvalid, mfRadioItem>  TIMenuFlags;
  38.  
  39. class __declspec(delphiclass) TIMenuItemIntf;
  40. typedef void __fastcall (__closure *TIMenuClickEvent)(TIMenuItemIntf *Sender);
  41.  
  42. class __declspec(pascalimplementation) TIMenuItemIntf : public Virtintf::TInterface
  43. {
  44.     typedef TIMenuItemIntf ThisClass;
  45.     typedef Virtintf::TInterface inherited;
  46.     
  47. public:
  48.     virtual System::Boolean __stdcall DestroyMenuItem(void) = 0;
  49.     virtual System::Integer __stdcall GetIndex(void) = 0;
  50.     virtual System::Integer __stdcall GetItemCount(void) = 0;
  51.     virtual TIMenuItemIntf *__stdcall GetItem(System::Integer Index) = 0;
  52.     virtual System::AnsiString __stdcall GetName(void) = 0;
  53.     virtual TIMenuItemIntf *__stdcall GetParent(void) = 0;
  54.     virtual System::AnsiString __stdcall GetCaption(void) = 0;
  55.     virtual System::Boolean __stdcall SetCaption(const System::AnsiString Caption) = 0;
  56.     virtual System::Integer __stdcall GetShortCut(void) = 0;
  57.     virtual System::Boolean __stdcall SetShortCut(System::Integer ShortCut) = 0;
  58.     virtual TIMenuFlags __stdcall GetFlags(void) = 0;
  59.     virtual System::Boolean __stdcall SetFlags( TIMenuFlags Mask,  TIMenuFlags Flags) = 0;
  60.     virtual System::Integer __stdcall GetGroupIndex(void) = 0;
  61.     virtual System::Boolean __stdcall SetGroupIndex(System::Integer GroupIndex) = 0;
  62.     virtual System::AnsiString __stdcall GetHint(void) = 0;
  63.     virtual System::Boolean __stdcall SetHint( System::AnsiString Hint) = 0;
  64.     virtual System::Integer __stdcall GetContext(void) = 0;
  65.     virtual System::Boolean __stdcall SetContext(System::Integer Context) = 0;
  66.     virtual TIMenuClickEvent __stdcall GetOnClick(void) = 0;
  67.     virtual System::Boolean __stdcall SetOnClick(TIMenuClickEvent Click) = 0;
  68.     virtual TIMenuItemIntf *__stdcall InsertItem(System::Integer Index,  System::AnsiString Caption,  System::AnsiString 
  69.         Name,  System::AnsiString Hint, System::Integer ShortCut, System::Integer Context, System::Integer 
  70.         GroupIndex,  TIMenuFlags Flags, TIMenuClickEvent EventHandler) = 0;
  71. public:
  72.     /* !! TInterface.Create */ __fastcall TIMenuItemIntf(void) : Virtintf::TInterface() { }
  73.     
  74. public:
  75.     /* !! TObject.Destroy */ __fastcall virtual ~TIMenuItemIntf(void) { }
  76.     
  77. };
  78.  
  79. class __declspec(delphiclass) TIMainMenuIntf;
  80. class __declspec(pascalimplementation) TIMainMenuIntf : public Virtintf::TInterface
  81. {
  82.     typedef TIMainMenuIntf ThisClass;
  83.     typedef Virtintf::TInterface inherited;
  84.     
  85. public:
  86.     virtual TIMenuItemIntf *__stdcall GetMenuItems(void) = 0;
  87.     virtual TIMenuItemIntf *__stdcall FindMenuItem(const System::AnsiString Name) = 0;
  88. public:
  89.     /* !! TInterface.Create */ __fastcall TIMainMenuIntf(void) : Virtintf::TInterface() { }
  90.     
  91. public:
  92.     /* !! TObject.Destroy */ __fastcall virtual ~TIMainMenuIntf(void) { }
  93.     
  94. };
  95.  
  96. enum TFileNotification { fnFileOpening, fnFileOpened, fnFileClosing, fnProjectOpening, fnProjectOpened, 
  97.     fnProjectClosing, fnAddedToProject, fnRemovedFromProject, fnDefaultDesktopLoad, fnDefaultDesktopSave, 
  98.     fnProjectDesktopLoad, fnprojectDesktopSave };
  99.  
  100. class __declspec(delphiclass) TIAddInNotifier;
  101. class __declspec(pascalimplementation) TIAddInNotifier : public Virtintf::TInterface
  102. {
  103.     typedef TIAddInNotifier ThisClass;
  104.     typedef Virtintf::TInterface inherited;
  105.     
  106. public:
  107.     virtual void __stdcall FileNotification(TFileNotification NotifyCode, const System::AnsiString FileName
  108.         , System::Boolean &Cancel) = 0;
  109. public:
  110.     /* !! TInterface.Create */ __fastcall TIAddInNotifier(void) : Virtintf::TInterface() { }
  111.     
  112. public:
  113.     /* !! TObject.Destroy */ __fastcall virtual ~TIAddInNotifier(void) { }
  114.     
  115. };
  116.  
  117. enum TCreateModuleFlag { cmAddToProject, cmShowSource, cmShowForm, cmUnNamed, cmNewUnit, cmNewForm, 
  118.     cmMainForm, cmMarkModified, cmNewFile, cmExisting };
  119.  
  120. typedef Set<TCreateModuleFlag, cmAddToProject, cmExisting>  TCreateModuleFlags;
  121.  
  122. typedef System::Boolean __stdcall (*TProjectEnumProc)(System::Pointer Param, const System::AnsiString 
  123.     FileName, const System::AnsiString UnitName, const System::AnsiString FormName);
  124.  
  125. class __declspec(delphiclass) TIToolServices;
  126. class __declspec(pascalimplementation) TIToolServices : public Virtintf::TInterface
  127. {
  128.     typedef TIToolServices ThisClass;
  129.     typedef Virtintf::TInterface inherited;
  130.     
  131. public:
  132.     virtual System::Boolean __stdcall CloseProject(void) = 0;
  133.     virtual System::Boolean __stdcall OpenProject(const System::AnsiString ProjName) = 0;
  134.     virtual System::Boolean __stdcall OpenProjectInfo(const System::AnsiString ProjName) = 0;
  135.     virtual System::Boolean __stdcall SaveProject(void) = 0;
  136.     virtual System::Boolean __stdcall CloseFile(const System::AnsiString FileName) = 0;
  137.     virtual System::Boolean __stdcall SaveFile(const System::AnsiString FileName) = 0;
  138.     virtual System::Boolean __stdcall OpenFile(const System::AnsiString FileName) = 0;
  139.     virtual System::Boolean __stdcall ReloadFile(const System::AnsiString FileName) = 0;
  140.     virtual System::Integer __stdcall ModalDialogBox(System::Integer Instance, System::PChar TemplateName
  141.         , System::Integer WndParent, System::Pointer DialogFunc, System::Longint InitParam) = 0;
  142.     virtual System::Boolean __stdcall CreateModule(const System::AnsiString ModuleName, Virtintf::TIStream *
  143.         Source, Virtintf::TIStream *Form,  TCreateModuleFlags CreateFlags) = 0;
  144.     virtual Editintf::TIModuleInterface *__stdcall CreateModuleEx(const System::AnsiString ModuleName, 
  145.         const System::AnsiString FormName, const System::AnsiString AncestorClass, const System::AnsiString 
  146.         FileSystem, Virtintf::TIStream *Source, Virtintf::TIStream *Form,  TCreateModuleFlags CreateFlags)
  147.          = 0;
  148.     virtual System::Integer __stdcall GetParentHandle(void) = 0;
  149.     virtual System::AnsiString __stdcall GetProjectName(void) = 0;
  150.     virtual System::Integer __stdcall GetUnitCount(void) = 0;
  151.     virtual System::AnsiString __stdcall GetUnitName(System::Integer Index) = 0;
  152.     virtual System::Boolean __stdcall EnumProjectUnits(TProjectEnumProc EnumProc, System::Pointer Param
  153.         ) = 0;
  154.     virtual System::Integer __stdcall GetFormCount(void) = 0;
  155.     virtual System::AnsiString __stdcall GetFormName(System::Integer Index) = 0;
  156.     virtual System::AnsiString __stdcall GetCurrentFile(void) = 0;
  157.     virtual System::Boolean __stdcall IsFileOpen(const System::AnsiString FileName) = 0;
  158.     virtual System::Boolean __stdcall GetNewModuleName( System::AnsiString &UnitIdent,  System::AnsiString &
  159.         FileName) = 0;
  160.     virtual System::Integer __stdcall GetModuleCount(void) = 0;
  161.     virtual System::AnsiString __stdcall GetModuleName(System::Integer Index) = 0;
  162.     virtual System::Integer __stdcall GetComponentCount(System::Integer ModIndex) = 0;
  163.     virtual System::AnsiString __stdcall GetComponentName(System::Integer ModIndex, System::Integer CompIndex
  164.         ) = 0;
  165.     virtual System::Boolean __stdcall RegisterFileSystem(Fileintf::TIVirtualFileSystem *AVirtualFileSystem
  166.         ) = 0;
  167.     virtual System::Boolean __stdcall UnRegisterFileSystem(const System::AnsiString Ident) = 0;
  168.     virtual Fileintf::TIVirtualFileSystem *__stdcall GetFileSystem(const System::AnsiString Ident) = 0;
  169.         
  170.     virtual Editintf::TIModuleInterface *__stdcall GetModuleInterface(const System::AnsiString FileName
  171.         ) = 0;
  172.     virtual Editintf::TIModuleInterface *__stdcall GetFormModuleInterface(const System::AnsiString FormName
  173.         ) = 0;
  174.     virtual TIMainMenuIntf *__stdcall GetMainMenu(void) = 0;
  175.     virtual System::Boolean __stdcall AddNotifier(TIAddInNotifier *AddInNotifier) = 0;
  176.     virtual System::Boolean __stdcall RemoveNotifier(TIAddInNotifier *AddInNotifier) = 0;
  177.     virtual System::Pointer __stdcall NewPascalString(System::PChar Str) = 0;
  178.     virtual void __stdcall FreePascalString(System::Pointer &Str) = 0;
  179.     virtual void __stdcall ReferencePascalString(System::Pointer &Str) = 0;
  180.     virtual void __stdcall AssignPascalString(System::Pointer &Dest, System::Pointer &Src) = 0;
  181.     virtual void __stdcall RaiseException(const System::AnsiString Message) = 0;
  182.     virtual System::AnsiString __stdcall GetBaseRegistryKey(void) = 0;
  183.     virtual Editintf::TIModuleInterface *__stdcall CreateProntoModule(const System::AnsiString ModuleName
  184.         , const System::AnsiString FormName, const System::AnsiString AncestorClass, const System::AnsiString 
  185.         FileSystem, Virtintf::TIStream *HdrSource, Virtintf::TIStream *Source, Virtintf::TIStream *Form,  TCreateModuleFlags 
  186.         CreateFlags) = 0;
  187. public:
  188.     /* !! TInterface.Create */ __fastcall TIToolServices(void) : Virtintf::TInterface() { }
  189.     
  190. public:
  191.     /* !! TObject.Destroy */ __fastcall virtual ~TIToolServices(void) { }
  192.     
  193. };
  194.  
  195. //-- var, const, procedure ---------------------------------------------------
  196. //-- template instantiations -------------------------------------------------
  197. template class TCreateModuleFlags ;
  198. template class TIMenuFlags ;
  199.  
  200. }    /* namespace Toolintf */
  201. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  202. using namespace Toolintf;
  203. #endif
  204. //-- end unit ----------------------------------------------------------------
  205. #endif    // ToolIntf
  206.