home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // DBLookup.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: DBLookup.pas
- //----------------------------------------------------------------------------
- #ifndef DBLookupHPP
- #define DBLookupHPP
- //----------------------------------------------------------------------------
- #ifndef GridsHPP
- #include <Grids.hpp>
- #endif
-
- #ifndef DBTablesHPP
- #include <DBTables.hpp>
- #endif
-
- #ifndef DBGridsHPP
- #include <DBGrids.hpp>
- #endif
-
- #ifndef ButtonsHPP
- #include <Buttons.hpp>
- #endif
-
- #ifndef MenusHPP
- #include <Menus.hpp>
- #endif
-
- #ifndef GraphicsHPP
- #include <Graphics.hpp>
- #endif
-
- #ifndef FormsHPP
- #include <Forms.hpp>
- #endif
-
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef MessagesHPP
- #include <Messages.hpp>
- #endif
-
- #ifndef ControlsHPP
- #include <Controls.hpp>
- #endif
-
- #ifndef DBHPP
- #include <DB.hpp>
- #endif
-
- #ifndef StdCtrlsHPP
- #include <StdCtrls.hpp>
- #endif
-
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Dblookup
- {
- //-- type declarations -------------------------------------------------------
- enum TDBLookupComboStyle { csDropDown, csDropDownList };
-
- enum TDBLookupListOption { loColLines, loRowLines, loTitles };
-
- typedef Set<TDBLookupListOption, loColLines, loTitles> TDBLookupListOptions;
-
- class __declspec(delphiclass) TDBLookupCombo;
- class __declspec(delphiclass) TPopupGrid;
- class __declspec(delphiclass) TDBLookupList;
- class __declspec(pascalimplementation) TDBLookupList : public Dbgrids::TCustomDBGrid
- {
- typedef TDBLookupList ThisClass;
- typedef Dbgrids::TCustomDBGrid inherited;
-
- private:
- Dbtables::TFieldDataLink *FFieldLink;
- System::AnsiString FLookupDisplay;
- System::AnsiString FLookupField;
- Db::TField *FDisplayFld;
- Db::TField *FValueFld;
- System::AnsiString FValue;
- System::AnsiString FDisplayValue;
- System::Integer FHiliteRow;
- TDBLookupListOptions FOptions;
- System::Integer FTitleOffset;
- System::Boolean FFoundValue;
- System::Boolean FInCellSelect;
- Classes::TNotifyEvent FOnListClick;
- System::AnsiString __fastcall GetDataField(void);
- Db::TDataSource *__fastcall GetDataSource(void);
- Db::TDataSource *__fastcall GetLookupSource(void);
- System::Boolean __fastcall GetReadOnly(void);
- void __fastcall FieldLinkActive(System::TObject *Sender);
- void __fastcall DataChange(System::TObject *Sender);
- void __fastcall SetDataField(const System::AnsiString Value);
- void __fastcall SetDataSource(Db::TDataSource *Value);
- void __fastcall SetLookupSource(Db::TDataSource *Value);
- void __fastcall SetLookupDisplay(const System::AnsiString Value);
- void __fastcall SetLookupField(const System::AnsiString Value);
- void __fastcall SetValue(const System::AnsiString Value);
- void __fastcall SetDisplayValue(const System::AnsiString Value);
- void __fastcall SetReadOnly(System::Boolean Value);
- void __fastcall SetOptions( TDBLookupListOptions Value);
- void __fastcall UpdateData(System::TObject *Sender);
- void __fastcall NewLayout(void);
- void __fastcall DoLookup(void);
- MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
- MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
-
- protected:
- virtual System::Boolean __fastcall HighlightCell(System::Integer DataCol, System::Integer DataRow,
- const System::AnsiString Value, Grids::TGridDrawState AState);
- virtual System::Boolean __fastcall CanGridAcceptKey(System::Word Key, Classes::TShiftState Shift);
-
- virtual void __fastcall DefineFieldMap(void);
- virtual void __fastcall SetColumnAttributes(void);
- virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, System::Integer
- X, System::Integer Y);
- virtual void __fastcall MouseMove( Classes::TShiftState Shift, System::Integer X, System::Integer Y
- );
- virtual void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, System::Integer
- X, System::Integer Y);
- virtual System::Boolean __fastcall CanEdit(void);
- void __fastcall InitFields(System::Boolean ShowError);
- virtual void __fastcall CreateWnd(void);
- virtual void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
- virtual void __fastcall KeyPress(System::Char &Key);
- virtual void __fastcall LinkActive(System::Boolean Value);
- virtual void __fastcall Paint(void);
- virtual void __fastcall Scroll(System::Integer Distance);
- virtual void __fastcall ListClick(void);
- virtual void __fastcall Loaded(void);
- virtual void __fastcall Notification(Classes::TComponent *AComponent, Classes::TOperation Operation
- );
-
- public:
- __fastcall virtual TDBLookupList(Classes::TComponent *AOwner);
- __fastcall virtual ~TDBLookupList(void);
- __property System::AnsiString Value = {read=FValue, write=SetValue, nodefault};
- __property System::AnsiString DisplayValue = {read=FDisplayValue, write=SetDisplayValue, nodefault}
- ;
-
- __published:
- __property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
- __property Db::TDataSource * DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
- __property Db::TDataSource * LookupSource = {read=GetLookupSource, write=SetLookupSource, nodefault
- };
- __property System::AnsiString LookupDisplay = {read=FLookupDisplay, write=SetLookupDisplay, nodefault
- };
- __property System::AnsiString LookupField = {read=FLookupField, write=SetLookupField, nodefault};
- __property TDBLookupListOptions Options = {read=FOptions, write=SetOptions, default=0};
- __property Classes::TNotifyEvent OnClick = {read=FOnListClick, write=FOnListClick};
- __property System::Boolean ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
- __property Align ;
- __property BorderStyle ;
- __property Color ;
- __property Ctl3D ;
- __property DragCursor ;
- __property DragMode ;
- __property Enabled ;
- __property Font ;
- __property ParentColor ;
- __property ParentCtl3D ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property ShowHint ;
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property OnDblClick ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property OnStartDrag ;
- };
-
- class __declspec(pascalimplementation) TPopupGrid : public TDBLookupList
- {
- typedef TPopupGrid ThisClass;
- typedef TDBLookupList inherited;
-
- private:
- TDBLookupCombo *FCombo;
- MESSAGE void __fastcall CMHintShow(Messages::TMessage &Message);
-
- protected:
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- virtual void __fastcall CreateWnd(void);
- MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
- virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, System::Integer
- X, System::Integer Y);
- virtual System::Boolean __fastcall CanEdit(void);
- virtual void __fastcall LinkActive(System::Boolean Value);
-
- public:
- __property RowCount ;
- __fastcall virtual TPopupGrid(Classes::TComponent *AOwner);
- public:
- /* !! TDBLookupList.Destroy */ __fastcall virtual ~TPopupGrid(void) { }
-
- };
-
- class __declspec(pascalimplementation) TDBLookupCombo : public Stdctrls::TCustomEdit
- {
- typedef TDBLookupCombo ThisClass;
- typedef Stdctrls::TCustomEdit inherited;
-
- private:
- Controls::TControlCanvas *FCanvas;
- System::Integer FDropDownCount;
- System::Integer FDropDownWidth;
- System::Integer FTextMargin;
- Dbtables::TFieldDataLink *FFieldLink;
- TPopupGrid *FGrid;
- Buttons::TSpeedButton *FButton;
- Controls::TWinControl *FBtnControl;
- TDBLookupComboStyle FStyle;
- Classes::TNotifyEvent FOnDropDown;
- System::AnsiString __fastcall GetDataField(void);
- Db::TDataSource *__fastcall GetDataSource(void);
- Db::TDataSource *__fastcall GetLookupSource(void);
- System::AnsiString __fastcall GetLookupDisplay(void);
- System::AnsiString __fastcall GetLookupField(void);
- System::Boolean __fastcall GetReadOnly(void);
- System::AnsiString __fastcall GetValue(void);
- System::AnsiString __fastcall GetDisplayValue(void);
- System::Integer __fastcall GetMinHeight(void);
- TDBLookupListOptions __fastcall GetOptions(void);
- System::Boolean __fastcall CanEdit(void);
- System::Boolean __fastcall Editable(void);
- void __fastcall SetValue(const System::AnsiString NewValue);
- void __fastcall SetDisplayValue(const System::AnsiString NewValue);
- void __fastcall DataChange(System::TObject *Sender);
- void __fastcall EditingChange(System::TObject *Sender);
- void __fastcall SetDataField(const System::AnsiString Value);
- void __fastcall SetDataSource(Db::TDataSource *Value);
- void __fastcall SetLookupSource(Db::TDataSource *Value);
- void __fastcall SetLookupDisplay(const System::AnsiString Value);
- void __fastcall SetLookupField(const System::AnsiString Value);
- void __fastcall SetReadOnly(System::Boolean Value);
- void __fastcall SetOptions( TDBLookupListOptions Value);
- void __fastcall SetStyle(TDBLookupComboStyle Value);
- void __fastcall UpdateData(System::TObject *Sender);
- void __fastcall FieldLinkActive(System::TObject *Sender);
- void __fastcall NonEditMouseDown(Messages::TWMMouse &Message);
- void __fastcall DoSelectAll(void);
- void __fastcall SetEditRect(void);
- MESSAGE void __fastcall WMPaste(Messages::TMessage &Message);
- MESSAGE void __fastcall WMCut(Messages::TMessage &Message);
- MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
- MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- MESSAGE void __fastcall CMCancelMode(Controls::TCMCancelMode &Message);
- MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
- MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
- MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
- MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
- MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
- MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
- MESSAGE void __fastcall CMHintShow(Messages::TMessage &Message);
- MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
- MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
- MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
-
- protected:
- virtual void __fastcall Notification(Classes::TComponent *AComponent, Classes::TOperation Operation
- );
- virtual void __fastcall Change(void);
- virtual void __fastcall MouseMove( Classes::TShiftState Shift, System::Integer X, System::Integer Y
- );
- virtual void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
- virtual void __fastcall KeyPress(System::Char &Key);
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- virtual void __fastcall CreateWnd(void);
- void __fastcall GridClick(System::TObject *Sender);
- virtual void __fastcall Loaded(void);
-
- public:
- __fastcall virtual TDBLookupCombo(Classes::TComponent *AOwner);
- __fastcall virtual ~TDBLookupCombo(void);
- virtual void __fastcall DropDown(void);
- virtual void __fastcall CloseUp(void);
- __property System::AnsiString Value = {read=GetValue, write=SetValue, nodefault};
- __property System::AnsiString DisplayValue = {read=GetDisplayValue, write=SetDisplayValue, nodefault
- };
-
- __published:
- __property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
- __property Db::TDataSource * DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
- __property Db::TDataSource * LookupSource = {read=GetLookupSource, write=SetLookupSource, nodefault
- };
- __property System::AnsiString LookupDisplay = {read=GetLookupDisplay, write=SetLookupDisplay, nodefault
- };
- __property System::AnsiString LookupField = {read=GetLookupField, write=SetLookupField, nodefault};
-
- __property TDBLookupListOptions Options = {read=GetOptions, write=SetOptions, default=0};
- __property TDBLookupComboStyle Style = {read=FStyle, write=SetStyle, default=0};
- __property AutoSelect ;
- __property Color ;
- __property Ctl3D ;
- __property DragCursor ;
- __property DragMode ;
- __property System::Integer DropDownCount = {read=FDropDownCount, write=FDropDownCount, default=8};
- __property System::Integer DropDownWidth = {read=FDropDownWidth, write=FDropDownWidth, default=0};
- __property Enabled ;
- __property Font ;
- __property ImeMode ;
- __property MaxLength ;
- __property ParentColor ;
- __property ParentCtl3D ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property System::Boolean 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 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 ;
- };
-
- class __declspec(delphiclass) TComboButton;
- class __declspec(pascalimplementation) TComboButton : public Buttons::TSpeedButton
- {
- typedef TComboButton ThisClass;
- typedef Buttons::TSpeedButton inherited;
-
- protected:
- virtual void __fastcall MouseMove( Classes::TShiftState Shift, System::Integer X, System::Integer Y
- );
- virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, System::Integer
- X, System::Integer Y);
- public:
- /* !! TSpeedButton.Create */ __fastcall virtual TComboButton(Classes::TComponent *AOwner) : Buttons::TSpeedButton(
- AOwner) { }
- /* !! TSpeedButton.Destroy */ __fastcall virtual ~TComboButton(void) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- //-- template instantiations -------------------------------------------------
- template class TDBLookupListOptions ;
-
- } /* namespace Dblookup */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Dblookup;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // DBLookup
-