home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
DBCTRLS.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
45KB
|
1,236 lines
//----------------------------------------------------------------------------
// DBCtrls.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: DBCtrls.pas
//----------------------------------------------------------------------------
#ifndef DBCtrlsHPP
#define DBCtrlsHPP
//----------------------------------------------------------------------------
#include <Buttons.hpp>
#include <Mask.hpp>
#include <DBTables.hpp>
#include <DB.hpp>
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include <Menus.hpp>
#include <Graphics.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysUtils.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Dbctrls
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) TPaintControl;
class __declspec(pascalimplementation) TPaintControl : public System::TObject
{
typedef System::TObject inherited;
private:
Controls::TWinControl* FOwner;
System::AnsiString FClassName;
HWND FHandle;
void *FObjectInstance;
void *FDefWindowProc;
bool FCtl3dButton;
HWND __fastcall GetHandle(void);
void __fastcall SetCtl3DButton(bool Value);
void __fastcall WndProc(Messages::TMessage &Message);
public:
__fastcall TPaintControl(Controls::TWinControl* Owner, const System::AnsiString ClassName);
__fastcall virtual ~TPaintControl(void);
void __fastcall DestroyHandle(void);
__property bool Ctl3DButton = {read=FCtl3dButton, write=SetCtl3DButton, nodefault};
__property HWND Handle = {read=GetHandle, nodefault};
};
class __declspec(delphiclass) TDBEdit;
class __declspec(pascalimplementation) TDBEdit : public Mask::TCustomMaskEdit
{
typedef Mask::TCustomMaskEdit inherited;
private:
Dbtables::TFieldDataLink* FDataLink;
Controls::TControlCanvas* FCanvas;
TAlignment FAlignment;
bool FFocused;
void __fastcall DataChange(System::TObject* Sender);
void __fastcall EditingChange(System::TObject* Sender);
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
Db::TField* __fastcall GetField(void);
bool __fastcall GetReadOnly(void);
POINT __fastcall GetTextMargins(void);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall SetFocused(bool Value);
HIDESBASE void __fastcall SetReadOnly(bool Value);
void __fastcall UpdateData(System::TObject* Sender);
HIDESBASE MESSAGE void __fastcall WMCut(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMPaste(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
protected:
virtual void __fastcall Change(void);
virtual bool __fastcall EditCanModify(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall Reset(void);
public:
__fastcall virtual TDBEdit(Classes::TComponent* AOwner);
__fastcall virtual ~TDBEdit(void);
__property Db::TField* Field = {read=GetField, nodefault};
__published:
__property AutoSelect ;
__property AutoSize ;
__property BorderStyle ;
__property CharCase ;
__property Color ;
__property Ctl3D ;
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property ImeMode ;
__property ImeName ;
__property MaxLength ;
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PasswordChar ;
__property PopupMenu ;
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnChange ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBEdit(HWND ParentWindow) : Mask::TCustomMaskEdit(ParentWindow
) { }
};
class __declspec(delphiclass) TDBText;
class __declspec(pascalimplementation) TDBText : public Stdctrls::TCustomLabel
{
typedef Stdctrls::TCustomLabel inherited;
private:
Dbtables::TFieldDataLink* FDataLink;
void __fastcall DataChange(System::TObject* Sender);
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
Db::TField* __fastcall GetField(void);
System::AnsiString __fastcall GetFieldText(void);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
protected:
virtual System::AnsiString __fastcall GetLabelText(void);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall SetAutoSize(bool Value);
public:
__fastcall virtual TDBText(Classes::TComponent* AOwner);
__fastcall virtual ~TDBText(void);
__property Db::TField* Field = {read=GetField, nodefault};
__published:
__property Align ;
__property Alignment ;
__property AutoSize ;
__property Color ;
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property ParentColor ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property Transparent ;
__property ShowHint ;
__property Visible ;
__property WordWrap ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
};
class __declspec(delphiclass) TDBCheckBox;
class __declspec(pascalimplementation) TDBCheckBox : public Stdctrls::TCustomCheckBox
{
typedef Stdctrls::TCustomCheckBox inherited;
private:
Dbtables::TFieldDataLink* FDataLink;
System::AnsiString FValueCheck;
System::AnsiString FValueUncheck;
TPaintControl* FPaintControl;
void __fastcall DataChange(System::TObject* Sender);
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
Db::TField* __fastcall GetField(void);
Stdctrls::TCheckBoxState __fastcall GetFieldState(void);
bool __fastcall GetReadOnly(void);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall SetReadOnly(bool Value);
void __fastcall SetValueCheck(const System::AnsiString Value);
void __fastcall SetValueUncheck(const System::AnsiString Value);
void __fastcall UpdateData(System::TObject* Sender);
bool __fastcall ValueMatch(const System::AnsiString ValueList, const System::AnsiString Value);
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
protected:
virtual void __fastcall Toggle(void);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall WndProc(Messages::TMessage &Message);
public:
__fastcall virtual TDBCheckBox(Classes::TComponent* AOwner);
__fastcall virtual ~TDBCheckBox(void);
__property Checked ;
__property Db::TField* Field = {read=GetField, nodefault};
__property State ;
__published:
__property Alignment ;
__property AllowGrayed ;
__property Caption ;
__property Color ;
__property Ctl3D ;
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property System::AnsiString ValueChecked = {read=FValueCheck, write=SetValueCheck, nodefault};
__property System::AnsiString ValueUnchecked = {read=FValueUncheck, write=SetValueUncheck, nodefault
};
__property Visible ;
__property OnClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBCheckBox(HWND ParentWindow) : Stdctrls::TCustomCheckBox(
ParentWindow) { }
};
class __declspec(delphiclass) TDBComboBox;
class __declspec(pascalimplementation) TDBComboBox : public Stdctrls::TCustomComboBox
{
typedef Stdctrls::TCustomComboBox inherited;
private:
Dbtables::TFieldDataLink* FDataLink;
TPaintControl* FPaintControl;
void __fastcall DataChange(System::TObject* Sender);
void __fastcall EditingChange(System::TObject* Sender);
System::AnsiString __fastcall GetComboText(void);
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
Db::TField* __fastcall GetField(void);
bool __fastcall GetReadOnly(void);
void __fastcall SetComboText(const System::AnsiString Value);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall SetEditReadOnly(void);
HIDESBASE void __fastcall SetItems(Classes::TStrings* Value);
void __fastcall SetReadOnly(bool Value);
void __fastcall UpdateData(System::TObject* Sender);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
protected:
virtual void __fastcall Change(void);
virtual void __fastcall Click(void);
virtual void __fastcall ComboWndProc(Messages::TMessage &Message, HWND ComboWnd, void * ComboProc);
virtual void __fastcall CreateWnd(void);
virtual void __fastcall DropDown(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall SetStyle(Stdctrls::TComboBoxStyle Value);
virtual void __fastcall WndProc(Messages::TMessage &Message);
public:
__fastcall virtual TDBComboBox(Classes::TComponent* AOwner);
__fastcall virtual ~TDBComboBox(void);
__property Db::TField* Field = {read=GetField, nodefault};
__property Text ;
__published:
__property Style ;
__property Color ;
__property Ctl3D ;
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragMode ;
__property DragCursor ;
__property DropDownCount ;
__property Enabled ;
__property Font ;
__property ImeMode ;
__property ImeName ;
__property ItemHeight ;
__property Items = {write=SetItems};
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
__property ShowHint ;
__property Sorted ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnChange ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnDrawItem ;
__property OnDropDown ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMeasureItem ;
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBComboBox(HWND ParentWindow) : Stdctrls::TCustomComboBox(
ParentWindow) { }
};
class __declspec(delphiclass) TDBListBox;
class __declspec(pascalimplementation) TDBListBox : public Stdctrls::TCustomListBox
{
typedef Stdctrls::TCustomListBox inherited;
private:
Dbtables::TFieldDataLink* FDataLink;
void __fastcall DataChange(System::TObject* Sender);
void __fastcall UpdateData(System::TObject* Sender);
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
Db::TField* __fastcall GetField(void);
bool __fastcall GetReadOnly(void);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall SetReadOnly(bool Value);
HIDESBASE void __fastcall SetItems(Classes::TStrings* Value);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
protected:
virtual void __fastcall Click(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
public:
__fastcall virtual TDBListBox(Classes::TComponent* AOwner);
__fastcall virtual ~TDBListBox(void);
__property Db::TField* Field = {read=GetField, nodefault};
__published:
__property Align ;
__property BorderStyle ;
__property Color ;
__property Ctl3D ;
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property ImeMode ;
__property ImeName ;
__property IntegralHeight ;
__property ItemHeight ;
__property Items = {write=SetItems};
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
__property ShowHint ;
__property Style ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnDrawItem ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMeasureItem ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBListBox(HWND ParentWindow) : Stdctrls::TCustomListBox(
ParentWindow) { }
};
class __declspec(delphiclass) TDBRadioGroup;
class __declspec(pascalimplementation) TDBRadioGroup : public Extctrls::TCustomRadioGroup
{
typedef Extctrls::TCustomRadioGroup inherited;
private:
Dbtables::TFieldDataLink* FDataLink;
System::AnsiString FValue;
Classes::TStrings* FValues;
bool FInSetValue;
Classes::TNotifyEvent FOnChange;
void __fastcall DataChange(System::TObject* Sender);
void __fastcall UpdateData(System::TObject* Sender);
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
Db::TField* __fastcall GetField(void);
bool __fastcall GetReadOnly(void);
System::AnsiString __fastcall GetButtonValue(int Index);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall SetReadOnly(bool Value);
void __fastcall SetValue(const System::AnsiString Value);
HIDESBASE void __fastcall SetItems(Classes::TStrings* Value);
void __fastcall SetValues(Classes::TStrings* Value);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
protected:
virtual void __fastcall Change(void);
virtual void __fastcall Click(void);
virtual void __fastcall KeyPress(char &Key);
virtual bool __fastcall CanModify(void);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
__property Dbtables::TFieldDataLink* DataLink = {read=FDataLink, nodefault};
public:
__fastcall virtual TDBRadioGroup(Classes::TComponent* AOwner);
__fastcall virtual ~TDBRadioGroup(void);
__property Db::TField* Field = {read=GetField, nodefault};
__property ItemIndex ;
__property System::AnsiString Value = {read=FValue, write=SetValue, nodefault};
__published:
__property Align ;
__property Caption ;
__property Color ;
__property Columns ;
__property Ctl3D ;
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property Items = {write=SetItems};
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Classes::TStrings* Values = {read=FValues, write=SetValues, nodefault};
__property Visible ;
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
__property OnClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBRadioGroup(HWND ParentWindow) : Extctrls::TCustomRadioGroup(
ParentWindow) { }
};
class __declspec(delphiclass) TDBMemo;
class __declspec(pascalimplementation) TDBMemo : public Stdctrls::TCustomMemo
{
typedef Stdctrls::TCustomMemo inherited;
private:
Dbtables::TFieldDataLink* FDataLink;
bool FAutoDisplay;
bool FFocused;
bool FMemoLoaded;
TPaintControl* FPaintControl;
void __fastcall DataChange(System::TObject* Sender);
void __fastcall EditingChange(System::TObject* Sender);
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
Db::TField* __fastcall GetField(void);
bool __fastcall GetReadOnly(void);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
HIDESBASE void __fastcall SetReadOnly(bool Value);
void __fastcall SetAutoDisplay(bool Value);
void __fastcall SetFocused(bool Value);
void __fastcall UpdateData(System::TObject* Sender);
MESSAGE void __fastcall WMCut(Messages::TMessage &Message);
MESSAGE void __fastcall WMPaste(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
protected:
virtual void __fastcall Change(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall WndProc(Messages::TMessage &Message);
public:
__fastcall virtual TDBMemo(Classes::TComponent* AOwner);
__fastcall virtual ~TDBMemo(void);
void __fastcall LoadMemo(void);
__property Db::TField* Field = {read=GetField, nodefault};
__published:
__property Align ;
__property Alignment ;
__property bool AutoDisplay = {read=FAutoDisplay, write=SetAutoDisplay, default=1};
__property BorderStyle ;
__property Color ;
__property Ctl3D ;
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property ImeMode ;
__property ImeName ;
__property MaxLength ;
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
__property ScrollBars ;
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property WantTabs ;
__property WordWrap ;
__property OnChange ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBMemo(HWND ParentWindow) : Stdctrls::TCustomMemo(ParentWindow
) { }
};
class __declspec(delphiclass) TDBImage;
class __declspec(pascalimplementation) TDBImage : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
Dbtables::TFieldDataLink* FDataLink;
Graphics::TPicture* FPicture;
TFormBorderStyle FBorderStyle;
bool FAutoDisplay;
bool FStretch;
bool FCenter;
bool FPictureLoaded;
bool FQuickDraw;
void __fastcall DataChange(System::TObject* Sender);
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
Db::TField* __fastcall GetField(void);
bool __fastcall GetReadOnly(void);
void __fastcall PictureChanged(System::TObject* Sender);
void __fastcall SetAutoDisplay(bool Value);
void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
void __fastcall SetCenter(bool Value);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall SetPicture(Graphics::TPicture* Value);
void __fastcall SetReadOnly(bool Value);
void __fastcall SetStretch(bool Value);
void __fastcall UpdateData(System::TObject* Sender);
HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
MESSAGE void __fastcall WMCut(Messages::TMessage &Message);
MESSAGE void __fastcall WMCopy(Messages::TMessage &Message);
MESSAGE void __fastcall WMPaste(Messages::TMessage &Message);
MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
protected:
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
virtual HPALETTE __fastcall GetPalette(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall Paint(void);
public:
__fastcall virtual TDBImage(Classes::TComponent* AOwner);
__fastcall virtual ~TDBImage(void);
void __fastcall CopyToClipboard(void);
void __fastcall CutToClipboard(void);
void __fastcall LoadPicture(void);
void __fastcall PasteFromClipboard(void);
__property Db::TField* Field = {read=GetField, nodefault};
__property Graphics::TPicture* Picture = {read=FPicture, write=SetPicture, nodefault};
__published:
__property Align ;
__property bool AutoDisplay = {read=FAutoDisplay, write=SetAutoDisplay, default=1};
__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
__property bool Center = {read=FCenter, write=SetCenter, default=1};
__property Color ;
__property Ctl3D ;
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
__property bool QuickDraw = {read=FQuickDraw, write=FQuickDraw, default=1};
__property ShowHint ;
__property bool Stretch = {read=FStretch, write=SetStretch, default=0};
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBImage(HWND ParentWindow) : Controls::TCustomControl(
ParentWindow) { }
};
enum TNavGlyph { ngEnabled, ngDisabled };
enum TNavigateBtn { nbFirst, nbPrior, nbNext, nbLast, nbInsert, nbDelete, nbEdit, nbPost, nbCancel,
nbRefresh };
typedef Set<TNavigateBtn, nbFirst, nbRefresh> TButtonSet;
enum DBCtrls_01 { nsAllowTimer, nsFocusRect };
typedef Set<DBCtrls_01, nsAllowTimer, nsFocusRect> TNavButtonStyle;
typedef void __fastcall (__closure *ENavClick)(System::TObject* Sender, TNavigateBtn Button);
class __declspec(delphiclass) TDBNavigator;
class __declspec(delphiclass) TNavDataLink;
class __declspec(pascalimplementation) TNavDataLink : public Db::TDataLink
{
typedef Db::TDataLink inherited;
private:
TDBNavigator* FNavigator;
protected:
virtual void __fastcall EditingChanged(void);
virtual void __fastcall DataSetChanged(void);
virtual void __fastcall ActiveChanged(void);
public:
__fastcall TNavDataLink(TDBNavigator* ANav);
__fastcall virtual ~TNavDataLink(void);
};
class __declspec(delphiclass) TNavButton;
class __declspec(pascalimplementation) TDBNavigator : public Extctrls::TCustomPanel
{
typedef Extctrls::TCustomPanel inherited;
private:
TNavDataLink* FDataLink;
TButtonSet FVisibleButtons;
Classes::TStrings* FHints;
int ButtonWidth;
POINT MinBtnSize;
ENavClick FOnNavClick;
TNavigateBtn FocusedButton;
bool FConfirmDelete;
Db::TDataSource* __fastcall GetDataSource(void);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall InitButtons(void);
void __fastcall InitHints(void);
HIDESBASE void __fastcall Click(System::TObject* Sender);
void __fastcall BtnMouseDown(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState
Shift, int X, int Y);
HIDESBASE void __fastcall SetVisible(TButtonSet Value);
void __fastcall AdjustSize(int &W, int &H);
void __fastcall SetHints(Classes::TStrings* Value);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
protected:
TNavButton* Buttons[10];
void __fastcall DataChanged(void);
void __fastcall EditingChanged(void);
void __fastcall ActiveChanged(void);
virtual void __fastcall Loaded(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);
public:
__fastcall virtual TDBNavigator(Classes::TComponent* AOwner);
__fastcall virtual ~TDBNavigator(void);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
void __fastcall BtnClick(TNavigateBtn Index);
__published:
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property TButtonSet VisibleButtons = {read=FVisibleButtons, write=SetVisible, default=1023};
__property Align ;
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Ctl3D ;
__property Classes::TStrings* Hints = {read=FHints, write=SetHints, nodefault};
__property ParentCtl3D ;
__property ParentShowHint ;
__property PopupMenu ;
__property bool ConfirmDelete = {read=FConfirmDelete, write=FConfirmDelete, default=1};
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property ENavClick OnClick = {read=FOnNavClick, write=FOnNavClick};
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnResize ;
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBNavigator(HWND ParentWindow) : Extctrls::TCustomPanel(
ParentWindow) { }
};
class __declspec(pascalimplementation) TNavButton : public Buttons::TSpeedButton
{
typedef Buttons::TSpeedButton inherited;
private:
TNavigateBtn FIndex;
TNavButtonStyle FNavStyle;
Extctrls::TTimer* FRepeatTimer;
void __fastcall TimerExpired(System::TObject* Sender);
protected:
virtual void __fastcall Paint(void);
virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
virtual void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
Y);
public:
__fastcall virtual ~TNavButton(void);
__property TNavButtonStyle NavStyle = {read=FNavStyle, write=FNavStyle, nodefault};
__property TNavigateBtn Index = {read=FIndex, write=FIndex, nodefault};
public:
/* TSpeedButton.Create */ __fastcall virtual TNavButton(Classes::TComponent* AOwner) : Buttons::TSpeedButton(
AOwner) { }
};
class __declspec(delphiclass) TDataSourceLink;
class __declspec(delphiclass) TDBLookupControl;
class __declspec(delphiclass) TListSourceLink;
class __declspec(pascalimplementation) TListSourceLink : public Db::TDataLink
{
typedef Db::TDataLink inherited;
private:
TDBLookupControl* FDBLookupControl;
protected:
virtual void __fastcall ActiveChanged(void);
virtual void __fastcall DataSetChanged(void);
public:
/* TDataLink.Create */ __fastcall TListSourceLink(void) : Db::TDataLink() { }
/* TDataLink.Destroy */ __fastcall virtual ~TListSourceLink(void) { }
};
class __declspec(pascalimplementation) TDBLookupControl : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
Db::TDataSource* FLookupSource;
TDataSourceLink* FDataLink;
TListSourceLink* FListLink;
System::AnsiString FDataFieldName;
System::AnsiString FKeyFieldName;
System::AnsiString FListFieldName;
int FListFieldIndex;
Db::TField* FDataField;
Db::TField* FMasterField;
Db::TField* FKeyField;
Db::TField* FListField;
Classes::TList* FListFields;
System::Variant FKeyValue;
System::AnsiString FSearchText;
bool FLookupMode;
bool FListActive;
bool FFocused;
bool __fastcall CanModify(void);
void __fastcall CheckNotCircular(void);
void __fastcall CheckNotLookup(void);
void __fastcall DataLinkActiveChanged(void);
void __fastcall DataLinkRecordChanged(Db::TField* Field);
int __fastcall GetBorderSize(void);
Db::TDataSource* __fastcall GetDataSource(void);
System::AnsiString __fastcall GetKeyFieldName(void);
Db::TDataSource* __fastcall GetListSource(void);
bool __fastcall GetReadOnly(void);
int __fastcall GetTextHeight(void);
virtual void __fastcall KeyValueChanged(void);
virtual void __fastcall ListLinkActiveChanged(void);
virtual void __fastcall ListLinkDataChanged(void);
bool __fastcall LocateKey(void);
void __fastcall ProcessSearchKey(char Key);
void __fastcall SelectKeyValue(const System::Variant &Value);
void __fastcall SetDataFieldName(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall SetKeyFieldName(const System::AnsiString Value);
void __fastcall SetKeyValue(const System::Variant &Value);
void __fastcall SetListFieldName(const System::AnsiString Value);
void __fastcall SetListSource(Db::TDataSource* Value);
void __fastcall SetLookupMode(bool Value);
void __fastcall SetReadOnly(bool Value);
MESSAGE void __fastcall WMGetDlgCode(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TMessage &Message);
protected:
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
__property System::AnsiString DataField = {read=FDataFieldName, write=SetDataFieldName, nodefault};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property System::AnsiString KeyField = {read=GetKeyFieldName, write=SetKeyFieldName, nodefault};
__property System::Variant KeyValue = {read=FKeyValue, write=SetKeyValue};
__property System::AnsiString ListField = {read=FListFieldName, write=SetListFieldName, nodefault};
__property int ListFieldIndex = {read=FListFieldIndex, write=FListFieldIndex, default=0};
__property Db::TDataSource* ListSource = {read=GetListSource, write=SetListSource, nodefault};
__property ParentColor ;
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
__property TabStop ;
public:
__fastcall virtual TDBLookupControl(Classes::TComponent* AOwner);
__fastcall virtual ~TDBLookupControl(void);
public:
/* TWinControl.CreateParented */ __fastcall TDBLookupControl(HWND ParentWindow) : Controls::TCustomControl(
ParentWindow) { }
};
class __declspec(pascalimplementation) TDataSourceLink : public Db::TDataLink
{
typedef Db::TDataLink inherited;
private:
TDBLookupControl* FDBLookupControl;
protected:
virtual void __fastcall ActiveChanged(void);
virtual void __fastcall RecordChanged(Db::TField* Field);
public:
/* TDataLink.Create */ __fastcall TDataSourceLink(void) : Db::TDataLink() { }
/* TDataLink.Destroy */ __fastcall virtual ~TDataSourceLink(void) { }
};
class __declspec(delphiclass) TDBLookupListBox;
class __declspec(pascalimplementation) TDBLookupListBox : public TDBLookupControl
{
typedef TDBLookupControl inherited;
private:
int FRecordIndex;
int FRecordCount;
int FRowCount;
TFormBorderStyle FBorderStyle;
bool FPopup;
bool FKeySelected;
bool FTracking;
bool FTimerActive;
bool FLockPosition;
int FMousePos;
int __fastcall GetKeyIndex(void);
virtual void __fastcall KeyValueChanged(void);
virtual void __fastcall ListLinkActiveChanged(void);
virtual void __fastcall ListLinkDataChanged(void);
void __fastcall SelectCurrent(void);
void __fastcall SelectItemAt(int X, int Y);
void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
void __fastcall SetRowCount(int Value);
void __fastcall StopTimer(void);
void __fastcall StopTracking(void);
void __fastcall TimerScroll(void);
void __fastcall UpdateScrollBar(void);
HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMCancelMode(Messages::TMessage &Message);
MESSAGE void __fastcall WMTimer(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
protected:
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
virtual void __fastcall CreateWnd(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
virtual void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
virtual void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
Y);
virtual void __fastcall Paint(void);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
public:
__fastcall virtual TDBLookupListBox(Classes::TComponent* AOwner);
__property KeyValue ;
__published:
__property Align ;
__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
__property Color ;
__property Ctl3D ;
__property DataField ;
__property DataSource ;
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property ImeMode ;
__property ImeName ;
__property KeyField ;
__property ListField ;
__property ListFieldIndex ;
__property ListSource ;
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property ReadOnly ;
__property int RowCount = {read=FRowCount, write=SetRowCount, stored=false, nodefault};
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
public:
/* TDBLookupControl.Destroy */ __fastcall virtual ~TDBLookupListBox(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TDBLookupListBox(HWND ParentWindow) : Dbctrls::TDBLookupControl(
ParentWindow) { }
};
class __declspec(delphiclass) TPopupDataList;
class __declspec(pascalimplementation) TPopupDataList : public TDBLookupListBox
{
typedef TDBLookupListBox inherited;
private:
MESSAGE void __fastcall WMMouseActivate(Messages::TMessage &Message);
protected:
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
public:
__fastcall virtual TPopupDataList(Classes::TComponent* AOwner);
public:
/* TDBLookupControl.Destroy */ __fastcall virtual ~TPopupDataList(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TPopupDataList(HWND ParentWindow) : Dbctrls::TDBLookupListBox(
ParentWindow) { }
};
enum TDropDownAlign { daLeft, daRight, daCenter };
class __declspec(delphiclass) TDBLookupComboBox;
class __declspec(pascalimplementation) TDBLookupComboBox : public TDBLookupControl
{
typedef TDBLookupControl inherited;
private:
TPopupDataList* FDataList;
int FButtonWidth;
System::AnsiString FText;
int FDropDownRows;
int FDropDownWidth;
TDropDownAlign FDropDownAlign;
bool FListVisible;
bool FPressed;
bool FTracking;
TAlignment FAlignment;
bool FLookupMode;
Classes::TNotifyEvent FOnDropDown;
Classes::TNotifyEvent FOnCloseUp;
virtual void __fastcall KeyValueChanged(void);
virtual void __fastcall ListLinkActiveChanged(void);
void __fastcall ListMouseUp(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState
Shift, int X, int Y);
void __fastcall StopTracking(void);
void __fastcall TrackButton(int X, int Y);
MESSAGE void __fastcall CMCancelMode(Controls::TCMCancelMode &Message);
HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMCancelMode(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
protected:
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
virtual void __fastcall Paint(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
virtual void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
virtual void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
Y);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
public:
__fastcall virtual TDBLookupComboBox(Classes::TComponent* AOwner);
void __fastcall CloseUp(bool Accept);
void __fastcall DropDown(void);
__property KeyValue ;
__property bool ListVisible = {read=FListVisible, nodefault};
__property System::AnsiString Text = {read=FText, nodefault};
__published:
__property Color ;
__property Ctl3D ;
__property DataField ;
__property DataSource ;
__property DragCursor ;
__property DragMode ;
__property TDropDownAlign DropDownAlign = {read=FDropDownAlign, write=FDropDownAlign, default=0};
__property int DropDownRows = {read=FDropDownRows, write=FDropDownRows, default=7};
__property int DropDownWidth = {read=FDropDownWidth, write=FDropDownWidth, default=0};
__property Enabled ;
__property Font ;
__property ImeMode ;
__property ImeName ;
__property KeyField ;
__property ListField ;
__property ListFieldIndex ;
__property ListSource ;
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property ReadOnly ;
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnClick ;
__property Classes::TNotifyEvent OnCloseUp = {read=FOnCloseUp, write=FOnCloseUp};
__property OnDragDrop ;
__property OnDragOver ;
__property Classes::TNotifyEvent OnDropDown = {read=FOnDropDown, write=FOnDropDown};
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
public:
/* TDBLookupControl.Destroy */ __fastcall virtual ~TDBLookupComboBox(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TDBLookupComboBox(HWND ParentWindow) : Dbctrls::TDBLookupControl(
ParentWindow) { }
};
//-- var, const, procedure ---------------------------------------------------
#define InitRepeatPause (Word)(400)
#define RepeatPause (Byte)(100)
#define SpaceSize (Byte)(5)
//-- template instantiations -------------------------------------------------
template class TNavButtonStyle ;
template class TButtonSet ;
} /* namespace Dbctrls */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Dbctrls;
#endif
//-- end unit ----------------------------------------------------------------
#endif // DBCtrls