home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 April
/
Chip_1997-04_cd.bin
/
prezent
/
cb
/
data.z
/
IBREG.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-01-16
|
1KB
|
45 lines
//---------------------------------------------------------------------------
// 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 */