home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / ahmsyscm / _setup.1 / AHMTOnlyOne.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-12  |  3.4 KB  |  90 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'AHMTOnlyOne.pas' rev: 3.00
  6.  
  7. #ifndef AHMTOnlyOneHPP
  8. #define AHMTOnlyOneHPP
  9. #include <AHMSystem.hpp>
  10. #include <Forms.hpp>
  11. #include <Classes.hpp>
  12. #include <Messages.hpp>
  13. #include <SysUtils.hpp>
  14. #include <Windows.hpp>
  15. #include <SysInit.hpp>
  16. #include <System.hpp>
  17.  
  18. //-- user supplied -----------------------------------------------------------
  19.  
  20. namespace Ahmtonlyone
  21. {
  22. //-- type declarations -------------------------------------------------------
  23. typedef void __fastcall (__closure *TAHMOnExceeded)(System::TObject* Sender, int NoOfInstances);
  24.  
  25. enum TAHMAction { aRestoreAndExit, aRestore, aExit, aNone };
  26.  
  27. class DELPHICLASS EAHMDuplicateError;
  28. class PASCALIMPLEMENTATION EAHMDuplicateError : public Sysutils::Exception 
  29. {
  30.     typedef Sysutils::Exception inherited;
  31.     
  32. public:
  33.     /* Exception.Create */ __fastcall EAHMDuplicateError(const System::AnsiString Msg) : Sysutils::Exception(
  34.         Msg) { }
  35.     /* Exception.CreateFmt */ __fastcall EAHMDuplicateError(const System::AnsiString Msg, const System::TVarRec 
  36.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  37.     /* Exception.CreateRes */ __fastcall EAHMDuplicateError(int Ident, Extended Dummy) : Sysutils::Exception(
  38.         Ident, Dummy) { }
  39.     /* Exception.CreateResFmt */ __fastcall EAHMDuplicateError(int Ident, const System::TVarRec * Args, 
  40.         const int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  41.     /* Exception.CreateHelp */ __fastcall EAHMDuplicateError(const System::AnsiString Msg, int AHelpContext
  42.         ) : Sysutils::Exception(Msg, AHelpContext) { }
  43.     /* Exception.CreateFmtHelp */ __fastcall EAHMDuplicateError(const System::AnsiString Msg, const System::TVarRec 
  44.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  45.         ) { }
  46.     /* Exception.CreateResHelp */ __fastcall EAHMDuplicateError(int Ident, int AHelpContext) : Sysutils::
  47.         Exception(Ident, AHelpContext) { }
  48.     /* Exception.CreateResFmtHelp */ __fastcall EAHMDuplicateError(int Ident, const System::TVarRec * Args
  49.         , const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
  50.         ) { }
  51.     
  52. public:
  53.     /* TObject.Destroy */ __fastcall virtual ~EAHMDuplicateError(void) { }
  54.     
  55. };
  56.  
  57. class DELPHICLASS TAHMOnlyOne;
  58. class PASCALIMPLEMENTATION TAHMOnlyOne : public Ahmsystem::TAHMSystemsComponent 
  59. {
  60.     typedef Ahmsystem::TAHMSystemsComponent inherited;
  61.     
  62. private:
  63.     Byte FInstances;
  64.     TAHMAction FOnExceed;
  65.     TAHMOnExceeded FOnExceeded;
  66.     
  67. protected:
  68.     void __fastcall CheckPrevInstances(void);
  69.     
  70. public:
  71.     __fastcall virtual TAHMOnlyOne(Classes::TComponent* AOwner);
  72.     virtual void __fastcall Loaded(void);
  73.     __fastcall virtual ~TAHMOnlyOne(void);
  74.     
  75. __published:
  76.     __property About ;
  77.     __property Byte Instances = {read=FInstances, write=FInstances, default=1};
  78.     __property TAHMAction OnExceed = {read=FOnExceed, write=FOnExceed, default=0};
  79.     __property TAHMOnExceeded OnExceeded = {read=FOnExceeded, write=FOnExceeded};
  80. };
  81.  
  82. //-- var, const, procedure ---------------------------------------------------
  83.  
  84. }    /* namespace Ahmtonlyone */
  85. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  86. using namespace Ahmtonlyone;
  87. #endif
  88. //-- end unit ----------------------------------------------------------------
  89. #endif    // AHMTOnlyOne
  90.