home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // Grids.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: Grids.pas
- //----------------------------------------------------------------------------
- #ifndef GridsHPP
- #define GridsHPP
- //----------------------------------------------------------------------------
- #ifndef MaskHPP
- #include <Mask.hpp>
- #endif
-
- #ifndef StdCtrlsHPP
- #include <StdCtrls.hpp>
- #endif
-
- #ifndef FormsHPP
- #include <Forms.hpp>
- #endif
-
- #ifndef ControlsHPP
- #include <Controls.hpp>
- #endif
-
- #ifndef MenusHPP
- #include <Menus.hpp>
- #endif
-
- #ifndef GraphicsHPP
- #include <Graphics.hpp>
- #endif
-
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef MessagesHPP
- #include <Messages.hpp>
- #endif
-
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Grids
- {
- //-- type declarations -------------------------------------------------------
- class __declspec(delphiclass) EInvalidGridOperation;
- class __declspec(pascalimplementation) EInvalidGridOperation : public Sysutils::Exception
- {
- typedef EInvalidGridOperation ThisClass;
- typedef Sysutils::Exception inherited;
-
- public:
- /* !! Exception.Create */ __fastcall EInvalidGridOperation(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* !! Exception.CreateFmt */ __fastcall EInvalidGridOperation(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall EInvalidGridOperation(System::Integer Ident) : Sysutils::Exception(
- Ident) { }
- /* !! Exception.CreateResFmt */ __fastcall EInvalidGridOperation(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall EInvalidGridOperation(const System::AnsiString Msg, System::Integer
- AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall EInvalidGridOperation(const System::AnsiString Msg, const
- TVarRec *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(
- Msg, Args, Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall EInvalidGridOperation(System::Integer Ident, System::Integer
- AHelpContext) : Sysutils::Exception(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall EInvalidGridOperation(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Ident,
- Args, Args_Size, AHelpContext) { }
-
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~EInvalidGridOperation(void) { }
-
- };
-
- typedef System::Integer __fastcall (__closure *TGetExtentsFunc)(System::Longint Index);
-
- struct TGridAxisDrawInfo
- {
- System::Integer EffectiveLineWidth;
- System::Integer FixedBoundary;
- System::Integer GridBoundary;
- System::Integer GridExtent;
- System::Longint LastFullVisibleCell;
- System::Integer FullVisBoundary;
- System::Integer FixedCellCount;
- System::Integer FirstGridCell;
- System::Integer GridCellCount;
- TGetExtentsFunc GetExtent;
- } ;
-
- struct TGridDrawInfo
- {
- TGridAxisDrawInfo Horz;
- TGridAxisDrawInfo Vert;
- } ;
-
- enum TGridState { gsNormal, gsSelecting, gsRowSizing, gsColSizing, gsRowMoving, gsColMoving };
-
- class __declspec(delphiclass) TInplaceEdit;
- class __declspec(delphiclass) TCustomGrid;
- struct TGridCoord
- {
- System::Longint X;
- System::Longint Y;
- } ;
-
- enum TGridOption { goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goDrawFocusSelected,
- goRowSizing, goColSizing, goRowMoving, goColMoving, goEditing, goTabs, goRowSelect, goAlwaysShowEditor,
- goThumbTracking };
-
- typedef Set<TGridOption, goFixedVertLine, goThumbTracking> TGridOptions;
-
- struct TGridRect;
- enum Grids_3 { gdSelected, gdFocused, gdFixed };
-
- typedef Set<Grids_3, gdSelected, gdFixed> TGridDrawState;
-
- enum Grids_4 { sdLeft, sdRight, sdUp, sdDown };
-
- typedef Set<Grids_4, sdLeft, sdDown> TGridScrollDirection;
-
- class __declspec(pascalimplementation) TCustomGrid : public Controls::TCustomControl
- {
- typedef TCustomGrid ThisClass;
- typedef Controls::TCustomControl inherited;
-
- private:
- TGridCoord FAnchor;
- TFormBorderStyle FBorderStyle;
- System::Boolean FCanEditModify;
- System::Longint FColCount;
- void *FColWidths;
- void *FTabStops;
- TGridCoord FCurrent;
- System::Integer FDefaultColWidth;
- System::Integer FDefaultRowHeight;
- System::Integer FFixedCols;
- System::Integer FFixedRows;
- Graphics::TColor FFixedColor;
- System::Integer FGridLineWidth;
- TGridOptions FOptions;
- System::Longint FRowCount;
- void *FRowHeights;
- TScrollStyle FScrollBars;
- TGridCoord FTopLeft;
- System::Longint FSizingIndex;
- System::Integer FSizingPos;
- System::Integer FSizingOfs;
- System::Longint FMoveIndex;
- System::Longint FMovePos;
- Windows::TPoint FHitTest;
- TInplaceEdit *FInplaceEdit;
- System::Longint FInplaceCol;
- System::Longint FInplaceRow;
- System::Boolean FDefaultDrawing;
- System::Boolean FEditorMode;
- System::Integer FColOffset;
- TGridCoord __fastcall CalcCoordFromPoint(System::Integer X, System::Integer Y, const TGridDrawInfo
- &DrawInfo);
- void __fastcall CalcDrawInfo(TGridDrawInfo &DrawInfo);
- void __fastcall CalcDrawInfoXY(TGridDrawInfo &DrawInfo, System::Integer UseWidth, System::Integer UseHeight
- );
- void __fastcall CalcFixedInfo(TGridDrawInfo &DrawInfo);
- TGridCoord __fastcall CalcMaxTopLeft(const TGridCoord &Coord, const TGridDrawInfo &DrawInfo);
- void __fastcall CalcSizingState(System::Integer X, System::Integer Y, TGridState &State, System::Longint
- &Index, System::Integer &SizingPos, System::Integer &SizingOfs, TGridDrawInfo &FixedInfo);
- void __fastcall ChangeSize(System::Longint NewColCount, System::Longint NewRowCount);
- void __fastcall ClampInView(const TGridCoord &Coord);
- void __fastcall DrawSizingLine(const TGridDrawInfo &DrawInfo);
- void __fastcall DrawMove(void);
- void __fastcall FocusCell(System::Longint ACol, System::Longint ARow, System::Boolean MoveAnchor);
- void __fastcall GridRectToScreenRect(const TGridRect &GridRect, Windows::TRect &ScreenRect, System::Boolean
- IncludeLine);
- void __fastcall HideEdit(void);
- void __fastcall Initialize(void);
- void __fastcall InvalidateGrid(void);
- void __fastcall InvalidateRect(const TGridRect &ARect);
- void __fastcall InvertRect(const Windows::TRect &Rect);
- void __fastcall ModifyScrollBar(System::Cardinal ScrollBar, System::Cardinal ScrollCode, System::Cardinal
- Pos);
- void __fastcall MoveAdjust(System::Longint &CellPos, System::Longint FromIndex, System::Longint ToIndex
- );
- void __fastcall MoveAnchor(const TGridCoord &NewAnchor);
- void __fastcall MoveAndScroll(System::Integer Mouse, System::Integer CellHit, TGridDrawInfo &DrawInfo
- , TGridAxisDrawInfo &Axis, System::Integer Scrollbar);
- void __fastcall MoveCurrent(System::Longint ACol, System::Longint ARow, System::Boolean MoveAnchor,
- System::Boolean Show);
- void __fastcall MoveTopLeft(System::Longint ALeft, System::Longint ATop);
- void __fastcall ResizeCol(System::Longint Index, System::Integer OldSize, System::Integer NewSize);
-
- void __fastcall ResizeRow(System::Longint Index, System::Integer OldSize, System::Integer NewSize);
-
- void __fastcall SelectionMoved(const TGridRect &OldSel);
- void __fastcall ScrollDataInfo(System::Integer DX, System::Integer DY, TGridDrawInfo &DrawInfo);
- void __fastcall TopLeftMoved(const TGridCoord &OldTopLeft);
- void __fastcall UpdateScrollPos(void);
- void __fastcall UpdateScrollRange(void);
- System::Integer __fastcall GetColWidths(System::Longint Index);
- System::Integer __fastcall GetRowHeights(System::Longint Index);
- TGridRect __fastcall GetSelection(void);
- System::Boolean __fastcall GetTabStops(System::Longint Index);
- System::Integer __fastcall GetVisibleColCount(void);
- System::Integer __fastcall GetVisibleRowCount(void);
- void __fastcall ReadColWidths(Classes::TReader *Reader);
- void __fastcall ReadRowHeights(Classes::TReader *Reader);
- void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
- void __fastcall SetCol(System::Longint Value);
- void __fastcall SetColCount(System::Longint Value);
- void __fastcall SetColWidths(System::Longint Index, System::Integer Value);
- void __fastcall SetDefaultColWidth(System::Integer Value);
- void __fastcall SetDefaultRowHeight(System::Integer Value);
- void __fastcall SetEditorMode(System::Boolean Value);
- void __fastcall SetFixedColor(Graphics::TColor Value);
- void __fastcall SetFixedCols(System::Integer Value);
- void __fastcall SetFixedRows(System::Integer Value);
- void __fastcall SetGridLineWidth(System::Integer Value);
- void __fastcall SetLeftCol(System::Longint Value);
- void __fastcall SetOptions( TGridOptions Value);
- void __fastcall SetRow(System::Longint Value);
- void __fastcall SetRowCount(System::Longint Value);
- void __fastcall SetRowHeights(System::Longint Index, System::Integer Value);
- void __fastcall SetScrollBars(Stdctrls::TScrollStyle Value);
- void __fastcall SetSelection(const TGridRect &Value);
- void __fastcall SetTabStops(System::Longint Index, System::Boolean Value);
- void __fastcall SetTopRow(System::Longint Value);
- void __fastcall UpdateEdit(void);
- void __fastcall UpdateText(void);
- void __fastcall WriteColWidths(Classes::TWriter *Writer);
- void __fastcall WriteRowHeights(Classes::TWriter *Writer);
- MESSAGE void __fastcall CMCancelMode(Messages::TMessage &Msg);
- MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
- MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
- MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Msg);
- MESSAGE void __fastcall CMWantSpecialKey(Messages::TWMKey &Msg);
- MESSAGE void __fastcall WMChar(Messages::TWMKey &Msg);
- MESSAGE void __fastcall WMCommand(Messages::TWMCommand &Message);
- MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Msg);
- MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Msg);
- MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Msg);
- MESSAGE void __fastcall WMLButtonDown(Messages::TMessage &Message);
- MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Msg);
- MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Msg);
- MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Msg);
- MESSAGE void __fastcall WMSize(Messages::TWMSize &Msg);
- MESSAGE void __fastcall WMTimer(Messages::TWMTimer &Msg);
- MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Msg);
-
- protected:
- TGridState FGridState;
- System::Boolean FSaveCellExtents;
- virtual TInplaceEdit *__fastcall CreateEditor(void);
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- virtual void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
- virtual void __fastcall KeyPress(System::Char &Key);
- 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 void __fastcall AdjustSize(System::Longint Index, System::Longint Amount, System::Boolean Rows
- );
- Windows::TRect __fastcall BoxRect(System::Longint ALeft, System::Longint ATop, System::Longint ARight
- , System::Longint ABottom);
- virtual void __fastcall DoExit(void);
- Windows::TRect __fastcall CellRect(System::Longint ACol, System::Longint ARow);
- virtual System::Boolean __fastcall CanEditAcceptKey(System::Char Key);
- virtual System::Boolean __fastcall CanGridAcceptKey(System::Word Key, Classes::TShiftState Shift);
-
- virtual System::Boolean __fastcall CanEditModify(void);
- virtual System::Boolean __fastcall CanEditShow(void);
- virtual System::AnsiString __fastcall GetEditText(System::Longint ACol, System::Longint ARow);
- virtual void __fastcall SetEditText(System::Longint ACol, System::Longint ARow, const System::AnsiString
- Value);
- virtual System::AnsiString __fastcall GetEditMask(System::Longint ACol, System::Longint ARow);
- virtual System::Integer __fastcall GetEditLimit(void);
- System::Integer __fastcall GetGridWidth(void);
- System::Integer __fastcall GetGridHeight(void);
- void __fastcall HideEditor(void);
- void __fastcall ShowEditor(void);
- void __fastcall ShowEditorChar(System::Char Ch);
- void __fastcall InvalidateEditor(void);
- void __fastcall MoveColumn(System::Longint FromIndex, System::Longint ToIndex);
- virtual void __fastcall ColumnMoved(System::Longint FromIndex, System::Longint ToIndex);
- void __fastcall MoveRow(System::Longint FromIndex, System::Longint ToIndex);
- virtual void __fastcall RowMoved(System::Longint FromIndex, System::Longint ToIndex);
- virtual void __fastcall DrawCell(System::Longint ACol, System::Longint ARow, const Windows::TRect &ARect
- , TGridDrawState AState) = 0;
- virtual void __fastcall DefineProperties(Classes::TFiler *Filer);
- TGridCoord __fastcall MouseCoord(System::Integer X, System::Integer Y);
- void __fastcall MoveColRow(System::Longint ACol, System::Longint ARow, System::Boolean MoveAnchor,
- System::Boolean Show);
- virtual System::Boolean __fastcall SelectCell(System::Longint ACol, System::Longint ARow);
- virtual void __fastcall SizeChanged(System::Longint OldColCount, System::Longint OldRowCount);
- System::Boolean __fastcall Sizing(System::Integer X, System::Integer Y);
- void __fastcall ScrollData(System::Integer DX, System::Integer DY);
- void __fastcall InvalidateCell(System::Longint ACol, System::Longint ARow);
- void __fastcall InvalidateCol(System::Longint ACol);
- void __fastcall InvalidateRow(System::Longint ARow);
- virtual void __fastcall TopLeftChanged(void);
- virtual void __fastcall TimedScroll( TGridScrollDirection Direction);
- virtual void __fastcall Paint(void);
- virtual void __fastcall ColWidthsChanged(void);
- virtual void __fastcall RowHeightsChanged(void);
- void __fastcall DeleteColumn(System::Longint ACol);
- void __fastcall DeleteRow(System::Longint ARow);
- void __fastcall UpdateDesigner(void);
- __property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
- __property System::Longint Col = {read=FCurrent.X, write=SetCol, nodefault};
- __property Color ;
- __property System::Longint ColCount = {read=FColCount, write=SetColCount, default=5};
- __property System::Integer ColWidths[System::Longint Index] = {read=GetColWidths, write=SetColWidths
- };
- __property System::Integer DefaultColWidth = {read=FDefaultColWidth, write=SetDefaultColWidth, default=64
- };
- __property System::Boolean DefaultDrawing = {read=FDefaultDrawing, write=FDefaultDrawing, default=1
- };
- __property System::Integer DefaultRowHeight = {read=FDefaultRowHeight, write=SetDefaultRowHeight, default=24
- };
- __property System::Boolean EditorMode = {read=FEditorMode, write=SetEditorMode, nodefault};
- __property Graphics::TColor FixedColor = {read=FFixedColor, write=SetFixedColor, default=-2147483633
- };
- __property System::Integer FixedCols = {read=FFixedCols, write=SetFixedCols, default=1};
- __property System::Integer FixedRows = {read=FFixedRows, write=SetFixedRows, default=1};
- __property System::Integer GridHeight = {read=GetGridHeight, nodefault};
- __property System::Integer GridLineWidth = {read=FGridLineWidth, write=SetGridLineWidth, default=1}
- ;
- __property System::Integer GridWidth = {read=GetGridWidth, nodefault};
- __property TInplaceEdit * InplaceEditor = {read=FInplaceEdit, nodefault};
- __property System::Longint LeftCol = {read=FTopLeft.X, write=SetLeftCol, nodefault};
- __property TGridOptions Options = {read=FOptions, write=SetOptions, default=31};
- __property ParentColor ;
- __property System::Longint Row = {read=FCurrent.Y, write=SetRow, nodefault};
- __property System::Longint RowCount = {read=FRowCount, write=SetRowCount, default=5};
- __property System::Integer RowHeights[System::Longint Index] = {read=GetRowHeights, write=SetRowHeights
- };
- __property Stdctrls::TScrollStyle ScrollBars = {read=FScrollBars, write=SetScrollBars, default=3};
- __property TGridRect Selection = {read=GetSelection, write=SetSelection};
- __property System::Boolean TabStops[System::Longint Index] = {read=GetTabStops, write=SetTabStops};
-
- __property System::Longint TopRow = {read=FTopLeft.Y, write=SetTopRow, nodefault};
- __property System::Integer VisibleColCount = {read=GetVisibleColCount, nodefault};
- __property System::Integer VisibleRowCount = {read=GetVisibleRowCount, nodefault};
-
- public:
- __fastcall virtual TCustomGrid(Classes::TComponent *AOwner);
- __fastcall virtual ~TCustomGrid(void);
-
- __published:
- __property TabStop ;
- };
-
- class __declspec(pascalimplementation) TInplaceEdit : public Mask::TCustomMaskEdit
- {
- typedef TInplaceEdit ThisClass;
- typedef Mask::TCustomMaskEdit inherited;
-
- private:
- TCustomGrid *FGrid;
- System::Longint FClickTime;
- void __fastcall InternalMove(const Windows::TRect &Loc, System::Boolean Redraw);
- void __fastcall SetGrid(TCustomGrid *Value);
- MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
- MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
- MESSAGE void __fastcall WMPaste(void *Message);
- MESSAGE void __fastcall WMCut(void *Message);
- MESSAGE void __fastcall WMClear(void *Message);
-
- protected:
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- virtual void __fastcall DblClick(void);
- virtual System::Boolean __fastcall EditCanModify(void);
- virtual void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
- virtual void __fastcall KeyPress(System::Char &Key);
- virtual void __fastcall KeyUp(System::Word &Key, Classes::TShiftState Shift);
- virtual void __fastcall BoundsChanged(void);
- virtual void __fastcall UpdateContents(void);
- virtual void __fastcall WndProc(Messages::TMessage &Message);
- __property TCustomGrid * Grid = {read=FGrid, nodefault};
-
- public:
- __fastcall virtual TInplaceEdit(Classes::TComponent *AOwner);
- void __fastcall Deselect(void);
- void __fastcall Hide(void);
- void __fastcall Invalidate(void);
- void __fastcall Move(const Windows::TRect &Loc);
- System::Boolean __fastcall PosEqual(const Windows::TRect &Rect);
- void __fastcall SetFocus(void);
- void __fastcall UpdateLoc(const Windows::TRect &Loc);
- System::Boolean __fastcall Visible(void);
- public:
- /* !! TWinControl.Destroy */ __fastcall virtual ~TInplaceEdit(void) { }
-
- };
-
- struct TGridRect
- {
-
- union
- {
- struct
- {
- TGridCoord TopLeft;
- TGridCoord BottomRight;
-
- };
- struct
- {
- System::Longint Left;
- System::Longint Top;
- System::Longint Right;
- System::Longint Bottom;
-
- };
-
- };
- } ;
-
- typedef void __fastcall (__closure *TSelectCellEvent)(System::TObject *Sender, System::Longint Col,
- System::Longint Row, System::Boolean &CanSelect);
-
- typedef void __fastcall (__closure *TDrawCellEvent)(System::TObject *Sender, System::Longint Col, System::Longint
- Row, const Windows::TRect &Rect, TGridDrawState State);
-
- typedef void __fastcall (__closure *TGetEditEvent)(System::TObject *Sender, System::Longint ACol, System::Longint
- ARow, System::AnsiString &Value);
-
- typedef void __fastcall (__closure *TSetEditEvent)(System::TObject *Sender, System::Longint ACol, System::Longint
- ARow, const System::AnsiString Value);
-
- typedef void __fastcall (__closure *TMovedEvent)(System::TObject *Sender, System::Longint FromIndex,
- System::Longint ToIndex);
-
- class __declspec(delphiclass) TDrawGrid;
- class __declspec(pascalimplementation) TDrawGrid : public TCustomGrid
- {
- typedef TDrawGrid ThisClass;
- typedef TCustomGrid inherited;
-
- private:
- TMovedEvent FOnColumnMoved;
- TDrawCellEvent FOnDrawCell;
- TGetEditEvent FOnGetEditMask;
- TGetEditEvent FOnGetEditText;
- TMovedEvent FOnRowMoved;
- TSelectCellEvent FOnSelectCell;
- TSetEditEvent FOnSetEditText;
- Classes::TNotifyEvent FOnTopLeftChanged;
-
- protected:
- virtual void __fastcall ColumnMoved(System::Longint FromIndex, System::Longint ToIndex);
- virtual void __fastcall DrawCell(System::Longint ACol, System::Longint ARow, const Windows::TRect &ARect
- , TGridDrawState AState);
- virtual System::AnsiString __fastcall GetEditMask(System::Longint ACol, System::Longint ARow);
- virtual System::AnsiString __fastcall GetEditText(System::Longint ACol, System::Longint ARow);
- virtual void __fastcall RowMoved(System::Longint FromIndex, System::Longint ToIndex);
- virtual System::Boolean __fastcall SelectCell(System::Longint ACol, System::Longint ARow);
- virtual void __fastcall SetEditText(System::Longint ACol, System::Longint ARow, const System::AnsiString
- Value);
- virtual void __fastcall TopLeftChanged(void);
-
- public:
- Windows::TRect __fastcall CellRect(System::Longint ACol, System::Longint ARow);
- void __fastcall MouseToCell(System::Integer X, System::Integer Y, System::Longint &ACol, System::Longint
- &ARow);
- __property Canvas ;
- __property Col ;
- __property ColWidths ;
- __property EditorMode ;
- __property GridHeight ;
- __property GridWidth ;
- __property LeftCol ;
- __property Selection ;
- __property Row ;
- __property RowHeights ;
- __property TabStops ;
- __property TopRow ;
-
- __published:
- __property Align ;
- __property BorderStyle ;
- __property Color ;
- __property ColCount ;
- __property Ctl3D ;
- __property DefaultColWidth ;
- __property DefaultRowHeight ;
- __property DefaultDrawing ;
- __property DragCursor ;
- __property DragMode ;
- __property Enabled ;
- __property FixedColor ;
- __property FixedCols ;
- __property RowCount ;
- __property FixedRows ;
- __property Font ;
- __property GridLineWidth ;
- __property Options ;
- __property ParentColor ;
- __property ParentCtl3D ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property ScrollBars ;
- __property ShowHint ;
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property VisibleColCount ;
- __property VisibleRowCount ;
- __property OnClick ;
- __property TMovedEvent OnColumnMoved = {read=FOnColumnMoved, write=FOnColumnMoved};
- __property OnDblClick ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property TDrawCellEvent OnDrawCell = {read=FOnDrawCell, write=FOnDrawCell};
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property TGetEditEvent OnGetEditMask = {read=FOnGetEditMask, write=FOnGetEditMask};
- __property TGetEditEvent OnGetEditText = {read=FOnGetEditText, write=FOnGetEditText};
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property TMovedEvent OnRowMoved = {read=FOnRowMoved, write=FOnRowMoved};
- __property TSelectCellEvent OnSelectCell = {read=FOnSelectCell, write=FOnSelectCell};
- __property TSetEditEvent OnSetEditText = {read=FOnSetEditText, write=FOnSetEditText};
- __property OnStartDrag ;
- __property Classes::TNotifyEvent OnTopLeftChanged = {read=FOnTopLeftChanged, write=FOnTopLeftChanged
- };
- public:
- /* !! TCustomGrid.Create */ __fastcall virtual TDrawGrid(Classes::TComponent *AOwner) : Grids::TCustomGrid(
- AOwner) { }
- /* !! TCustomGrid.Destroy */ __fastcall virtual ~TDrawGrid(void) { }
-
- };
-
- class __declspec(delphiclass) TStringGridStrings;
- class __declspec(delphiclass) TStringGrid;
- class __declspec(pascalimplementation) TStringGrid : public TDrawGrid
- {
- typedef TStringGrid ThisClass;
- typedef TDrawGrid inherited;
-
- private:
- void *FData;
- void *FRows;
- void *FCols;
- System::Boolean FUpdating;
- System::Boolean FNeedsUpdating;
- System::Integer FEditUpdate;
- void __fastcall DisableEditUpdate(void);
- void __fastcall EnableEditUpdate(void);
- void __fastcall Initialize(void);
- void __fastcall Update(System::Integer ACol, System::Integer ARow);
- void __fastcall SetUpdateState(System::Boolean Updating);
- System::AnsiString __fastcall GetCells(System::Integer ACol, System::Integer ARow);
- Classes::TStrings *__fastcall GetCols(System::Integer Index);
- System::TObject *__fastcall GetObjects(System::Integer ACol, System::Integer ARow);
- Classes::TStrings *__fastcall GetRows(System::Integer Index);
- void __fastcall SetCells(System::Integer ACol, System::Integer ARow, const System::AnsiString Value
- );
- void __fastcall SetCols(System::Integer Index, Classes::TStrings *Value);
- void __fastcall SetObjects(System::Integer ACol, System::Integer ARow, System::TObject *Value);
- void __fastcall SetRows(System::Integer Index, Classes::TStrings *Value);
- TStringGridStrings *__fastcall EnsureColRow(System::Integer Index, System::Boolean IsCol);
- System::Pointer __fastcall EnsureDataRow(System::Integer ARow);
-
- protected:
- virtual void __fastcall ColumnMoved(System::Longint FromIndex, System::Longint ToIndex);
- virtual void __fastcall DrawCell(System::Longint ACol, System::Longint ARow, const Windows::TRect &ARect
- , TGridDrawState AState);
- virtual System::AnsiString __fastcall GetEditText(System::Longint ACol, System::Longint ARow);
- virtual void __fastcall SetEditText(System::Longint ACol, System::Longint ARow, const System::AnsiString
- Value);
- virtual void __fastcall RowMoved(System::Longint FromIndex, System::Longint ToIndex);
-
- public:
- __fastcall virtual TStringGrid(Classes::TComponent *AOwner);
- __fastcall virtual ~TStringGrid(void);
- __property System::AnsiString Cells[System::Integer ACol][System::Integer ARow] = {read=GetCells, write=
- SetCells};
- __property Classes::TStrings * Cols[System::Integer Index] = {read=GetCols, write=SetCols};
- __property System::TObject * Objects[System::Integer ACol][System::Integer ARow] = {read=GetObjects
- , write=SetObjects};
- __property Classes::TStrings * Rows[System::Integer Index] = {read=GetRows, write=SetRows};
- };
-
- class __declspec(pascalimplementation) TStringGridStrings : public Classes::TStrings
- {
- typedef TStringGridStrings ThisClass;
- typedef Classes::TStrings inherited;
-
- private:
- TStringGrid *FGrid;
- System::Integer FIndex;
- void __fastcall CalcXY(System::Integer Index, System::Integer &X, System::Integer &Y);
-
- protected:
- virtual void __fastcall Clear(void);
- virtual System::Integer __fastcall Add(const System::AnsiString S);
- virtual System::AnsiString __fastcall Get(System::Integer Index);
- virtual System::Integer __fastcall GetCount(void);
- virtual System::TObject *__fastcall GetObject(System::Integer Index);
- virtual void __fastcall Put(System::Integer Index, const System::AnsiString S);
- virtual void __fastcall PutObject(System::Integer Index, System::TObject *AObject);
- virtual void __fastcall SetUpdateState(System::Boolean Updating);
-
- public:
- __fastcall TStringGridStrings(TStringGrid *AGrid, System::Longint AIndex);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~TStringGridStrings(void) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define MaxCustomExtents System::Integer(134217727)
- #define MaxShortInt System::Shortint(127)
- //-- template instantiations -------------------------------------------------
- template class TGridScrollDirection ;
- template class TGridDrawState ;
- template class TGridOptions ;
-
- } /* namespace Grids */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Grids;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // Grids
-