home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / progs / CB / DATA.Z / DBGRIDS.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-06  |  21.9 KB  |  555 lines

  1. //----------------------------------------------------------------------------
  2. // DBGrids.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
  3. // From: DBGrids.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef DBGridsHPP
  6. #define DBGridsHPP
  7. //----------------------------------------------------------------------------
  8. #ifndef MenusHPP
  9. #include <Menus.hpp>
  10. #endif
  11.  
  12. #ifndef DBCtrlsHPP
  13. #include <DBCtrls.hpp>
  14. #endif
  15.  
  16. #ifndef GridsHPP
  17. #include <Grids.hpp>
  18. #endif
  19.  
  20. #ifndef DBTablesHPP
  21. #include <DBTables.hpp>
  22. #endif
  23.  
  24. #ifndef DBHPP
  25. #include <DB.hpp>
  26. #endif
  27.  
  28. #ifndef GraphicsHPP
  29. #include <Graphics.hpp>
  30. #endif
  31.  
  32. #ifndef FormsHPP
  33. #include <Forms.hpp>
  34. #endif
  35.  
  36. #ifndef ControlsHPP
  37. #include <Controls.hpp>
  38. #endif
  39.  
  40. #ifndef ClassesHPP
  41. #include <Classes.hpp>
  42. #endif
  43.  
  44. #ifndef MessagesHPP
  45. #include <Messages.hpp>
  46. #endif
  47.  
  48. #ifndef SysUtilsHPP
  49. #include <SysUtils.hpp>
  50. #endif
  51.  
  52. #ifndef WindowsHPP
  53. #include <Windows.hpp>
  54. #endif
  55.  
  56. #ifndef SystemHPP
  57. #include <System.hpp>
  58. #endif
  59.  
  60. namespace Dbgrids
  61. {
  62. //-- type declarations -------------------------------------------------------
  63. enum TColumnValue { cvColor, cvWidth, cvFont, cvAlignment, cvReadOnly, cvTitleColor, cvTitleCaption, 
  64.     cvTitleAlignment, cvTitleFont };
  65.  
  66. typedef Set<TColumnValue, cvColor, cvTitleFont>  TColumnValues;
  67.  
  68. class __declspec(delphiclass) TColumnTitle;
  69. class __declspec(delphiclass) TColumn;
  70. enum TColumnButtonStyle { cbsAuto, cbsEllipsis, cbsNone };
  71.  
  72. class __declspec(delphiclass) TCustomDBGrid;
  73. class __declspec(pascalimplementation) TColumn : public Classes::TCollectionItem
  74. {
  75.     typedef TColumn ThisClass;
  76.     typedef Classes::TCollectionItem inherited;
  77.     
  78. private:
  79.     Db::TField *FField;
  80.     System::AnsiString FFieldName;
  81.     Graphics::TColor FColor;
  82.     System::Integer FWidth;
  83.     TColumnTitle *FTitle;
  84.     Graphics::TFont *FFont;
  85.     Classes::TStrings *FPickList;
  86.     System::Integer FDropDownRows;
  87.     TColumnButtonStyle FButtonStyle;
  88.     TAlignment FAlignment;
  89.     System::Boolean FReadonly;
  90.     TColumnValues FAssignedValues;
  91.     void __fastcall FontChanged(System::TObject *Sender);
  92.     Classes::TAlignment __fastcall GetAlignment(void);
  93.     Graphics::TColor __fastcall GetColor(void);
  94.     Db::TField *__fastcall GetField(void);
  95.     Graphics::TFont *__fastcall GetFont(void);
  96.     Classes::TStrings *__fastcall GetPickList(void);
  97.     System::Boolean __fastcall GetReadOnly(void);
  98.     System::Integer __fastcall GetWidth(void);
  99.     System::Boolean __fastcall IsAlignmentStored(void);
  100.     System::Boolean __fastcall IsColorStored(void);
  101.     System::Boolean __fastcall IsFontStored(void);
  102.     System::Boolean __fastcall IsReadOnlyStored(void);
  103.     System::Boolean __fastcall IsWidthStored(void);
  104.     virtual void __fastcall SetAlignment(Classes::TAlignment Value);
  105.     void __fastcall SetButtonStyle(TColumnButtonStyle Value);
  106.     void __fastcall SetColor(Graphics::TColor Value);
  107.     virtual void __fastcall SetField(Db::TField *Value);
  108.     void __fastcall SetFieldName(const System::AnsiString Value);
  109.     void __fastcall SetFont(Graphics::TFont *Value);
  110.     void __fastcall SetPickList(Classes::TStrings *Value);
  111.     virtual void __fastcall SetReadOnly(System::Boolean Value);
  112.     void __fastcall SetTitle(TColumnTitle *Value);
  113.     virtual void __fastcall SetWidth(System::Integer Value);
  114.     
  115. protected:
  116.     virtual TColumnTitle *__fastcall CreateTitle(void);
  117.     TCustomDBGrid *__fastcall GetGrid(void);
  118.     void __fastcall RefreshDefaultFont(void);
  119.     
  120. public:
  121.     __fastcall virtual TColumn(Classes::TCollection *Collection);
  122.     __fastcall virtual ~TColumn(void);
  123.     virtual void __fastcall Assign(Classes::TPersistent *Source);
  124.     Classes::TAlignment __fastcall DefaultAlignment(void);
  125.     Graphics::TColor __fastcall DefaultColor(void);
  126.     Graphics::TFont *__fastcall DefaultFont(void);
  127.     System::Boolean __fastcall DefaultReadOnly(void);
  128.     System::Integer __fastcall DefaultWidth(void);
  129.     virtual void __fastcall RestoreDefaults(void);
  130.     __property TColumnValues AssignedValues = {read=FAssignedValues, nodefault};
  131.     __property Db::TField * Field = {read=GetField, write=SetField, nodefault};
  132.     
  133. __published:
  134.     __property Classes::TAlignment Alignment = {read=GetAlignment, write=SetAlignment, stored=IsAlignmentStored
  135.         , nodefault};
  136.     __property TColumnButtonStyle ButtonStyle = {read=FButtonStyle, write=SetButtonStyle, default=0};
  137.     __property Graphics::TColor Color = {read=GetColor, write=SetColor, stored=IsColorStored, nodefault
  138.         };
  139.     __property System::Integer DropDownRows = {read=FDropDownRows, write=FDropDownRows, default=7};
  140.     __property System::AnsiString FieldName = {read=FFieldName, write=SetFieldName, nodefault};
  141.     __property Graphics::TFont * Font = {read=GetFont, write=SetFont, stored=IsFontStored, nodefault};
  142.     __property Classes::TStrings * PickList = {read=GetPickList, write=SetPickList, nodefault};
  143.     __property System::Boolean ReadOnly = {read=GetReadOnly, write=SetReadOnly, stored=IsReadOnlyStored
  144.         , nodefault};
  145.     __property TColumnTitle * Title = {read=FTitle, write=SetTitle, nodefault};
  146.     __property System::Integer Width = {read=GetWidth, write=SetWidth, stored=IsWidthStored, nodefault}
  147.         ;
  148. };
  149.  
  150. class __declspec(pascalimplementation) TColumnTitle : public Classes::TPersistent
  151. {
  152.     typedef TColumnTitle ThisClass;
  153.     typedef Classes::TPersistent inherited;
  154.     
  155. private:
  156.     TColumn *FColumn;
  157.     System::AnsiString FCaption;
  158.     Graphics::TFont *FFont;
  159.     Graphics::TColor FColor;
  160.     TAlignment FAlignment;
  161.     void __fastcall FontChanged(System::TObject *Sender);
  162.     Classes::TAlignment __fastcall GetAlignment(void);
  163.     Graphics::TColor __fastcall GetColor(void);
  164.     System::AnsiString __fastcall GetCaption(void);
  165.     Graphics::TFont *__fastcall GetFont(void);
  166.     System::Boolean __fastcall IsAlignmentStored(void);
  167.     System::Boolean __fastcall IsColorStored(void);
  168.     System::Boolean __fastcall IsFontStored(void);
  169.     System::Boolean __fastcall IsCaptionStored(void);
  170.     void __fastcall SetAlignment(Classes::TAlignment Value);
  171.     void __fastcall SetColor(Graphics::TColor Value);
  172.     void __fastcall SetFont(Graphics::TFont *Value);
  173.     virtual void __fastcall SetCaption(const System::AnsiString Value);
  174.     
  175. protected:
  176.     void __fastcall RefreshDefaultFont(void);
  177.     
  178. public:
  179.     __fastcall TColumnTitle(TColumn *Column);
  180.     __fastcall virtual ~TColumnTitle(void);
  181.     virtual void __fastcall Assign(Classes::TPersistent *Source);
  182.     Classes::TAlignment __fastcall DefaultAlignment(void);
  183.     Graphics::TColor __fastcall DefaultColor(void);
  184.     Graphics::TFont *__fastcall DefaultFont(void);
  185.     System::AnsiString __fastcall DefaultCaption(void);
  186.     virtual void __fastcall RestoreDefaults(void);
  187.     
  188. __published:
  189.     __property Classes::TAlignment Alignment = {read=GetAlignment, write=SetAlignment, stored=IsAlignmentStored
  190.         , nodefault};
  191.     __property System::AnsiString Caption = {read=GetCaption, write=SetCaption, stored=IsCaptionStored, 
  192.         nodefault};
  193.     __property Graphics::TColor Color = {read=GetColor, write=SetColor, stored=IsColorStored, nodefault
  194.         };
  195.     __property Graphics::TFont * Font = {read=GetFont, write=SetFont, stored=IsFontStored, nodefault};
  196. };
  197.  
  198. typedef System::TMetaClass *TColumnClass;
  199.  
  200. enum TDBGridColumnsState { csDefault, csCustomized };
  201.  
  202. class __declspec(delphiclass) TDBGridColumns;
  203. class __declspec(pascalimplementation) TDBGridColumns : public Classes::TCollection
  204. {
  205.     typedef TDBGridColumns ThisClass;
  206.     typedef Classes::TCollection inherited;
  207.     
  208. private:
  209.     TCustomDBGrid *FGrid;
  210.     TColumn *__fastcall GetColumn(System::Integer Index);
  211.     TDBGridColumnsState __fastcall GetState(void);
  212.     void __fastcall SetColumn(System::Integer Index, TColumn *Value);
  213.     void __fastcall SetState(TDBGridColumnsState NewState);
  214.     
  215. protected:
  216.     virtual void __fastcall Update(Classes::TCollectionItem *Item);
  217.     
  218. public:
  219.     __fastcall TDBGridColumns(TCustomDBGrid *Grid, System::TMetaClass * ColumnClass);
  220.     TColumn *__fastcall Add(void);
  221.     void __fastcall RestoreDefaults(void);
  222.     void __fastcall RebuildColumns(void);
  223.     __property TDBGridColumnsState State = {read=GetState, write=SetState, nodefault};
  224.     __property TCustomDBGrid * Grid = {read=FGrid, nodefault};
  225.     __property TColumn * Items[System::Integer Index] = {read=GetColumn, write=SetColumn/*, default*/};
  226.         
  227. public:
  228.     /* !! TCollection.Destroy */ __fastcall virtual ~TDBGridColumns(void) { }
  229.     
  230. };
  231.  
  232. class __declspec(delphiclass) TGridDataLink;
  233. class __declspec(pascalimplementation) TGridDataLink : public Db::TDataLink
  234. {
  235.     typedef TGridDataLink ThisClass;
  236.     typedef Db::TDataLink inherited;
  237.     
  238. private:
  239.     TCustomDBGrid *FGrid;
  240.     System::Integer FFieldCount;
  241.     System::Integer FFieldMapSize;
  242.     void *FFieldMap;
  243.     System::Boolean FModified;
  244.     System::Boolean FInUpdateData;
  245.     System::Boolean FSparseMap;
  246.     System::Boolean __fastcall GetDefaultFields(void);
  247.     Db::TField *__fastcall GetFields(System::Integer I);
  248.     
  249. protected:
  250.     virtual void __fastcall ActiveChanged(void);
  251.     virtual void __fastcall DataSetChanged(void);
  252.     virtual void __fastcall DataSetScrolled(System::Integer Distance);
  253.     virtual void __fastcall FocusControl(Db::TFieldRef Field);
  254.     virtual void __fastcall EditingChanged(void);
  255.     virtual void __fastcall LayoutChanged(void);
  256.     virtual void __fastcall RecordChanged(Db::TField *Field);
  257.     virtual void __fastcall UpdateData(void);
  258.     System::Integer __fastcall GetMappedIndex(System::Integer ColIndex);
  259.     
  260. public:
  261.     __fastcall TGridDataLink(TCustomDBGrid *AGrid);
  262.     __fastcall virtual ~TGridDataLink(void);
  263.     System::Boolean __fastcall AddMapping(const System::AnsiString FieldName);
  264.     void __fastcall ClearMapping(void);
  265.     void __fastcall Modified(void);
  266.     void __fastcall Reset(void);
  267.     __property System::Boolean DefaultFields = {read=GetDefaultFields, nodefault};
  268.     __property System::Integer FieldCount = {read=FFieldCount, nodefault};
  269.     __property Db::TField * Fields[System::Integer I] = {read=GetFields};
  270.     __property System::Boolean SparseMap = {read=FSparseMap, write=FSparseMap, nodefault};
  271. };
  272.  
  273. class __declspec(delphiclass) TBookmarkList;
  274. class __declspec(pascalimplementation) TBookmarkList : public System::TObject
  275. {
  276.     typedef TBookmarkList ThisClass;
  277.     typedef System::TObject inherited;
  278.     
  279. private:
  280.     Classes::TStringList *FList;
  281.     TCustomDBGrid *FGrid;
  282.     System::AnsiString FCache;
  283.     System::Integer FCacheIndex;
  284.     System::Boolean FCacheFind;
  285.     System::Boolean FLinkActive;
  286.     System::Integer __fastcall GetCount(void);
  287.     System::Boolean __fastcall GetCurrentRowSelected(void);
  288.     System::AnsiString __fastcall GetItem(System::Integer Index);
  289.     System::Integer __fastcall Insert(const System::AnsiString Item);
  290.     void __fastcall SetCurrentRowSelected(System::Boolean Value);
  291.     void __fastcall StringsChanged(System::TObject *Sender);
  292.     
  293. protected:
  294.     System::AnsiString __fastcall CurrentRow(void);
  295.     System::Integer __fastcall Compare(const System::AnsiString Item1, const System::AnsiString Item2);
  296.         
  297.     void __fastcall LinkActive(System::Boolean Value);
  298.     
  299. public:
  300.     __fastcall TBookmarkList(TCustomDBGrid *AGrid);
  301.     __fastcall virtual ~TBookmarkList(void);
  302.     void __fastcall Clear(void);
  303.     void __fastcall Delete(void);
  304.     System::Boolean __fastcall Find(const System::AnsiString Item, System::Integer &Index);
  305.     System::Integer __fastcall IndexOf(const System::AnsiString Item);
  306.     System::Boolean __fastcall Refresh(void);
  307.     __property System::Integer Count = {read=GetCount, nodefault};
  308.     __property System::Boolean CurrentRowSelected = {read=GetCurrentRowSelected, write=SetCurrentRowSelected
  309.         , nodefault};
  310.     __property System::AnsiString Items[System::Integer Index] = {read=GetItem/*, default*/};
  311. };
  312.  
  313. enum TDBGridOption { dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator, dgColumnResize, dgColLines, 
  314.     dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiSelect 
  315.     };
  316.  
  317. typedef Set<TDBGridOption, dgEditing, dgMultiSelect>  TDBGridOptions;
  318.  
  319. typedef void __fastcall (__closure *TDrawDataCellEvent)(System::TObject *Sender, const Windows::TRect 
  320.     &Rect, Db::TField *Field,  Grids::TGridDrawState State);
  321.  
  322. typedef void __fastcall (__closure *TDrawColumnCellEvent)(System::TObject *Sender, const Windows::TRect 
  323.     &Rect, System::Integer DataCol, TColumn *Column,  Grids::TGridDrawState State);
  324.  
  325. class __declspec(pascalimplementation) TCustomDBGrid : public Grids::TCustomGrid
  326. {
  327.     typedef TCustomDBGrid ThisClass;
  328.     typedef Grids::TCustomGrid inherited;
  329.     
  330. private:
  331.     Controls::TImageList *FIndicators;
  332.     Graphics::TFont *FTitleFont;
  333.     System::Boolean FReadOnly;
  334.     System::Boolean FConnected;
  335.     System::Boolean FUserChange;
  336.     System::Boolean FDataChanged;
  337.     System::Boolean FEditRequest;
  338.     System::Boolean FLayoutFromDataset;
  339.     TDBGridOptions FOptions;
  340.     System::Byte FTitleOffset;
  341.     System::Byte FIndicatorOffset;
  342.     System::Byte FUpdateLock;
  343.     System::Byte FLayoutLock;
  344.     System::Boolean FInColExit;
  345.     System::Boolean FDefaultDrawing;
  346.     System::Boolean FSelfChangingTitleFont;
  347.     System::Boolean FSelecting;
  348.     System::Integer FSelRow;
  349.     TGridDataLink *FDataLink;
  350.     Classes::TNotifyEvent FOnColEnter;
  351.     Classes::TNotifyEvent FOnColExit;
  352.     TDrawDataCellEvent FOnDrawDataCell;
  353.     TDrawColumnCellEvent FOnDrawColumnCell;
  354.     System::AnsiString FEditText;
  355.     TDBGridColumns *FColumns;
  356.     Classes::TNotifyEvent FOnEditButtonClick;
  357.     Grids::TMovedEvent FOnColumnMoved;
  358.     TBookmarkList *FBookmarks;
  359.     System::AnsiString FSelectionAnchor;
  360.     System::Boolean __fastcall AcquireFocus(void);
  361.     void __fastcall DataChanged(void);
  362.     void __fastcall EditingChanged(void);
  363.     System::Boolean __fastcall Edit(void);
  364.     Db::TDataSource *__fastcall GetDataSource(void);
  365.     System::Integer __fastcall GetFieldCount(void);
  366.     Db::TField *__fastcall GetFields(System::Integer FieldIndex);
  367.     Db::TField *__fastcall GetSelectedField(void);
  368.     System::Integer __fastcall GetSelectedIndex(void);
  369.     void __fastcall InternalLayout(void);
  370.     void __fastcall MoveCol(System::Integer RawCol);
  371.     void __fastcall RecordChanged(Db::TField *Field);
  372.     void __fastcall SetColumns(TDBGridColumns *Value);
  373.     void __fastcall SetDataSource(Db::TDataSource *Value);
  374.     void __fastcall SetOptions( TDBGridOptions Value);
  375.     void __fastcall SetSelectedField(Db::TField *Value);
  376.     void __fastcall SetSelectedIndex(System::Integer Value);
  377.     void __fastcall SetTitleFont(Graphics::TFont *Value);
  378.     void __fastcall TitleFontChanged(System::TObject *Sender);
  379.     void __fastcall UpdateData(void);
  380.     void __fastcall UpdateActive(void);
  381.     void __fastcall UpdateScrollBar(void);
  382.     void __fastcall UpdateRowCount(void);
  383.     MESSAGE void __fastcall CMExit(Messages::TMessage &Message);
  384.     MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
  385.     MESSAGE void __fastcall CMParentFontChanged(Messages::TMessage &Message);
  386.     MESSAGE void __fastcall CMDeferLayout(void *Message);
  387.     MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Msg);
  388.     MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Msg);
  389.     MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
  390.     MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
  391.     
  392. protected:
  393.     System::Boolean FUpdateFields;
  394.     System::Boolean FAcquireFocus;
  395.     System::Integer __fastcall RawToDataColumn(System::Integer ACol);
  396.     System::Integer __fastcall DataToRawColumn(System::Integer ACol);
  397.     System::Boolean __fastcall AcquireLayoutLock(void);
  398.     void __fastcall BeginLayout(void);
  399.     void __fastcall BeginUpdate(void);
  400.     void __fastcall CancelLayout(void);
  401.     virtual System::Boolean __fastcall CanEditAcceptKey(System::Char Key);
  402.     virtual System::Boolean __fastcall CanEditModify(void);
  403.     virtual System::Boolean __fastcall CanEditShow(void);
  404.     virtual void __fastcall ColumnMoved(System::Longint FromIndex, System::Longint ToIndex);
  405.     virtual void __fastcall ColEnter(void);
  406.     virtual void __fastcall ColExit(void);
  407.     virtual void __fastcall ColWidthsChanged(void);
  408.     virtual TDBGridColumns *__fastcall CreateColumns(void);
  409.     virtual Grids::TInplaceEdit *__fastcall CreateEditor(void);
  410.     virtual void __fastcall CreateWnd(void);
  411.     void __fastcall DeferLayout(void);
  412.     virtual void __fastcall DefineFieldMap(void);
  413.     virtual void __fastcall DrawCell(System::Longint ACol, System::Longint ARow, const Windows::TRect &ARect
  414.         ,  Grids::TGridDrawState AState);
  415.     virtual void __fastcall DrawDataCell(const Windows::TRect &Rect, Db::TField *Field,  Grids::TGridDrawState 
  416.         State);
  417.     virtual void __fastcall DrawColumnCell(const Windows::TRect &Rect, System::Integer DataCol, TColumn *
  418.         Column,  Grids::TGridDrawState State);
  419.     virtual void __fastcall EditButtonClick(void);
  420.     void __fastcall EndLayout(void);
  421.     void __fastcall EndUpdate(void);
  422.     Db::TField *__fastcall GetColField(System::Integer DataCol);
  423.     virtual System::Integer __fastcall GetEditLimit(void);
  424.     virtual System::AnsiString __fastcall GetEditMask(System::Longint ACol, System::Longint ARow);
  425.     virtual System::AnsiString __fastcall GetEditText(System::Longint ACol, System::Longint ARow);
  426.     System::AnsiString __fastcall GetFieldValue(System::Integer ACol);
  427.     virtual System::Boolean __fastcall HighlightCell(System::Integer DataCol, System::Integer DataRow, 
  428.         const System::AnsiString Value,  Grids::TGridDrawState AState);
  429.     virtual void __fastcall KeyDown(System::Word &Key,  Classes::TShiftState Shift);
  430.     virtual void __fastcall KeyPress(System::Char &Key);
  431.     virtual void __fastcall LayoutChanged(void);
  432.     virtual void __fastcall LinkActive(System::Boolean Value);
  433.     virtual void __fastcall Loaded(void);
  434.     virtual void __fastcall MouseDown(Controls::TMouseButton Button,  Classes::TShiftState Shift, System::Integer 
  435.         X, System::Integer Y);
  436.     virtual void __fastcall Notification(Classes::TComponent *AComponent, Classes::TOperation Operation
  437.         );
  438.     virtual void __fastcall Scroll(System::Integer Distance);
  439.     virtual void __fastcall SetColumnAttributes(void);
  440.     virtual void __fastcall SetEditText(System::Longint ACol, System::Longint ARow, const System::AnsiString 
  441.         Value);
  442.     System::Boolean __fastcall StoreColumns(void);
  443.     virtual void __fastcall TimedScroll( Grids::TGridScrollDirection Direction);
  444.     __property TDBGridColumns * Columns = {read=FColumns, write=SetColumns, nodefault};
  445.     __property System::Boolean DefaultDrawing = {read=FDefaultDrawing, write=FDefaultDrawing, default=1
  446.         };
  447.     __property Db::TDataSource * DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
  448.     __property TGridDataLink * DataLink = {read=FDataLink, nodefault};
  449.     __property System::Byte IndicatorOffset = {read=FIndicatorOffset, nodefault};
  450.     __property System::Byte LayoutLock = {read=FLayoutLock, nodefault};
  451.     __property TDBGridOptions Options = {read=FOptions, write=SetOptions, default=3325};
  452.     __property ParentColor ;
  453.     __property System::Boolean ReadOnly = {read=FReadOnly, write=FReadOnly, default=0};
  454.     __property TBookmarkList * SelectedRows = {read=FBookmarks, nodefault};
  455.     __property Graphics::TFont * TitleFont = {read=FTitleFont, write=SetTitleFont, nodefault};
  456.     __property System::Byte UpdateLock = {read=FUpdateLock, nodefault};
  457.     __property Classes::TNotifyEvent OnColEnter = {read=FOnColEnter, write=FOnColEnter};
  458.     __property Classes::TNotifyEvent OnColExit = {read=FOnColExit, write=FOnColExit};
  459.     __property TDrawDataCellEvent OnDrawDataCell = {read=FOnDrawDataCell, write=FOnDrawDataCell};
  460.     __property TDrawColumnCellEvent OnDrawColumnCell = {read=FOnDrawColumnCell, write=FOnDrawColumnCell
  461.         };
  462.     __property Classes::TNotifyEvent OnEditButtonClick = {read=FOnEditButtonClick, write=FOnEditButtonClick
  463.         };
  464.     __property Grids::TMovedEvent OnColumnMoved = {read=FOnColumnMoved, write=FOnColumnMoved};
  465.     
  466. public:
  467.     __fastcall virtual TCustomDBGrid(Classes::TComponent *AOwner);
  468.     __fastcall virtual ~TCustomDBGrid(void);
  469.     void __fastcall DefaultDrawDataCell(const Windows::TRect &Rect, Db::TField *Field,  Grids::TGridDrawState 
  470.         State);
  471.     void __fastcall DefaultDrawColumnCell(const Windows::TRect &Rect, System::Integer DataCol, TColumn *
  472.         Column,  Grids::TGridDrawState State);
  473.     System::Boolean __fastcall ValidFieldIndex(System::Integer FieldIndex);
  474.     __property EditorMode ;
  475.     __property System::Integer FieldCount = {read=GetFieldCount, nodefault};
  476.     __property Db::TField * Fields[System::Integer FieldIndex] = {read=GetFields};
  477.     __property Db::TField * SelectedField = {read=GetSelectedField, write=SetSelectedField, nodefault};
  478.         
  479.     __property System::Integer SelectedIndex = {read=GetSelectedIndex, write=SetSelectedIndex, nodefault
  480.         };
  481. };
  482.  
  483. class __declspec(delphiclass) TDBGrid;
  484. class __declspec(pascalimplementation) TDBGrid : public TCustomDBGrid
  485. {
  486.     typedef TDBGrid ThisClass;
  487.     typedef TCustomDBGrid inherited;
  488.     
  489. public:
  490.     __property Canvas ;
  491.     __property SelectedRows ;
  492.     
  493. __published:
  494.     __property Align ;
  495.     __property BorderStyle ;
  496.     __property Color ;
  497.     __property Columns  = {stored=StoreColumns};
  498.     __property Ctl3D ;
  499.     __property DataSource ;
  500.     __property DefaultDrawing ;
  501.     __property DragCursor ;
  502.     __property DragMode ;
  503.     __property Enabled ;
  504.     __property FixedColor ;
  505.     __property Font ;
  506.     __property Options ;
  507.     __property ParentColor ;
  508.     __property ParentCtl3D ;
  509.     __property ParentFont ;
  510.     __property ParentShowHint ;
  511.     __property PopupMenu ;
  512.     __property ReadOnly ;
  513.     __property ShowHint ;
  514.     __property TabOrder ;
  515.     __property TabStop ;
  516.     __property TitleFont ;
  517.     __property Visible ;
  518.     __property OnColEnter ;
  519.     __property OnColExit ;
  520.     __property OnColumnMoved ;
  521.     __property OnDrawDataCell ;
  522.     __property OnDrawColumnCell ;
  523.     __property OnDblClick ;
  524.     __property OnDragDrop ;
  525.     __property OnDragOver ;
  526.     __property OnEditButtonClick ;
  527.     __property OnEndDrag ;
  528.     __property OnEnter ;
  529.     __property OnExit ;
  530.     __property OnKeyDown ;
  531.     __property OnKeyPress ;
  532.     __property OnKeyUp ;
  533.     __property OnStartDrag ;
  534. public:
  535.     /* !! TCustomDBGrid.Create */ __fastcall virtual TDBGrid(Classes::TComponent *AOwner) : Dbgrids::TCustomDBGrid(
  536.         AOwner) { }
  537.     /* !! TCustomDBGrid.Destroy */ __fastcall virtual ~TDBGrid(void) { }
  538.     
  539. };
  540.  
  541. //-- var, const, procedure ---------------------------------------------------
  542. #define ColumnTitleValues 0x1E0
  543. #define cm_DeferLayout System::Smallint(1124)
  544. #define IndicatorWidth System::Byte(11)
  545. //-- template instantiations -------------------------------------------------
  546. template class TDBGridOptions ;
  547. template class TColumnValues ;
  548.  
  549. }    /* namespace Dbgrids */
  550. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  551. using namespace Dbgrids;
  552. #endif
  553. //-- end unit ----------------------------------------------------------------
  554. #endif    // DBGrids
  555.