home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
GRIDS.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
25KB
|
602 lines
//----------------------------------------------------------------------------
// Grids.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Grids.pas
//----------------------------------------------------------------------------
#ifndef GridsHPP
#define GridsHPP
//----------------------------------------------------------------------------
#include <Mask.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Menus.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Windows.hpp>
#include <Messages.hpp>
#include <SysUtils.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Grids
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) EInvalidGridOperation;
class __declspec(pascalimplementation) EInvalidGridOperation : public Sysutils::Exception
{
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 System::TVarRec
* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EInvalidGridOperation(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EInvalidGridOperation(int Ident, const System::TVarRec * Args
, const int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EInvalidGridOperation(const System::AnsiString Msg, int AHelpContext
) : Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EInvalidGridOperation(const System::AnsiString Msg, const
System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size
, AHelpContext) { }
/* Exception.CreateResHelp */ __fastcall EInvalidGridOperation(int Ident, int AHelpContext) : Sysutils::
Exception(Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EInvalidGridOperation(int Ident, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
) { }
public:
/* TObject.Destroy */ __fastcall virtual ~EInvalidGridOperation(void) { }
};
typedef int __fastcall (__closure *TGetExtentsFunc)(long Index);
struct TGridAxisDrawInfo
{
int EffectiveLineWidth;
int FixedBoundary;
int GridBoundary;
int GridExtent;
long LastFullVisibleCell;
int FullVisBoundary;
int FixedCellCount;
int FirstGridCell;
int 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
{
long X;
long 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 Controls::TCustomControl inherited;
private:
TGridCoord FAnchor;
TFormBorderStyle FBorderStyle;
bool FCanEditModify;
long FColCount;
void *FColWidths;
void *FTabStops;
TGridCoord FCurrent;
int FDefaultColWidth;
int FDefaultRowHeight;
int FFixedCols;
int FFixedRows;
Graphics::TColor FFixedColor;
int FGridLineWidth;
TGridOptions FOptions;
long FRowCount;
void *FRowHeights;
TScrollStyle FScrollBars;
TGridCoord FTopLeft;
long FSizingIndex;
int FSizingPos;
int FSizingOfs;
long FMoveIndex;
long FMovePos;
POINT FHitTest;
TInplaceEdit* FInplaceEdit;
long FInplaceCol;
long FInplaceRow;
bool FDefaultDrawing;
bool FEditorMode;
int FColOffset;
TGridCoord __fastcall CalcCoordFromPoint(int X, int Y, const TGridDrawInfo &DrawInfo);
void __fastcall CalcDrawInfo(TGridDrawInfo &DrawInfo);
void __fastcall CalcDrawInfoXY(TGridDrawInfo &DrawInfo, int UseWidth, int UseHeight);
void __fastcall CalcFixedInfo(TGridDrawInfo &DrawInfo);
TGridCoord __fastcall CalcMaxTopLeft(const TGridCoord &Coord, const TGridDrawInfo &DrawInfo);
void __fastcall CalcSizingState(int X, int Y, TGridState &State, long &Index, int &SizingPos, int &
SizingOfs, TGridDrawInfo &FixedInfo);
void __fastcall ChangeSize(long NewColCount, long NewRowCount);
void __fastcall ClampInView(const TGridCoord &Coord);
void __fastcall DrawSizingLine(const TGridDrawInfo &DrawInfo);
void __fastcall DrawMove(void);
void __fastcall FocusCell(long ACol, long ARow, bool MoveAnchor);
void __fastcall GridRectToScreenRect(const TGridRect &GridRect, Windows::TRect &ScreenRect, bool 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(Cardinal ScrollBar, Cardinal ScrollCode, Cardinal Pos);
void __fastcall MoveAdjust(long &CellPos, long FromIndex, long ToIndex);
void __fastcall MoveAnchor(const TGridCoord &NewAnchor);
void __fastcall MoveAndScroll(int Mouse, int CellHit, TGridDrawInfo &DrawInfo, TGridAxisDrawInfo &Axis
, int Scrollbar);
void __fastcall MoveCurrent(long ACol, long ARow, bool MoveAnchor, bool Show);
void __fastcall MoveTopLeft(long ALeft, long ATop);
void __fastcall ResizeCol(long Index, int OldSize, int NewSize);
void __fastcall ResizeRow(long Index, int OldSize, int NewSize);
void __fastcall SelectionMoved(const TGridRect &OldSel);
void __fastcall ScrollDataInfo(int DX, int DY, TGridDrawInfo &DrawInfo);
void __fastcall TopLeftMoved(const TGridCoord &OldTopLeft);
void __fastcall UpdateScrollPos(void);
void __fastcall UpdateScrollRange(void);
int __fastcall GetColWidths(long Index);
int __fastcall GetRowHeights(long Index);
TGridRect __fastcall GetSelection(void);
bool __fastcall GetTabStops(long Index);
int __fastcall GetVisibleColCount(void);
int __fastcall GetVisibleRowCount(void);
void __fastcall ReadColWidths(Classes::TReader* Reader);
void __fastcall ReadRowHeights(Classes::TReader* Reader);
void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
void __fastcall SetCol(long Value);
void __fastcall SetColCount(long Value);
void __fastcall SetColWidths(long Index, int Value);
void __fastcall SetDefaultColWidth(int Value);
void __fastcall SetDefaultRowHeight(int Value);
void __fastcall SetEditorMode(bool Value);
void __fastcall SetFixedColor(Graphics::TColor Value);
void __fastcall SetFixedCols(int Value);
void __fastcall SetFixedRows(int Value);
void __fastcall SetGridLineWidth(int Value);
void __fastcall SetLeftCol(long Value);
void __fastcall SetOptions(TGridOptions Value);
void __fastcall SetRow(long Value);
void __fastcall SetRowCount(long Value);
void __fastcall SetRowHeights(long Index, int Value);
void __fastcall SetScrollBars(Stdctrls::TScrollStyle Value);
void __fastcall SetSelection(const TGridRect &Value);
void __fastcall SetTabStops(long Index, bool Value);
void __fastcall SetTopRow(long 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);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Msg);
MESSAGE void __fastcall CMWantSpecialKey(Messages::TWMKey &Msg);
HIDESBASE MESSAGE void __fastcall WMChar(Messages::TWMKey &Msg);
HIDESBASE MESSAGE void __fastcall WMCommand(Messages::TWMCommand &Message);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Msg);
HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Msg);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Msg);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Msg);
HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Msg);
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Msg);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Msg);
MESSAGE void __fastcall WMTimer(Messages::TWMTimer &Msg);
HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Msg);
protected:
TGridState FGridState;
bool FSaveCellExtents;
virtual TInplaceEdit* __fastcall CreateEditor(void);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
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 AdjustSize(long Index, long Amount, bool Rows);
Windows::TRect __fastcall BoxRect(long ALeft, long ATop, long ARight, long ABottom);
virtual void __fastcall DoExit(void);
Windows::TRect __fastcall CellRect(long ACol, long ARow);
virtual bool __fastcall CanEditAcceptKey(char Key);
virtual bool __fastcall CanGridAcceptKey(Word Key, Classes::TShiftState Shift);
virtual bool __fastcall CanEditModify(void);
virtual bool __fastcall CanEditShow(void);
virtual System::AnsiString __fastcall GetEditText(long ACol, long ARow);
virtual void __fastcall SetEditText(long ACol, long ARow, const System::AnsiString Value);
virtual System::AnsiString __fastcall GetEditMask(long ACol, long ARow);
virtual int __fastcall GetEditLimit(void);
int __fastcall GetGridWidth(void);
int __fastcall GetGridHeight(void);
void __fastcall HideEditor(void);
void __fastcall ShowEditor(void);
void __fastcall ShowEditorChar(char Ch);
void __fastcall InvalidateEditor(void);
void __fastcall MoveColumn(long FromIndex, long ToIndex);
virtual void __fastcall ColumnMoved(long FromIndex, long ToIndex);
void __fastcall MoveRow(long FromIndex, long ToIndex);
virtual void __fastcall RowMoved(long FromIndex, long ToIndex);
virtual void __fastcall DrawCell(long ACol, long ARow, const Windows::TRect &ARect, TGridDrawState
AState) = 0;
virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
TGridCoord __fastcall MouseCoord(int X, int Y);
void __fastcall MoveColRow(long ACol, long ARow, bool MoveAnchor, bool Show);
virtual bool __fastcall SelectCell(long ACol, long ARow);
virtual void __fastcall SizeChanged(long OldColCount, long OldRowCount);
bool __fastcall Sizing(int X, int Y);
void __fastcall ScrollData(int DX, int DY);
void __fastcall InvalidateCell(long ACol, long ARow);
void __fastcall InvalidateCol(long ACol);
void __fastcall InvalidateRow(long 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(long ACol);
void __fastcall DeleteRow(long ARow);
void __fastcall UpdateDesigner(void);
__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
__property long Col = {read=FCurrent.X, write=SetCol, nodefault};
__property Color ;
__property long ColCount = {read=FColCount, write=SetColCount, default=5};
__property int ColWidths[long Index] = {read=GetColWidths, write=SetColWidths};
__property int DefaultColWidth = {read=FDefaultColWidth, write=SetDefaultColWidth, default=64};
__property bool DefaultDrawing = {read=FDefaultDrawing, write=FDefaultDrawing, default=1};
__property int DefaultRowHeight = {read=FDefaultRowHeight, write=SetDefaultRowHeight, default=24};
__property bool EditorMode = {read=FEditorMode, write=SetEditorMode, nodefault};
__property Graphics::TColor FixedColor = {read=FFixedColor, write=SetFixedColor, default=-2147483633
};
__property int FixedCols = {read=FFixedCols, write=SetFixedCols, default=1};
__property int FixedRows = {read=FFixedRows, write=SetFixedRows, default=1};
__property int GridHeight = {read=GetGridHeight, nodefault};
__property int GridLineWidth = {read=FGridLineWidth, write=SetGridLineWidth, default=1};
__property int GridWidth = {read=GetGridWidth, nodefault};
__property TInplaceEdit* InplaceEditor = {read=FInplaceEdit, nodefault};
__property long LeftCol = {read=FTopLeft.X, write=SetLeftCol, nodefault};
__property TGridOptions Options = {read=FOptions, write=SetOptions, default=31};
__property ParentColor ;
__property long Row = {read=FCurrent.Y, write=SetRow, nodefault};
__property long RowCount = {read=FRowCount, write=SetRowCount, default=5};
__property int RowHeights[long Index] = {read=GetRowHeights, write=SetRowHeights};
__property Stdctrls::TScrollStyle ScrollBars = {read=FScrollBars, write=SetScrollBars, default=3};
__property TGridRect Selection = {read=GetSelection, write=SetSelection};
__property bool TabStops[long Index] = {read=GetTabStops, write=SetTabStops};
__property long TopRow = {read=FTopLeft.Y, write=SetTopRow, nodefault};
__property int VisibleColCount = {read=GetVisibleColCount, nodefault};
__property int VisibleRowCount = {read=GetVisibleRowCount, nodefault};
public:
__fastcall virtual TCustomGrid(Classes::TComponent* AOwner);
__fastcall virtual ~TCustomGrid(void);
__published:
__property TabStop ;
public:
/* TWinControl.CreateParented */ __fastcall TCustomGrid(HWND ParentWindow) : Controls::TCustomControl(
ParentWindow) { }
};
class __declspec(pascalimplementation) TInplaceEdit : public Mask::TCustomMaskEdit
{
typedef Mask::TCustomMaskEdit inherited;
private:
TCustomGrid* FGrid;
long FClickTime;
void __fastcall InternalMove(const Windows::TRect &Loc, bool Redraw);
void __fastcall SetGrid(TCustomGrid* Value);
HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall WMPaste(void *Message);
HIDESBASE 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 bool __fastcall EditCanModify(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual void __fastcall KeyUp(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);
HIDESBASE void __fastcall Hide(void);
HIDESBASE void __fastcall Invalidate(void);
void __fastcall Move(const Windows::TRect &Loc);
bool __fastcall PosEqual(const Windows::TRect &Rect);
HIDESBASE void __fastcall SetFocus(void);
void __fastcall UpdateLoc(const Windows::TRect &Loc);
HIDESBASE bool __fastcall Visible(void);
public:
/* TWinControl.CreateParented */ __fastcall TInplaceEdit(HWND ParentWindow) : Mask::TCustomMaskEdit(
ParentWindow) { }
/* TWinControl.Destroy */ __fastcall virtual ~TInplaceEdit(void) { }
};
struct TGridRect
{
union
{
struct
{
TGridCoord TopLeft;
TGridCoord BottomRight;
};
struct
{
long Left;
long Top;
long Right;
long Bottom;
};
};
} ;
typedef void __fastcall (__closure *TSelectCellEvent)(System::TObject* Sender, long Col, long Row, bool
&CanSelect);
typedef void __fastcall (__closure *TDrawCellEvent)(System::TObject* Sender, long Col, long Row, const
Windows::TRect &Rect, TGridDrawState State);
typedef void __fastcall (__closure *TGetEditEvent)(System::TObject* Sender, long ACol, long ARow, System::AnsiString &
Value);
typedef void __fastcall (__closure *TSetEditEvent)(System::TObject* Sender, long ACol, long ARow, const System::AnsiString
Value);
typedef void __fastcall (__closure *TMovedEvent)(System::TObject* Sender, long FromIndex, long ToIndex
);
class __declspec(delphiclass) TDrawGrid;
class __declspec(pascalimplementation) TDrawGrid : public TCustomGrid
{
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(long FromIndex, long ToIndex);
virtual void __fastcall DrawCell(long ACol, long ARow, const Windows::TRect &ARect, TGridDrawState
AState);
virtual System::AnsiString __fastcall GetEditMask(long ACol, long ARow);
virtual System::AnsiString __fastcall GetEditText(long ACol, long ARow);
virtual void __fastcall RowMoved(long FromIndex, long ToIndex);
virtual bool __fastcall SelectCell(long ACol, long ARow);
virtual void __fastcall SetEditText(long ACol, long ARow, const System::AnsiString Value);
virtual void __fastcall TopLeftChanged(void);
public:
HIDESBASE Windows::TRect __fastcall CellRect(long ACol, long ARow);
void __fastcall MouseToCell(int X, int Y, long &ACol, long &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) { }
public:
/* TWinControl.CreateParented */ __fastcall TDrawGrid(HWND ParentWindow) : Grids::TCustomGrid(ParentWindow
) { }
};
class __declspec(delphiclass) TStringGridStrings;
class __declspec(delphiclass) TStringGrid;
class __declspec(pascalimplementation) TStringGrid : public TDrawGrid
{
typedef TDrawGrid inherited;
private:
void *FData;
void *FRows;
void *FCols;
bool FUpdating;
bool FNeedsUpdating;
int FEditUpdate;
void __fastcall DisableEditUpdate(void);
void __fastcall EnableEditUpdate(void);
HIDESBASE void __fastcall Initialize(void);
HIDESBASE void __fastcall Update(int ACol, int ARow);
void __fastcall SetUpdateState(bool Updating);
System::AnsiString __fastcall GetCells(int ACol, int ARow);
Classes::TStrings* __fastcall GetCols(int Index);
System::TObject* __fastcall GetObjects(int ACol, int ARow);
Classes::TStrings* __fastcall GetRows(int Index);
void __fastcall SetCells(int ACol, int ARow, const System::AnsiString Value);
void __fastcall SetCols(int Index, Classes::TStrings* Value);
void __fastcall SetObjects(int ACol, int ARow, System::TObject* Value);
void __fastcall SetRows(int Index, Classes::TStrings* Value);
TStringGridStrings* __fastcall EnsureColRow(int Index, bool IsCol);
void * __fastcall EnsureDataRow(int ARow);
protected:
virtual void __fastcall ColumnMoved(long FromIndex, long ToIndex);
virtual void __fastcall DrawCell(long ACol, long ARow, const Windows::TRect &ARect, TGridDrawState
AState);
virtual System::AnsiString __fastcall GetEditText(long ACol, long ARow);
virtual void __fastcall SetEditText(long ACol, long ARow, const System::AnsiString Value);
virtual void __fastcall RowMoved(long FromIndex, long ToIndex);
public:
__fastcall virtual TStringGrid(Classes::TComponent* AOwner);
__fastcall virtual ~TStringGrid(void);
__property System::AnsiString Cells[int ACol][int ARow] = {read=GetCells, write=SetCells};
__property Classes::TStrings* Cols[int Index] = {read=GetCols, write=SetCols};
__property System::TObject* Objects[int ACol][int ARow] = {read=GetObjects, write=SetObjects};
__property Classes::TStrings* Rows[int Index] = {read=GetRows, write=SetRows};
public:
/* TWinControl.CreateParented */ __fastcall TStringGrid(HWND ParentWindow) : Grids::TDrawGrid(ParentWindow
) { }
};
class __declspec(pascalimplementation) TStringGridStrings : public Classes::TStrings
{
typedef Classes::TStrings inherited;
private:
TStringGrid* FGrid;
int FIndex;
void __fastcall CalcXY(int Index, int &X, int &Y);
protected:
virtual void __fastcall Clear(void);
virtual int __fastcall Add(const System::AnsiString S);
virtual System::AnsiString __fastcall Get(int Index);
virtual int __fastcall GetCount(void);
virtual System::TObject* __fastcall GetObject(int Index);
virtual void __fastcall Put(int Index, const System::AnsiString S);
virtual void __fastcall PutObject(int Index, System::TObject* AObject);
virtual void __fastcall SetUpdateState(bool Updating);
public:
__fastcall TStringGridStrings(TStringGrid* AGrid, long AIndex);
virtual void __fastcall Assign(Classes::TPersistent* Source);
public:
/* TObject.Destroy */ __fastcall virtual ~TStringGridStrings(void) { }
};
//-- var, const, procedure ---------------------------------------------------
#define MaxCustomExtents (int)(134217727)
#define MaxShortInt (Shortint)(127)
//-- template instantiations -------------------------------------------------
template class TGridScrollDirection ;
template class TGridDrawState ;
template class TGridOptions ;
} /* namespace Grids */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Grids;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Grids