home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 May / Chip_2002-05_cd1.bin / chplus / cpp / 5 / Komponety.exe / ibreg.cpp < prev    next >
C/C++ Source or Header  |  1998-02-09  |  1KB  |  46 lines

  1. //---------------------------------------------------------------------------
  2. // Borland C++Builder
  3. // Copyright (c) 1987, 1998 Borland International Inc.  All Rights Reserved.
  4. //---------------------------------------------------------------------------
  5. #pragma hdrstop
  6. #include <dsgnintf.hpp>
  7. #include <memory>       //for STL auto_ptr
  8. #include "ibreg.h"
  9. #include "ibctrls.cpp"
  10. #include "ibevnts.cpp"
  11. #include "samp.h"
  12.  
  13. #pragma resource "*.res"  
  14.  
  15. __fastcall TIBEventListProperty::TIBEventListProperty(void)
  16.                                 : TClassProperty() { }
  17. __fastcall TIBEventListProperty::~TIBEventListProperty(void){}
  18.  
  19.  TPropertyAttributes __fastcall TIBEventListProperty::GetAttributes()
  20. {
  21.   return  (TClassProperty::GetAttributes() << paDialog ) >> paSubProperties;
  22. }
  23.  
  24. void __fastcall TIBEventListProperty::Edit()
  25. {
  26.   std::auto_ptr<TStringList> Events(new TStringList());
  27.   Events->Assign((TStrings*)GetOrdValue());
  28.   if(Ibevnts::EditAlerterEvents(Events.get()))
  29.     SetOrdValue(long(Events.get()));
  30. }
  31.  
  32. namespace Ibevnts
  33. {
  34. void __fastcall PACKAGE Register()
  35. {
  36.   TComponentClass classes[1] = {__classid(TIBEventAlerter)};
  37.   RegisterComponents(LoadStr(Tab_101), classes, 0);
  38.   RegisterPropertyEditor(__typeinfo(TStrings),
  39.                          __classid(TIBEventAlerter),
  40.                          "Events",
  41.                          __classid(TIBEventListProperty));
  42. }
  43. }       /* namespace Ibreg */
  44.  
  45.  
  46.