home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- // Borland C++Builder
- // Copyright (c) 1987, 1996 Borland International Inc. All Rights Reserved.
- //---------------------------------------------------------------------------
- #pragma hdrstop
- #include "ibreg.h"
- #include "ibctrls.cpp"
- #include "ibevnts.cpp"
- #include <dsgnintf.hpp>
- #include <memory> //for STL auto_ptr
-
- //#pragma resource "*.res" //IDE links .res automatically for components
-
- __fastcall TIBEventListProperty::TIBEventListProperty(void)
- : TClassProperty() { }
- __fastcall TIBEventListProperty::~TIBEventListProperty(void){}
-
- TPropertyAttributes __fastcall TIBEventListProperty::GetAttributes()
- {
- return (TClassProperty::GetAttributes() << paDialog ) >> paSubProperties;
- }
-
- void __fastcall TIBEventListProperty::Edit()
- {
- std::auto_ptr<TStringList> Events(new TStringList());
- Events->Assign((TStrings*)GetOrdValue());
- if(Ibevnts::EditAlerterEvents(Events.get()))
- SetOrdValue(long(Events.get()));
- }
-
- namespace Ibreg
- {
- void __fastcall Register()
- {
- TComponentClass classes[1] = {__classid(TIBEventAlerter)};
- RegisterComponents("Samples", classes, 0);
- RegisterPropertyEditor(__typeinfo(TStrings),
- __classid(TIBEventAlerter),
- "Events",
- __classid(TIBEventListProperty));
- }
- } /* namespace Ibreg */
-
-
-